�����JFIF��XX����������    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222�����"����4���������������������������� ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu������������������������������������#ډb���_�N��?�����������wQ���5-�~�I���8���������������������������������TK<5o�Iv-������������������k�_U_������������������������������~b�M��d��������Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�����?_�'ϔ��_�Ջt������������������������=||I �����6�έ"�����D���/[�k�9����Y�8������ds|\���Ҿp6�Ҵ���]��.����6���z<�v��@]�i%������������������������$j��~����g��J>��no����pM[me�i$[�����������s�o�ᘨ�˸ nɜG-�ĨU�ycP���3.DB�li�;���������������������hj���x����7Z^�N�h��������N3u{�:j�����x�힞��#M��&��jL P@��_���� P�������������������&��o8��������9������@Sz���6�t7#O�ߋ �����s}Yf�T������lmr����Z)'N��k�۞p�����w\�T���������������ȯ?�8`���O��i{wﭹW�[�r�� ��Q4F�׊������3m&L�=��h3�������z~��#����\�l :�F,j@�� ʱ�wQT����8�"kJO����6�֚l������������������}����R�>ډK���]��y����&����p�}b������;N�1�m�r$����|��7�>e�@���B�TM*-i�H��g�D�)� E�m�|�ؘbҗ�a���Ҿ����������������t4�����o���G��*oCN�rP���Q��@z,|?W[0���������:�n,j���WiE��W������$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S���������������VN;���}�s?.����� w��9��˟<���Mq4�Wv'������{)0�1mB����V����W[��������8�/<� �%���wT^�5���b��)iM� p�g�N�&ݝ������������VO~��q���u���9��� ����!��J27�����$����O-���! �:���%H��� ـ�������y�ΠM=t{!S�� �oK8�������t<����è��������:a��������[������ա�H���~��w��Qz`�p����o�^ ������Q��n����� �,uu�C��$ ^���,�������8�#��:�6��e�|~�����������!�3��3.�\0�����q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<�����Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y���|�y��� ~�6�@c��1vOp��������Ig�����4��l�OD�����L����� R���c���j�_�uX�6��3?nk��Wy�f;^*B� ��@���~a�`��Eu�������+�����6�L��.ü>��}y���}_�O�6�͐�:�Yr���G�X��kG������l^w����������~㒶sy���Iu�!���� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT����G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2������#I/�׍qz��^t�̔���������b�Yz4x����t�){ OH�����+(E��A&�N�������XT��o��"�XC����'���)}�J�z�p� ����~5�}�^����+�6����w��c��Q�|�Lp�d�H��}�(�.|����k��c4^�����"�����Z?ȕ ��a<�������L�!0�39C� �Eu�����C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf����M}7����]�������s2tcS{�\icTx;�\��7K���P������ʇ Z O-��~�������c>"��?��������P�����E��O�8��@�8��G��Q�g�a�Վ���󁶠��䧘��_%#r�>�����1�z�a���eb��qcP��ѵ��n���#L��� =��׀t� L�7�`�����V����A{�C:�g���e@�����w1 Xp�3�c3�ġ�������p��M"'-�@n4���fG���B3�DJ�8[Jo�ߐ���gK)ƛ��$���� �������8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`�������?��K�����QK�d���������B`�s}�>���`������*�>��,*@J�d�oF*�����弝��O}�k��s��]��y�ߘ�������c1G�V���<=�7��7����6��q�PT��tXԀ�!9*4�4Tހ���3XΛex�46�������Y��D ����� ����BdemDa����\�_l,����G�/���֌7���Y�](�xTt^%�GE�����4�}bT����ڹ�����;��Y)���B�Q��u��>J/J ���⮶.�XԄ��j�ݳ������+E��d ���r�5�_D�����1 ���o�� �B�x�΢�#����<��W�����8���R6�@���g�M�.��� dr�D��>(otU��@�x=��~v���2� ӣ�d�oBd�����3�eO�6�㣷����������ݜ�6��6Y��Qz`����S��{���\P��~z m5{J/L��1������<�e�ͅPu���b�]�ϔ��������'�������f�b� Zpw��c`"��i���BD@:)ִ�:�]��h���v�E��w���T�l�������P����"Ju�}��وV ��J��G6��. J/�Qgl߭�e�����@�z�Zev2u����)]կ���������7x�������s�M�-<ɯ�c��r��v�����@��$�ޮ}lk���a����'����>x��O\�Z������Fu>������ck#��&:��`�$��ai�>2Δ����l���oF[h�������lE�ܺ�Π���k:)���`������� $[6�����9�����kOw�\|�����8}������ބ:��񶐕��������I�A1/���=�2[�,�!��.}gN#�u����b���� ~���������݊��}34q�����d�E��L��������c��$���"�[q�U�硬g^��%B ��z���r�p�������J�ru%v\h�����1Y�ne`������ǥ:g����pQM~�^��Xi� ��`S�:V2������9.�P���V������?B�k�� ��������AEvw%�_�9C�Q����wKekP�ؠ�\������;Io d�{ ߞo�c1eP�����\� `����E=���@K<�Y��������eڼ�J����w����{av�F�'�M�@��������������/J��+9p����|]���������Iw &`���8���&�M�hg���[�{�������Xj���%��Ӓ�������������������$��(�����ʹN�������<>�I���RY�����K2�NPlL�ɀ�)��&e��������B+ь����(������������������� � �JTx����_?EZ� }@���� 6�U���뙢ط�z��dWI��n` D����噥�[��uV��"�G&�����Ú����2�g�}&m���������������������?ċ���"����Om#�������������������������� ��{���������������������ON��"S�X���Ne��ysQ���@�������������Fn��Vg�����dX�~nj����������������������]J�<�K]:����FW���b�������62����������=��5f����JKw����bf�X������������������������55��~J �%^�������:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v�������g�8�1��f2�������������������������4;�V���ǔ�)�������������������9���1\������������������������������c��v�/'Ƞ�w������������������$�4�R-��t����������������������������������� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃�������������������������������������������A��20�c#���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@���� 0!1@AP"#2Q`$3V�%45a6�FRUq����� ������^7ׅ,$n��������+��F�`��2X'��0vM��p�L=�������5��8������u�p~���.�`r�����\����O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;�������S�T���1���i[U�ɵz�]��U)V�S6���3$K{��ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u��!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ����D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v������멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$��JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4��[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ��dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il���d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J���oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.����3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R�=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N������#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%����JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$�I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$����L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)��H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>��dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\��y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~�������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7���ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz���)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)�'��8Ϣ�ٔ���ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'��L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(�}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3��������QT��a�����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3��,#c�co��q�a)*P�t����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O����������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l��O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m����PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q��������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~��|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@�l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`�7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ�����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i�����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0���Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q���nxҍ!U�f�!eh�i�2�m����`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{�/ �?�͟��|1�:�#g��W�>$����d��J��d�B���=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H�����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l�����l�cGs�ځ�������y�Ac������\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6�����N6�q��������N� ���! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td���� ?�����N����a��3��m���C���w��������xA�m�q�m����m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4����r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0�������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ�����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G������Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q��(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9���3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M�����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#y�w��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa�����Q�#� WeF��ŮNj�p�J* mQ�N�����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]���陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv�:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WP�w���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*�� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp��BGv[]�u�Ov����0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND���.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J ��4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R���� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(��>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG���{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/���*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>�e]�����Q�r�:����g�,i"�����ԩA��*M�<�G��b�if��l^M��5�� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f������֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ����˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)���h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������� G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W��I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��B�S�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c����]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪��\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W������6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}������6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@��P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6������m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw��k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ�����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e���R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1�[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN���ĕ���0������� !01@Q"2AaPq3BR�������?�����@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j��ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^����ԯ̾9Z��F��������n��1��� ��]�[��)�'�������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ���&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0���;_���3������� !01"@AQa2Pq#3BR�������?����ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q�� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6�����������4B>��o��](��$B���m�����a�!=���?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{�E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)�����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a��84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b���$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7���k�� 403WebShell
403Webshell
Server IP : 103.30.72.248  /  Your IP : 216.73.216.61
Web Server : Microsoft-IIS/10.0
System : Windows NT WIN-CARKG80MF9A 10.0 build 17763 (Windows Server 2019) AMD64
User : IUSR ( 0)
PHP Version : 8.2.7
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Program Files/Azure Data Studio/resources/app/extensions/mssql/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Program Files/Azure Data Studio/resources/app/extensions/mssql/dist/main.js
/*! For license information please see main.js.LICENSE.txt */
(()=>{var e={7437:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(9877),o=n(2357),s=["redmond.corp.microsoft.com","northamerica.corp.microsoft.com","fareast.corp.microsoft.com","ntdev.corp.microsoft.com","wingroup.corp.microsoft.com","southpacific.corp.microsoft.com","wingroup.windeploy.ntdev.microsoft.com","ddnet.microsoft.com","europe.corp.microsoft.com"],a={"common.msftInternal":function(){const e=process.env.USERDNSDOMAIN;if(!e)return!1;const t=e.toLowerCase();return s.some((e=>t===e))}()?1:0},c={};try{const e=n(9072);c["common.adsversion"]=null==e?void 0:e.version}catch(e){}class l{constructor(e,t,n,r){this.reporter=e,this.eventName=t,this.properties=n,this.measurements=r,this.properties=n||{},Object.assign(this.properties,c),this.measurements=r||{},Object.assign(this.measurements,a)}send(){var e;try{null===(e=this.reporter)||void 0===e||e.sendTelemetryEvent(this.eventName,this.properties,this.measurements)}catch(e){const t=e instanceof Error?e.message:e;console.error(`Error sending ${this.eventName} event ${t}`)}}withAdditionalProperties(e){return Object.assign(this.properties,e),this}withAdditionalMeasurements(e){return Object.assign(this.measurements,e),this}withConnectionInfo(e){return Object.assign(this.properties,{authenticationType:e.authenticationType,providerName:e.providerName}),this}withServerInfo(e){var t,n,r;return Object.assign(this.properties,{connectionType:void 0!==(null==e?void 0:e.isCloud)?e.isCloud?"Azure":"Standalone":"",serverVersion:null!==(t=null==e?void 0:e.serverVersion)&&void 0!==t?t:"",serverEdition:null!==(n=null==e?void 0:e.serverEdition)&&void 0!==n?n:"",serverEngineEdition:null!==(r=null==e?void 0:e.engineEditionId)&&void 0!==r?r:""}),this}}t.default=class{constructor(e,t,n){var r,o;this._telemetryReporter=void 0;try{this._telemetryReporter=new i.default(e,t,n)}catch(t){console.error(`Error initializing TelemetryReporter for '${e}'. ${null!==(o=null===(r=t)||void 0===r?void 0:r.message)&&void 0!==o?o:t}`)}}createViewEvent(e){return new l(this._telemetryReporter,"view",{view:e})}sendViewEvent(e){this.createViewEvent(e).send()}createActionEvent(e,t,n="",r="",i){const o=i?{durationInMs:i}:{};return new l(this._telemetryReporter,"action",{view:e,action:t,target:n,source:r},o)}sendActionEvent(e,t,n="",r="",i){this.createActionEvent(e,t,n,r,i).send()}createTimedAction(e,t,n,r){return new o.TimedAction(this,e,t,n,r)}createMetricsEvent(e,t=""){return new l(this._telemetryReporter,"metrics",{groupName:t},e)}sendMetricsEvent(e,t=""){this.createMetricsEvent(e,t).send()}createErrorEvent(e,t,n="",r=""){return new l(this._telemetryReporter,"error",{view:e,name:t,errorCode:n,errorType:r})}sendErrorEvent(e,t,n="",r=""){this.createErrorEvent(e,t,n,r).send()}createErrorEvent2(e,t,n=void 0,r=!1,i="",o=""){const s={view:e,name:t,errorCode:i,errorType:o};if(n instanceof Error){s.message=!0===r?n.message:"";let e=n.stack||"";if(!0!==r&&n.message){const t=new RegExp(n.message,"g");e=e.replace(t,"<REDACTED: error-message>")}s.stack=e}else s.message=!0===r?null==n?void 0:n.toString():"",s.stack="";return new l(this._telemetryReporter,"error",s)}sendErrorEvent2(e,t,n=void 0,r=!1,i="",o=""){this.createErrorEvent2(e,t,n,r,i,o).send()}createTelemetryEvent(e,t,n){return new l(this._telemetryReporter,e,t,n)}sendTelemetryEvent(e,t,n){this.createTelemetryEvent(e,t,n).send()}dispose(){var e;return r(this,void 0,void 0,(function*(){yield null===(e=this._telemetryReporter)||void 0===e?void 0:e.dispose()}))}}},2357:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimedAction=void 0,t.TimedAction=class{constructor(e,t,n,r="",i=""){this.reporter=e,this.view=t,this.action=n,this.target=r,this.source=i,this.properties={},this.measures={},this.start=Date.now()}withAdditionalProperties(e){return Object.assign(this.properties,e),this}withAdditionalMeasures(e){return Object.assign(this.measures,e),this}send(){this.reporter.createActionEvent(this.view,this.action,this.source,this.target,Date.now()-this.start).withAdditionalProperties(this.properties).withAdditionalMeasurements(this.measures).send()}}},1357:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sequencer=void 0,t.Sequencer=class{constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then((()=>e()))}}},588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributionNotSupportedError=t.ArchitectureNotSupportedError=t.PlatformNotSupportedError=void 0;class n extends Error{constructor(e){super(`The platform '${e}' is not supported.`),this.code=0}}t.PlatformNotSupportedError=n;class r extends Error{constructor(e,t){super(`The architecture '${t}' for platform '${e}' is not supported.`),this.code=2}}t.ArchitectureNotSupportedError=r;class i extends Error{constructor(e,t,n){super(`The distribution '${t}' with version '${n}' for platform '${e}' is not supported.`),this.code=1}}t.DistributionNotSupportedError=i},8537:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ArchiveExtractor=void 0;const s=o(n(7998)),a=n(6387),c=n(4405),l=n(2697);t.ArchiveExtractor=class{constructor(){this.eventEmitter=new a.EventEmitter2({wildcard:!0}),this.unzipper=new c.Unzipper,this.logger=new l.Logger(this.eventEmitter)}extract(e,t){if(this.logger.verbose(`Extracting arhive '${e}' to '${t}'.`),e.match(/\.tar\.gz|\.tar|\.gz$/i)){let n=0;return s.x({file:e,cwd:t,onentry:e=>this.eventEmitter.emit("entry_extracted",e.path,++n,-1)})}return this.unzipper.extract(e,t)}}},7353:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpClient=void 0;const s=o(n(5687)),a=o(n(3685)),c=o(n(7147)),l=n(7310),u=n(6387),d=n(3636);t.HttpClient=class{constructor(){this.eventEmitter=new u.EventEmitter2({wildcard:!0})}downloadFile(e,t,n,r){const i=(0,l.parse)(e);let o=this.getHttpClientOptions(i,n,r),c="http:"===i.protocol?a.request:s.request;return new Promise(((e,i)=>{if(!t.tmpFile||0===t.tmpFile.fd)return i(new Error("Temporary package file unavailable"));let s=c(o,(o=>301===o.statusCode||302===o.statusCode?e(this.downloadFile(o.headers.location,t,n,r)):200!==o.statusCode?i(new Error(o.statusCode.toString())):void this.handleSuccessfulResponse(t,o).then((t=>{e()})).catch((e=>{i(e)}))));s.on("error",(e=>{i(new Error(`Request error: ${e.name||"NONE"}`))})),s.end()}))}getHttpClientOptions(e,t,n){const r=(0,d.getProxyAgent)(e,t,n);let i={host:e.hostname,path:e.path,agent:r,port:+e.port};return"https:"===e.protocol&&(i={host:e.hostname,path:e.path,agent:r,port:+e.port}),i}handleDataReceivedEvent(e,t){if(e.downloadedBytes+=t.length,e.packageSize>0){let t=Math.ceil(e.downloadedBytes/e.packageSize*100);t!==e.downloadPercentage&&(this.eventEmitter.emit("download_progress",t),e.downloadPercentage=t)}}handleSuccessfulResponse(e,t){return new Promise(((n,r)=>{let i={packageSize:parseInt(t.headers["content-length"],10),downloadedBytes:0,downloadPercentage:0};this.eventEmitter.emit("download_start",e.url,i.packageSize),t.on("data",(e=>{this.handleDataReceivedEvent(i,e)}));let o=c.createWriteStream(void 0,{fd:e.tmpFile.fd});t.on("end",(()=>{this.eventEmitter.emit("download_end"),n()})),t.on("error",(e=>{r(new Error(`Response error: ${e.name||"NONE"}`))})),t.pipe(o,{end:!1})}))}}},7725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogger=t.Logger=void 0,t.Logger=class{constructor(e){this.eventEmitter=e}verbose(e){this.log(0,e)}info(e){this.log(1,e)}warn(e){this.log(2,e)}error(e){this.log(3,e)}critical(e){this.log(4,e)}log(e,t){this.eventEmitter.emit("log_emitted",e,t)}},t.ConsoleLogger=class{verbose(e){console.log(e)}info(e){console.info(e)}warn(e){console.warn(e)}error(e){console.error(e)}critical(e){console.error(e)}}},9707:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4759),t),i(n(4286),t),i(n(7725),t)},9773:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformInformation=t.getFallbackRuntimes=t.getRuntimeDisplayName=t.getRuntimeId=t.LinuxDistribution=t.Runtime=void 0;const s=o(n(2037)),a=o(n(2081)),c=o(n(7147)),l=n(588),u=n(2697),d="unknown";var p;!function(e){e.Unknown="Unknown",e.Windows_86="Windows_86",e.Windows_64="Windows_64",e.Windows_ARM64="Windows_ARM64",e.Windows="Windows",e.OSX="OSX",e.OSX_ARM64="OSX_ARM64",e.CentOS="CentOS",e.Debian="Debian",e.ElementaryOS_0_3="ElementaryOS_0_3",e.ElementaryOS_0_4="ElementaryOS_0_4",e.ElementaryOS="ElementaryOS",e.Fedora="Fedora",e.GalliumOS="GalliumOS",e.LinuxMint="LinuxMint",e.OpenSUSE="OpenSUSE",e.OracleLinux="OracleLinux",e.RHEL="RHEL",e.SLES="SLES",e.Ubuntu_14="Ubuntu_14",e.Ubuntu_16="Ubuntu_16",e.Ubuntu_18="Ubuntu_18",e.Ubuntu_20="Ubuntu_20",e.Ubuntu_22="Ubuntu_22",e.Ubuntu="Ubuntu",e.Linux="Linux"}(p=t.Runtime||(t.Runtime={}));class h{constructor(e,t,n){this.name=e,this.version=t,this.idLike=n}static getCurrent(){return h.fromFilePath("/etc/os-release").catch((()=>h.fromFilePath("/usr/lib/os-release"))).catch((()=>Promise.resolve(new h(d,d))))}toString(){return`name=${this.name}, version=${this.version}`}static fromFilePath(e){return new Promise(((t,n)=>{c.readFile(e,"utf8",((e,r)=>{e?n(e):t(h.fromReleaseInfo(r))}))}))}static fromReleaseInfo(e,t=s.EOL){let n,r=d,i=d;const o=e.split(t);for(let e of o){e=e.trim();let t=e.indexOf("=");if(t>=0){let o=e.substring(0,t),s=e.substring(t+1);if((s.length>1&&s.startsWith('"')&&s.endsWith('"')||s.length>1&&s.startsWith("'")&&s.endsWith("'"))&&(s=s.substring(1,s.length-1)),"ID"===o?r=s:"VERSION_ID"===o?i=s:"ID_LIKE"===o&&(n=s.split(" ")),r!==d&&i!==d&&void 0!==n)break}}return new h(r,i,n)}}function f(e,t,n){switch(e){case"ubuntu":return t.startsWith("14")?p.Ubuntu_14:t.startsWith("16")?p.Ubuntu_16:t.startsWith("18")?p.Ubuntu_18:t.startsWith("20")?p.Ubuntu_20:t.startsWith("22")?p.Ubuntu_22:(n.warn(`The Ubuntu version '${t}' is unknown to the service downloader, it will be treated as Ubuntu.`),p.Ubuntu);case"elementary":case"elementary OS":return t.startsWith("0.3")?p.ElementaryOS_0_3:t.startsWith("0.4")?p.ElementaryOS_0_4:(n.warn(`The ElementaryOS version '${t}' is unknown to the service downloader, it will be treated as ElementaryOS.`),p.ElementaryOS);case"linuxmint":return p.LinuxMint;case"centos":return p.CentOS;case"ol":return p.OracleLinux;case"fedora":return p.Fedora;case"opensuse":return p.OpenSUSE;case"sles":return p.SLES;case"rhel":return p.RHEL;case"debian":return p.Debian;case"galliumos":return p.GalliumOS;default:return n.warn(`Unknown distribution name: ${e}`),p.Linux}}function m(e,t,n,r){const i=process.env.AZDATA_RUNTIME;if(i)return r.verbose(`AZDATA_RUNTIME environment variable is set, the value '${i}' will be used as the runtime.`),i;switch(e){case"win32":switch(t){case"x86":return p.Windows_86;case"x86_64":return p.Windows_64;case"arm64":return p.Windows_ARM64;default:throw new l.ArchitectureNotSupportedError(e,t)}case"darwin":switch(t){case"x86_64":return p.OSX;case"arm64":return p.OSX_ARM64;default:throw new l.ArchitectureNotSupportedError(e,t)}case"linux":if("x86_64"===t){let e=f(n.name,n.version,r);if(e===p.Unknown&&n.idLike&&n.idLike.length>0)for(let t of n.idLike)if(e=f(t,n.version,r),e!==p.Unknown)break;if(e!==p.Unknown)return e}throw new l.DistributionNotSupportedError(e,n.name,n.version);default:throw new l.PlatformNotSupportedError(e)}}function g(e){switch(e){case p.Windows_64:case p.Windows_86:case p.Windows_ARM64:case p.Windows:return"Windows";case p.OSX:return"OSX";case p.OSX_ARM64:return"OSX_ARM64";case p.CentOS:case p.Debian:case p.ElementaryOS_0_3:case p.ElementaryOS_0_4:case p.ElementaryOS:case p.Fedora:case p.GalliumOS:case p.LinuxMint:case p.OpenSUSE:case p.OracleLinux:case p.SLES:case p.RHEL:case p.Ubuntu_14:case p.Ubuntu_16:case p.Ubuntu_18:case p.Ubuntu_20:case p.Ubuntu_22:case p.Ubuntu:case p.Linux:return"Linux";default:throw new l.PlatformNotSupportedError(e)}}t.LinuxDistribution=h,t.getRuntimeId=m,t.getRuntimeDisplayName=g,t.getFallbackRuntimes=function e(t){switch(t){case p.Windows_64:case p.Windows_86:case p.Windows_ARM64:return[p.Windows];case p.OSX_ARM64:return[p.OSX];case p.ElementaryOS_0_3:return[p.Ubuntu_14,...e(p.Ubuntu_14)];case p.ElementaryOS_0_4:return[p.Ubuntu_16,...e(p.Ubuntu_16)];case p.ElementaryOS:return[p.Linux];case p.GalliumOS:case p.LinuxMint:return[p.Ubuntu_16,...e(p.Ubuntu_16)];case p.OracleLinux:return[p.CentOS,...e(p.CentOS)];case p.CentOS:case p.Debian:case p.Fedora:case p.OpenSUSE:case p.RHEL:case p.SLES:return[p.Linux];case p.Ubuntu_22:case p.Ubuntu_20:case p.Ubuntu_18:case p.Ubuntu_16:case p.Ubuntu_14:return[p.Ubuntu,...e(p.Ubuntu)];case p.Ubuntu:return[p.Linux];case p.Windows:case p.OSX:case p.Linux:return[];default:throw new l.PlatformNotSupportedError(t)}};class y{constructor(e,t,n,r=void 0){this.platform=t,this.architecture=n,this.distribution=r;try{e.verbose(`Getting runtime information. platform: ${t}, architecture: ${n}, distribution: ${r}`),this.runtimeId=m(t,n,r,e)}catch(i){const o=i&&i.message?i.message:i;e.error(`Failed to get the runtime information. platform: ${t}, architecture: ${n}, distribution: ${r}. error message: ${o}`),this.runtimeId=void 0}}get isWindows(){return"win32"===this.platform}get isMacOS(){return"darwin"===this.platform}get isLinux(){return"linux"===this.platform}get isValidRuntime(){return void 0!==this.runtimeId&&this.runtimeId!==p.Unknown}get runtimeDisplayName(){return g(this.runtimeId)}toString(){let e=this.platform;return this.architecture&&(e&&(e+=", "),e+=this.architecture),this.distribution&&(e&&(e+=", "),e+=this.distribution.toString()),e}static getCurrent(e=new u.ConsoleLogger){let t,n,r=s.platform();switch(r){case"win32":t=y.getWindowsArchitecture(),n=Promise.resolve(void 0);break;case"darwin":t=y.getUnixArchitecture(),n=Promise.resolve(void 0);break;case"linux":t=y.getUnixArchitecture(),n=h.getCurrent();break;default:return Promise.reject(new l.PlatformNotSupportedError(r))}return Promise.all([t,n]).then((t=>new y(e,r,t[0],t[1])))}static getWindowsArchitecture(){return new Promise(((e,t)=>{y.getWindowsArchitectureWmic().then((t=>{if(t&&t!==d)e(t);else{const t=y.getWindowsArchitectureEnv();e(t)}}))}))}static getWindowsArchitectureWmic(){return this.execChildProcess("wmic os get osarchitecture").then((e=>{if(e){let t=e.split(s.EOL);if(t.length>=2){let e=t[1].trim();if(e.toUpperCase().indexOf("ARM")>=0)return"arm64";if(e.indexOf("64")>=0)return"x86_64";if(e.indexOf("32")>=0)return"x86"}}return d})).catch((e=>d))}static getWindowsArchitectureEnv(){let e;return e="ARM64"===process.env.PROCESSOR_ARCHITECTURE?"arm64":"x86"===process.env.PROCESSOR_ARCHITECTURE&&void 0===process.env.PROCESSOR_ARCHITEW6432?"x86":"x86_64",e}static getUnixArchitecture(){return this.execChildProcess("uname -m").then((e=>{if(e)return e.trim()}))}static execChildProcess(e){return new Promise(((t,n)=>{a.exec(e,{maxBuffer:512e3},((e,r,i)=>{e?n(e):i&&i.length>0?n(new Error(i)):t(r)}))}))}}t.PlatformInformation=y},3636:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=void 0;const i=n(7310),o=r(n(9201)),s=r(n(6018));t.getProxyAgent=function(e,t,n){const r=t||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||void 0:"https:"===e.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||void 0}(e);if(!r)return;const a=(0,i.parse)(r);if(!/^https?:$/.test(a.protocol))return;n=n||!0;const c={host:a.hostname,port:Number(a.port),auth:a.auth,rejectUnauthorized:n};return"http:"===e.protocol?(0,o.default)(c):(0,s.default)(c)}},4759:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerProvider=void 0;const s=o(n(1017)),a=o(n(7147)),c=n(6387),l=n(9773),u=n(4286),d=n(2697);t.ServerProvider=class{get runtime(){return this._runtime?Promise.resolve(this._runtime):this.findRuntime().then((e=>(this._runtime=e,e)))}constructor(e){this.config=e,this.eventEmitter=new c.EventEmitter2({wildcard:!0}),this._downloadProvider=new u.ServiceDownloadProvider(this.config),this._downloadProvider.eventEmitter.onAny(((e,...t)=>{this.eventEmitter.emit(e,...t)})),this.logger=new d.Logger(this.eventEmitter)}get downloadProvider(){return this._downloadProvider}findRuntime(){return l.PlatformInformation.getCurrent(this.logger).then((e=>e.runtimeId))}findServerPath(e,t=void 0){return new Promise(((n,r)=>{a.stat(e,((r,i)=>{let o;i.isFile()&&n(e),void 0===t&&void 0!==this.config&&(t=this.config.executableFiles),void 0!==t&&t.forEach((t=>{let r=s.join(e,t);void 0===o&&a.existsSync(r)&&(o=r,n(o))})),n(o)}))}))}getOrDownloadServer(){return this.getServerPath().then((e=>void 0===e?this.downloadServerFiles().then((e=>e)):e))}getServerPath(){return this.runtime.then((e=>{const t=this._downloadProvider.getInstallDirectory(e);return this.findServerPath(t)}))}downloadServerFiles(){return this.runtime.then((e=>{const t=this._downloadProvider.getInstallDirectory(e);return this._downloadProvider.installService(e).then((e=>this.findServerPath(t)))}))}}},4286:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceDownloadProvider=void 0;const c=o(n(7147)),l=o(n(1890)),u=n(6387),d=o(n(6276)),p=o(n(1017)),h=n(9773),f=n(7353),m=n(588),g=n(3837),y=a(n(2047)),v=n(8537),b=n(2697);t.ServiceDownloadProvider=class{constructor(e){this._config=e,this.httpClient=new f.HttpClient,this.extractor=new v.ArchiveExtractor,this.eventEmitter=new u.EventEmitter2({wildcard:!0}),d.setGracefulCleanup(),this.httpClient.eventEmitter.onAny(((e,...t)=>{this.eventEmitter.emit(e,...t)})),this.extractor.eventEmitter.onAny(((e,...t)=>{this.eventEmitter.emit(e,...t)})),this.logger=new b.Logger(this.eventEmitter)}getDownloadFileName(e){const t=this._config.downloadFileNames;this.logger.verbose(`Runtimes specified in the configuration file: ${JSON.stringify(t)}`);const n=[e,...(0,h.getFallbackRuntimes)(e)];let r;this.logger.verbose(`Current runtime and the fallback runtimes: ${JSON.stringify(n)}`);for(let e=0;e<n.length;e++){const i=n[e];if(this.logger.verbose(`Checking whether a service file is specified for runtime: '${i}'.`),r=t[i],r){this.logger.verbose(`Found the service file for runtime: '${i}'.`);break}this.logger.verbose(`Service file is not specified for runtime: '${i}'.`)}if(void 0===r)throw"linux"===process.platform?new m.DistributionNotSupportedError("Unsupported linux distribution",process.platform,e):new m.PlatformNotSupportedError(process.platform);return r}getInstallDirectory(e){let t=this._config.installDirectory,n=this._config.version;return t=t.replace("{#version#}",n),t=t.replace("{#platform#}",(0,h.getRuntimeDisplayName)(e)),c.existsSync(t)||l.sync(t),t}getGetDownloadUrl(e){let t=this._config.downloadUrl,n=this._config.version;return t=t.replace("{#version#}",n),t=t.replace("{#fileName#}",e),t}installService(e){return s(this,void 0,void 0,(function*(){const t=this._config.proxy,n=this._config.strictSSL,r=this.getDownloadFileName(e),i={installPath:this.getInstallDirectory(e),url:this.getGetDownloadUrl(r),tmpFile:void 0},o=(0,g.promisify)(c.exists),a=(0,g.promisify)(c.unlink);return yield function(e,t,n={retries:0}){return s(this,void 0,void 0,(function*(){return yield(0,y.default)(((r,i)=>s(this,void 0,void 0,(function*(){try{return yield e()}catch(o){if(/403/.test(o))return void r(o);throw i<=n.retries&&t.warn(`[${(new Date).toLocaleTimeString("en-US",{hour12:!1})}] Retrying...   as attempt:${i} to run '${e.name}' failed with: '${o}'.`),o}}))),n)}))}((()=>s(this,void 0,void 0,(function*(){try{i.tmpFile=yield this.createTempFile(i),this.logger.info(`Downloading the package: '${i.url}' to file: '${i.tmpFile.name}'`),yield this.httpClient.downloadFile(i.url,i,t,n),this.logger.info(`Installing the package from file: ${i.tmpFile.name}`),yield this.install(i)}finally{(yield o(i.tmpFile.name))&&(yield a(i.tmpFile.name),this.logger.info(`Deleted the package file: ${i.tmpFile.name}`))}}))),this.logger,this._config.retry),!0}))}createTempFile(e){return new Promise(((t,n)=>{d.file({prefix:"package-",postfix:p.extname(e.url)},((e,r,i,o)=>{if(e)return n(new Error("Error from tmp.file"));t({name:r,fd:i,removeCallback:o})}))}))}install(e){return s(this,void 0,void 0,(function*(){this.eventEmitter.emit("install_start",e.installPath),yield this.extractor.extract(e.tmpFile.name,e.installPath),this.eventEmitter.emit("install_end")}))}}},4405:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Unzipper=t.ExtractError=void 0;const a=n(7766),c=o(n(1017)),l=s(n(1890)),u=n(1357),d=n(7147),p=n(6387);class h extends Error{constructor(e,t){let n=t.message;"CorruptZip"===e&&(n=`Corrupt ZIP: ${n}`),super(n),this.type=e,this.cause=t}}function f(e){if(e instanceof h)return e;let t;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new h(t,e)}t.ExtractError=h,t.Unzipper=class{constructor(){this.eventEmitter=new p.EventEmitter2({wildcard:!0})}extract(e,t){return this.openZip(e,!0).then((e=>this.extractZip(e,t)))}openZip(e,t=!1){return new Promise(((n,r)=>{(0,a.open)(e,t?{lazyEntries:!0}:void 0,((e,t)=>{e?r(f(e)):n(t)}))}))}extractZip(e,t){let n=0;return new Promise(((r,i)=>{const o=new u.Sequencer,s=()=>{n++,e.readEntry()};e.once("error",i),e.once("close",(()=>{e.entryCount===n?r():i(new h("Incomplete",new Error(`Incomplete. Found ${n} of ${e.entryCount} entries`)))})),e.readEntry(),e.on("entry",(r=>{if(/\/$/.test(r.fileName)){const e=c.join(t,r.fileName);return void(0,l.default)(e).then((()=>s())).then(void 0,i)}const a=this.openZipStream(e,r),u=function(e){const t=e.externalFileAttributes>>16||33188;return[448,56,7].map((e=>t&e)).reduce(((e,t)=>e+t),61440&t)}(r);o.queue((()=>a.then((i=>this.extractEntry(i,r.fileName,u,t,n+1,e.entryCount).then((()=>s())))))).then(void 0,i)}))}))}extractEntry(e,t,n,r,i,o){const s=c.dirname(t),a=c.join(r,s);if(0!==a.indexOf(r))return Promise.reject(new Error(`Error extracting ${t}. Invalid file.`));const u=c.join(r,t);let p;return Promise.resolve((0,l.default)(a)).then((()=>new Promise(((t,r)=>{try{p=(0,d.createWriteStream)(u,{mode:n}),p.once("close",(()=>{this.eventEmitter.emit("entry_extracted",u,i,o),t()})),p.once("error",r),e.once("error",r),e.pipe(p)}catch(e){r(e)}}))))}openZipStream(e,t){return new Promise(((n,r)=>{e.openReadStream(t,((e,t)=>{e?r(f(e)):n(t)}))}))}}},2046:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:n}={}){return new Promise(((r,i)=>{function o(){null==n||n.removeEventListener("abort",o),e.removeListener(t,s),e.removeListener("error",a)}function s(...e){o(),r(e)}function a(e){o(),i(e)}null==n||n.addEventListener("abort",o),e.on(t,s),e.on("error",a)}))}},9877:(e,t,n)=>{var r,i,o,s,a=Object.create,c=Object.defineProperty,l=Object.defineProperties,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,y=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>{for(var n in t||(t={}))m.call(t,n)&&y(e,n,t[n]);if(h)for(var n of h(t))g.call(t,n)&&y(e,n,t[n]);return e},b=(e,t)=>l(e,d(t)),S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),w=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of p(t))!m.call(e,i)&&i!==n&&c(e,i,{get:()=>t[i],enumerable:!(r=u(t,i))||r.enumerable});return e},T=(e,t,n)=>(n=null!=e?a(f(e)):{},w(!t&&e&&e.__esModule?n:c(n,"default",{value:e,enumerable:!0}),e)),_=S(((n,s)=>{var a;a=function(e){"use strict";var t="function",n="object",r="undefined",i="prototype",o="hasOwnProperty",s="default",a=Object,c=a[i],l=a.assign,u=a.create,d=a.defineProperty,p=c[o],h=null;function f(e){return void 0===e&&(e=!0),(!h||!e)&&(typeof globalThis!==r&&globalThis&&(h=globalThis),typeof self!==r&&self&&(h=self),typeof window!==r&&window&&(h=window),typeof global!==r&&global&&(h=global)),h}function m(e){throw new TypeError(e)}function g(e){if(u)return u(e);if(null==e)return{};var r=typeof e;function o(){}return r!==n&&r!==t&&m("Object prototype may only be an Object:"+e),o[i]=e,new o}var y=(f()||{}).Symbol,v=(f()||{}).Reflect,b=!!v,S="decorate",w="metadata",T="getOwnPropertySymbols",_="iterator",E=l||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])c[o].call(t,i)&&(e[i]=t[i]);return e},C=function(e,t){return(C=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[o](n)&&(e[n]=t[n])})(e,t)};function R(e,n){function r(){this.constructor=e}typeof n!==t&&null!==n&&m("Class extends value "+String(n)+" is not a constructor or null"),C(e,n),e[i]=null===n?g(n):(r[i]=n[i],new r)}function x(e,t,n,r){void 0===r&&(r=n),u?d(e,r,{enumerable:!0,get:function(){return t[n]}}):e[r]=t[n]}e.ObjAssign=l,e.ObjClass=a,e.ObjCreate=u,e.ObjDefineProperty=d,e.ObjHasOwnProperty=p,e.ObjProto=c,e.__assignFn=E,e.__createBindingFn=x,e.__decorateFn=function(e,n,r,i){var o,s=arguments.length,c=s<3?n:null===i?i=a.getOwnPropertyDescriptor(n,r):i;if(b&&typeof v[S]===t)c=v[S](e,n,r,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(c=(s<3?o(c):s>3?o(n,r,c):o(n,r))||c);return s>3&&c&&d(n,r,c),c},e.__exportStarFn=function(e,t){for(var n in e)n!==s&&!p.call(t,n)&&x(t,e,n)},e.__exposeGlobalTsLib=function(){var e,t,n,r,i=f()||{};t=E,n=R,r=x,(e=i).__assign||(e.__assign=l||t),e.__extends||(e.__extends=n),e.__createBinding||(e.__createBinding=r),__assign||(__assign=i.__assign),__extends||(__extends=i.__extends),__createBinding||(__createBinding=i.__createBinding)},e.__extendsFn=R,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)n!==s&&Object.prototype.hasOwnProperty.call(e,n)&&x(t,e,n);return u?d(t,s,{enumerable:!0,value:e}):t[s]=e,t},e.__makeTemplateObjectFn=function(e,t){return d?d(e,"raw",{value:t}):e.raw=t,e},e.__metadataFn=function(e,n){if(b&&v[w]===t)return v[w](e,n)},e.__paramFn=function(e,t){return function(n,r){t(n,r,e)}},e.__readFn=function(e,n){var r=typeof y===t&&e[y[_]];if(!r)return e;var i,o,s=r.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var r={};for(var i in e)p.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&typeof a[T]===t)for(var o=0,s=a[T](e);o<s.length;o++)n.indexOf(s[o])<0&&c.propertyIsEnumerable.call(e,s[o])&&(r[s[o]]=e[s[o]]);return r},e.__spreadArrayFn=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},e.__spreadArraysFn=function(){for(var e=arguments,t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;var i=Array(t),o=0;for(n=0;n<r;n++)for(var s=e[n],a=0,c=s.length;a<c;a++,o++)i[o]=s[a];return i},e.__valuesFn=function(e){var n=typeof y===t&&y[_],r=n&&e[n],i=0;return r?r.call(e):e&&"number"==typeof e.length?{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}}:void m(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=f,e.objCreateFn=g,e.strDefault=s,e.strShimFunction=t,e.strShimHasOwnProperty=o,e.strShimObject=n,e.strShimPrototype=i,e.strShimUndefined=r,e.throwTypeError=m,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof n&&typeof s<"u"?a(n):(i=[t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))})),E=S(((n,s)=>{var a;a=function(e){"use strict";var t="function",n="object",r="undefined",i="prototype",o="hasOwnProperty",s=Object,a=s[i],c=s.assign,l=s.create,u=s.defineProperty,d=a[o],p=null;function h(e){return void 0===e&&(e=!0),(!p||!e)&&(typeof globalThis!==r&&globalThis&&(p=globalThis),typeof self!==r&&self&&(p=self),typeof window!==r&&window&&(p=window),typeof global!==r&&global&&(p=global)),p}function f(e){throw new TypeError(e)}function m(e){if(l)return l(e);if(null==e)return{};var r=typeof e;function o(){}return r!==n&&r!==t&&f("Object prototype may only be an Object:"+e),o[i]=e,new o}(h()||{}).Symbol,(h()||{}).Reflect;var g=function(e,t){return(g=s.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[o](n)&&(e[n]=t[n])})(e,t)};function y(e,n){function r(){this.constructor=e}typeof n!==t&&null!==n&&f("Class extends value "+String(n)+" is not a constructor or null"),g(e,n),e[i]=null===n?m(n):(r[i]=n[i],new r)}function v(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var b="",S="processTelemetry",w="priority",T="setNextPlugin",_="isInitialized",E="teardown",C="core",R="update",x="disabled",I="_doTeardown",O="processNext",P="resume",D="pause",A="NotificationListener",N="add"+A,k="remove"+A,j="eventsSent",q="eventsDiscarded",M="eventsSendRequest",L="perfEvent",F="toISOString",U="endsWith",B="startsWith",z="indexOf",H="reduce",G="trim",V="toString",W="__proto__",$="constructor",K=u,Q=s.freeze,J=s.seal,X=s.keys,Y=String[i],Z=Y[G],ee=Y[U],te=Y[B],ne=Date[i][F],re=Array.isArray,ie=a[V],oe=d[V],se=oe.call(s),ae=/-([a-z])/g,ce=/([^\w\d_$])/g,le=/^(\d+[\w\d_$])/,ue=Object.getPrototypeOf;function de(e){if(e){if(ue)return ue(e);var t=e[W]||e[i]||e[$];if(t)return t}return null}function pe(e,t){return typeof e===t}function he(e){return void 0===e||typeof e===r}function fe(e){return null===e||he(e)}function me(e){return!fe(e)}function ge(e,t){return!(!e||!d.call(e,t))}function ye(e){return!(!e||typeof e!==n)}function ve(e){return!(!e||typeof e!==t)}function be(e){var t=e;return t&&Re(t)&&(t=(t=(t=t.replace(ae,(function(e,t){return t.toUpperCase()}))).replace(ce,"_")).replace(le,(function(e,t){return"_"+t}))),t}function Se(e,t){if(e)for(var n in e)d.call(e,n)&&t.call(e,n,e[n])}function we(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=ee?e[U](t):function(e,t){var n=!1,r=t?t.length:0,i=e?e.length:0;if(r&&i&&i>=r&&!(n=e===t)){for(var o=i-1,s=r-1;s>=0;s--){if(e[o]!=t[s])return!1;o--}n=!0}return n}(e,t)),n}function Te(e,t){return!(!e||!t)&&-1!==e.indexOf(t)}function _e(e){return!(!e||"[object Date]"!==ie.call(e))}var Ee=re||function(e){return!(!e||"[object Array]"!==ie.call(e))};function Ce(e){return!(!e||"[object Error]"!==ie.call(e))}function Re(e){return"string"==typeof e}function xe(e){return"number"==typeof e}function Ie(e){return"boolean"==typeof e}function Oe(e){var n=!1;if(e&&"object"==typeof e){var r=ue?ue(e):de(e);r?(r[$]&&d.call(r,$)&&(r=r[$]),n=typeof r===t&&oe.call(r)===se):n=!0}return n}function Pe(e){if(e)return ne?e[F]():function(e){if(e&&e.getUTCFullYear){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(e)}function De(e,t,n){var r=e.length;try{for(var i=0;i<r&&(!(i in e)||-1!==t.call(n||e,e[i],i,e));i++);}catch{}}function Ae(e,t,n){if(e){if(e[z])return e[z](t,n);var r=e.length,i=n||0;try{for(var o=Math.max(i>=0?i:r-Math.abs(i),0);o<r;o++)if(o in e&&e[o]===t)return o}catch{}}return-1}function Ne(e,t,n){var r;if(e){if(e.map)return e.map(t,n);var i=e.length,o=n||e;r=new Array(i);try{for(var s=0;s<i;s++)s in e&&(r[s]=t.call(o,e[s],e))}catch{}}return r}function ke(e,t,n){var r;if(e){if(e[H])return e[H](t,n);var i=e.length,o=0;if(arguments.length>=3)r=arguments[2];else{for(;o<i&&!(o in e);)o++;r=e[o++]}for(;o<i;)o in e&&(r=t(r,e[o],o,e)),o++}return r}function je(e){return e&&(e=Z&&e[G]?e[G]():e.replace?e.replace(/^\s+|\s+$/g,""):e),e}var qe=!{toString:null}.propertyIsEnumerable("toString"),Me=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Le(e){var r=typeof e;if(r!==t&&(r!==n||null===e)&&f("objKeys called on non-object"),!qe&&X)return X(e);var i=[];for(var o in e)e&&d.call(e,o)&&i.push(o);if(qe)for(var s=Me.length,a=0;a<s;a++)e&&d.call(e,Me[a])&&i.push(Me[a]);return i}function Fe(e,t,n,r){if(K)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),K(e,t,i),!0}catch{}return!1}function Ue(e){return e}function Be(e){return Q&&Se(e,(function(e,t){(Ee(t)||ye(t))&&Q(t)})),ze(e)}var ze=Q||Ue,He=J||Ue;function Ge(){var e=Date;return e.now?e.now():(new e).getTime()}function Ve(e){return Ce(e)?e.name:b}function We(e,t,n,r,i){var o=n;return e&&(o=e[t])!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,e[t]=o),o}function $e(e,t,n){var r;return e?!(r=e[t])&&fe(r)&&(r=he(n)?{}:n,e[t]=r):r=he(n)?{}:n,r}function Ke(e){return!e}function Qe(e){return!!e}function Je(e){throw new Error(e)}function Xe(e,t){var n=null,r=null;return ve(e)?n=e:r=e,function(){var e=arguments;if(n&&(r=n()),r)return r[t].apply(r,e)}}function Ye(e,t,n,r,i){e&&t&&n&&(!1!==i||he(e[t]))&&(e[t]=Xe(n,r))}function Ze(e,t,n,r){return e&&t&&ye(e)&&Ee(n)&&De(n,(function(n){Re(n)&&Ye(e,n,t,n,r)})),e}function et(e,t,n,r,i,o){var s=arguments,a=s[0]||{},c=s.length,l=!1,u=1;for(c>0&&Ie(a)&&(l=a,a=s[u]||{},u++),ye(a)||(a={});u<c;u++){var p=s[u],h=Ee(p),f=ye(p);for(var m in p)if(h&&m in p||f&&d.call(p,m)){var g=p[m],y=void 0;if(l&&g&&((y=Ee(g))||Oe(g))){var v=a[m];y?Ee(v)||(v=[]):Oe(v)||(v={}),g=et(l,v,g)}void 0!==g&&(a[m]=g)}}return a}function tt(e){var t={};return Se(e,(function(e,n){t[e]=n,t[n]=e})),Be(t)}var nt=tt({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}),rt="constructor",it="prototype",ot="function",st="_dynInstFuncs",at="_isDynProxy",ct="_dynClass",lt="_dynInstChk",ut=lt,dt="_dfOpts",pt="_unknown_",ht="__proto__",ft="_dyn"+ht,mt="_dynInstProto",gt="useBaseInst",yt="setInstFuncs",vt=Object,bt=vt.getPrototypeOf,St=vt.getOwnPropertyNames,wt=0;function Tt(e,t){return e&&vt[it].hasOwnProperty.call(e,t)}function _t(e){return e&&(e===vt[it]||e===Array[it])}function Et(e){return _t(e)||e===Function[it]}function Ct(e){var t;if(e){if(bt)return bt(e);var n=e[ht]||e[it]||(e[rt]?e[rt][it]:null);t=e[ft]||n,Tt(e,ft)||(delete e[mt],t=e[ft]=e[mt]||e[ft],e[mt]=n)}return t}function Rt(e,t){var n=[];if(St)n=St(e);else for(var r in e)"string"==typeof r&&Tt(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function xt(e,t,n){return t!==rt&&typeof e[t]===ot&&(n||Tt(e,t))}function It(e){throw new TypeError("DynamicProto: "+e)}function Ot(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function Pt(e,t,n,r,i){if(!_t(e)){var o=n[st]=n[st]||{},s=o[t]=o[t]||{};!1!==o[ut]&&(o[ut]=!!i),Rt(n,(function(t){xt(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!Tt(e,t)||e[t]&&!e[t][at])&&(e[t]=function(e,t){var n=function(){var r=function(e,t,n,r){var i=null;if(e&&Tt(n,ct)){var o=e[st]||{};if((i=(o[n[ct]]||{})[t])||It("Missing ["+t+"] "+ot),!i[lt]&&!1!==o[ut]){for(var s=!Tt(e,t),a=Ct(e),c=[];s&&a&&!Et(a)&&!Ot(c,a);){var l=a[t];if(l){s=l===r;break}c.push(a),a=Ct(a)}try{s&&(e[t]=i),i[lt]=1}catch{o[ut]=!1}}}return i}(this,t,e,n)||function(e,t,n){var r=t[e];return r===n&&(r=Ct(t)[e]),typeof r!==ot&&It("["+e+"] is not a "+ot),r}(t,e,n);return r.apply(this,arguments)};return n[at]=1,n}(e,t)))}))}}function Dt(e,t){return Tt(e,it)?e.name||t||pt:((e||{})[rt]||{}).name||t||pt}function At(e,t,n,r){Tt(e,it)||It("theClass is an invalid class definition.");var i=e[it];(function(e,t){if(bt){for(var n=[],r=Ct(t);r&&!Et(r)&&!Ot(n,r);){if(r===e)return!0;n.push(r),r=Ct(r)}return!1}return!0})(i,t)||It("["+Dt(e)+"] is not in class hierarchy of ["+Dt(t)+"]");var o=null;Tt(i,ct)?o=i[ct]:(o="_dynCls$"+Dt(e,"_")+"$"+wt,wt++,i[ct]=o);var s=At[dt],a=!!s[gt];a&&r&&void 0!==r[gt]&&(a=!!r[gt]);var c=function(e){var t={};return Rt(e,(function(n){!t[n]&&xt(e,n,!1)&&(t[n]=e[n])})),t}(t),l=function(e,t,n,r){function i(e,t,n){var i=t[n];if(i[at]&&r){var o=e[st]||{};!1!==o[ut]&&(i=(o[t[ct]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var o={};Rt(n,(function(e){o[e]=i(t,n,e)}));for(var s=Ct(e),a=[];s&&!Et(s)&&!Ot(a,s);)Rt(s,(function(e){!o[e]&&xt(s,e,!bt)&&(o[e]=i(t,s,e))})),a.push(s),s=Ct(s);return o}(i,t,c,a);n(t,l);var u=!!bt&&!!s[yt];u&&r&&(u=!!r[yt]),Pt(i,o,t,c,!1!==u)}At[dt]={setInstFuncs:!0,useBaseInst:!0};var Nt="window",kt="document",jt="navigator",qt="location",Mt="console",Lt="performance",Ft="JSON",Ut="crypto",Bt="msCrypto",zt="msie",Ht="trident/",Gt="XMLHttpRequest",Vt=null,Wt=null,$t=!1,Kt=null,Qt=null;function Jt(e,t){var n=!1;if(e){try{if(!(n=t in e)){var r=e[i];r&&(n=t in r)}}catch{}if(!n)try{n=!he((new e)[t])}catch{}}return n}function Xt(e){var t=h();return t&&t[e]?t[e]:e===Nt&&Yt()?window:null}function Yt(){return Boolean(typeof window===n&&window)}function Zt(){return Yt()?window:Xt(Nt)}function en(){return Boolean(typeof document===n&&document)}function tn(){return en()?document:Xt(kt)}function nn(){return Boolean(typeof navigator===n&&navigator)}function rn(){return nn()?navigator:Xt(jt)}function on(){return Boolean(typeof history===n&&history)}function sn(e){if(e&&$t){var t=Xt("__mockLocation");if(t)return t}return typeof location===n&&location?location:Xt(qt)}function an(){return typeof console!==r?console:Xt(Mt)}function cn(){return Xt(Lt)}function ln(){return Boolean(typeof JSON===n&&JSON||null!==Xt(Ft))}function un(){return ln()?JSON||Xt(Ft):null}function dn(){return Xt(Ut)}function pn(){return Xt(Bt)}function hn(){var e=rn();if(e&&(e.userAgent!==Wt||null===Vt)){var t=((Wt=e.userAgent)||b).toLowerCase();Vt=Te(t,zt)||Te(t,Ht)}return Vt}function fn(e){var t=Object[i].toString.call(e),n=b;return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":ln()&&(n=un().stringify(e)),t+n}function mn(){var e=!1;try{e=!!Xt(Gt)}catch{}return e}function gn(e,t){if(e)for(var n=0;n<e.length;n++){var r=e[n];if(r.name&&r.name===t)return r}return{}}function yn(e){var t=tn();return t&&e?gn(t.querySelectorAll("meta"),e).content:null}function vn(e){var t,n=cn();if(n){var r=n.getEntriesByType("navigation")||[];t=gn((r.length>0?r[0]:{}).serverTiming,e).description}return t}var bn,Sn=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],wn=null;function Tn(e,t){return function(){var n=arguments,r=_n(t);if(r){var i=r.listener;i&&i[e]&&i[e].apply(i,n)}}}function _n(e){var t=wn;return!t&&!0!==e.disableDbgExt&&(t=wn||function(){var e=Xt("Microsoft");return e&&(wn=e.ApplicationInsights),wn}()),t?t.ChromeDbgExt:null}function En(e){if(!bn){bn={};for(var t=0;t<Sn.length;t++)bn[Sn[t]]=Tn(Sn[t],e)}return bn}function Cn(e){return e?'"'+e.replace(/\"/g,b)+'"':b}function Rn(e,t){var n=an();if(n){var r="log";n[e]&&(r=e),ve(n[r])&&n[r](t)}}var xn=function(){function e(e,t,n,r){void 0===n&&(n=!1);var i=this;i.messageId=e,i.message=(n?"AI: ":"AI (Internal): ")+e;var o=b;ln()&&(o=un().stringify(r));var s=(t?" message:"+Cn(t):b)+(r?" props:"+Cn(o):b);i.message+=s}return e.dataType="MessageData",e}();function In(e,t){return(e||{}).logger||new On(t)}var On=function e(t){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={};At(e,this,(function(e){function i(e,n){var r=t[e];return fe(r)?n:r}function o(e,n){var r=_n(t);r&&r.diagLog&&r.diagLog(e,n)}fe(t)&&(t={}),e.consoleLoggingLevel=function(){return i("loggingLevelConsole",0)},e.telemetryLoggingLevel=function(){return i("loggingLevelTelemetry",1)},e.maxInternalMessageLimit=function(){return i("maxMessageLimit",25)},e.enableDebugExceptions=function(){return i("enableDebugExceptions",!1)},e.throwInternal=function(t,n,i,s,a){void 0===a&&(a=!1);var c=new xn(n,i,a,s);if(e.enableDebugExceptions())throw fn(c);var l=1===t?"errorToConsole":"warnToConsole";if(he(c.message))o("throw"+(1===t?"Critical":"Warning"),c);else{var u=e.consoleLoggingLevel();if(a){var d=+c.messageId;!r[d]&&u>=t&&(e[l](c.message),r[d]=!0)}else u>=t&&e[l](c.message);e.logInternalMessage(t,c)}},e.warnToConsole=function(e){Rn("warn",e),o("warning",e)},e.errorToConsole=function(e){Rn("error",e),o("error",e)},e.resetInternalMessageCount=function(){n=0,r={}},e.logInternalMessage=function(t,i){if(!(n>=e.maxInternalMessageLimit())){var s=!0,a="AITR_"+i.messageId;if(r[a]?s=!1:r[a]=!0,s&&(t<=e.telemetryLoggingLevel()&&(e.queue.push(i),n++,o(1===t?"error":"warn",i)),n===e.maxInternalMessageLimit())){var c="Internal events throttle limit per PageView reached for this app.",l=new xn(23,c,!1);e.queue.push(l),1===t?e.errorToConsole(c):e.warnToConsole(c)}}}}))};function Pn(e){return e||new On}function Dn(e,t,n,r,i,o){void 0===o&&(o=!1),(e||new On).throwInternal(t,n,r,i,o)}function An(e,t){Pn(e).warnToConsole(t)}var Nn="ctx",kn=null,jn=function(){function e(t,n,r){var i,o=this,s=!1;o.start=Ge(),o.name=t,o.isAsync=r,o.isChildEvt=function(){return!1},ve(n)&&(s=Fe(o,"payload",(function(){return!i&&ve(n)&&(i=n(),n=null),i}))),o.getCtx=function(t){return t?t===e.ParentContextKey||t===e.ChildrenContextKey?o[t]:(o[Nn]||{})[t]:null},o.setCtx=function(t,n){t&&(t===e.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=n):t===e.ChildrenContextKey?o[t]=n:(o[Nn]=o[Nn]||{})[t]=n)},o.complete=function(){var t=0,r=o.getCtx(e.ChildrenContextKey);if(Ee(r))for(var i=0;i<r.length;i++){var a=r[i];a&&(t+=a.time)}o.time=Ge()-o.start,o.exTime=o.time-t,o.complete=function(){},!s&&ve(n)&&(o.payload=n())}}return e.ParentContextKey="parent",e.ChildrenContextKey="childEvts",e}(),qn=function e(t){this.ctx={},At(e,this,(function(e){e.create=function(e,t,n){return new jn(e,t,n)},e.fire=function(e){e&&(e.complete(),t&&ve(t.perfEvent)&&t.perfEvent(e))},e.setCtx=function(t,n){t&&((e[Nn]=e[Nn]||{})[t]=n)},e.getCtx=function(t){return(e[Nn]||{})[t]}}))},Mn="CoreUtils.doPerf";function Ln(e,t,n,r,i){if(e){var o=e;if(ve(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var s=void 0,a=o.getCtx(Mn);try{if(s=o.create(t(),r,i)){if(a&&s.setCtx&&(s.setCtx(jn.ParentContextKey,a),a.getCtx&&a.setCtx)){var c=a.getCtx(jn.ChildrenContextKey);c||(c=[],a.setCtx(jn.ChildrenContextKey,c)),c.push(s)}return o.setCtx(Mn,s),n(s)}}catch(e){s&&s.setCtx&&s.setCtx("exception",e)}finally{s&&o.fire(s),o.setCtx(Mn,a)}}}return n()}function Fn(){return kn}var Un=4294967296,Bn=4294967295,zn=!1,Hn=123456789,Gn=987654321;function Vn(e){e<0&&(e>>>=0),Hn=123456789+e&Bn,Gn=987654321-e&Bn,zn=!0}function Wn(){try{var e=2147483647&Ge();Vn((Math.random()*Un^e)+e)}catch{}}function $n(e){return e>0?Math.floor(Kn()/Bn*(e+1))>>>0:0}function Kn(e){var t=0,n=dn()||pn();return n&&n.getRandomValues&&(t=n.getRandomValues(new Uint32Array(1))[0]&Bn),0===t&&hn()&&(zn||Wn(),t=Jn()&Bn),0===t&&(t=Math.floor(Un*Math.random()|0)),e||(t>>>=0),t}function Qn(e){e?Vn(e):Wn()}function Jn(e){var t=((Gn=36969*(65535&Gn)+(Gn>>16)&Bn)<<16)+(65535&(Hn=18e3*(65535&Hn)+(Hn>>16)&Bn))>>>0&Bn|0;return e||(t>>>=0),t}function Xn(e){void 0===e&&(e=22);for(var t=Kn()>>>0,n=0,r=b;r.length<e;)n++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&t),t>>>=6,5===n&&(t=(Kn()<<2&4294967295|3&t)>>>0,n=0);return r}var Yn=u,Zn="2.8.4",er="."+Xn(6),tr=0;function nr(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function rr(e,t){return void 0===t&&(t=!1),be(e+tr+++(t?"."+Zn:"")+er)}function ir(e){var t={id:rr("_aiData-"+(e||"")+"."+Zn),accept:function(e){return nr(e)},get:function(e,n,r,i){var o=e[t.id];return o?o[be(n)]:(i&&((o=function(e,t){var n=t[e.id];if(!n){n={};try{nr(t)&&(function(e,t,n){if(Yn)try{return Yn(e,t,{value:n,enumerable:!1,configurable:!0}),!0}catch{}return!1}(t,e.id,n)||(t[e.id]=n))}catch{}}return n}(t,e))[be(n)]=r),r)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch{}}};return t}var or="toGMTString",sr="toUTCString",ar="cookie",cr="expires",lr="enabled",ur="isCookieUseDisabled",dr="disableCookiesUsage",pr="_ckMgr",hr=null,fr=null,mr=null,gr=tn(),yr={},vr={};function br(e,t){var n=wr[pr]||vr[pr];return n||(n=wr[pr]=wr(e,t),vr[pr]=n),n}function Sr(e){return!e||e.isEnabled()}function wr(e,t){var n=function(e){var t=e.cookieCfg=e.cookieCfg||{};if(We(t,"domain",e.cookieDomain,me,fe),We(t,"path",e.cookiePath||"/",null,fe),fe(t[lr])){var n=void 0;he(e[ur])||(n=!e[ur]),he(e[dr])||(n=!e[dr]),t[lr]=n}return t}(e||vr),r=n.path||"/",i=n.domain,o=!1!==n[lr],s={isEnabled:function(){var e=o&&Tr(t),n=vr[pr];return e&&n&&s!==n&&(e=Sr(n)),e},setEnabled:function(e){o=!1!==e},set:function(e,t,o,a,c){var l=!1;if(Sr(s)){var u={},d=je(t||b),p=d.indexOf(";");if(-1!==p&&(d=je(t.substring(0,p)),u=_r(t.substring(p+1))),We(u,"domain",a||i,Qe,he),!fe(o)){var h=hn();if(he(u[cr])){var f=Ge()+1e3*o;if(f>0){var m=new Date;m.setTime(f),We(u,cr,Er(m,h?or:sr)||Er(m,h?or:sr)||b,Qe)}}h||We(u,"max-age",b+o,null,he)}var g=sn();g&&"https:"===g.protocol&&(We(u,"secure",null,null,he),null===fr&&(fr=!Ir((rn()||{}).userAgent)),fr&&We(u,"SameSite","None",null,he)),We(u,"path",c||r,null,he),(n.setCookie||xr)(e,Cr(d,u)),l=!0}return l},get:function(e){var t=b;return Sr(s)&&(t=(n.getCookie||Rr)(e)),t},del:function(e,t){var n=!1;return Sr(s)&&(n=s.purge(e,t)),n},purge:function(e,r){var i,o=!1;if(Tr(t)){var s=((i={}).path=r||"/",i[cr]="Thu, 01 Jan 1970 00:00:01 GMT",i);hn()||(s["max-age"]="0"),(n.delCookie||xr)(e,Cr(b,s)),o=!0}return o}};return s[pr]=s,s}function Tr(e){if(null===hr){hr=!1;try{hr=void 0!==(gr||{})[ar]}catch(t){Dn(e,2,68,"Cannot access document.cookie - "+Ve(t),{exception:fn(t)})}}return hr}function _r(e){var t={};return e&&e.length&&De(je(e).split(";"),(function(e){if(e=je(e||b)){var n=e.indexOf("=");-1===n?t[e]=null:t[je(e.substring(0,n))]=je(e.substring(n+1))}})),t}function Er(e,t){return ve(e[t])?e[t]():null}function Cr(e,t){var n=e||b;return Se(t,(function(e,t){n+="; "+e+(fe(t)?b:"="+t)})),n}function Rr(e){var t=b;if(gr){var n=gr[ar]||b;mr!==n&&(yr=_r(n),mr=n),t=je(yr[e]||b)}return t}function xr(e,t){gr&&(gr[ar]=e+"="+t)}function Ir(e){return!!Re(e)&&!!(Te(e,"CPU iPhone OS 12")||Te(e,"iPad; CPU OS 12")||Te(e,"Macintosh; Intel Mac OS X 10_14")&&Te(e,"Version/")&&Te(e,"Safari")||Te(e,"Macintosh; Intel Mac OS X 10_14")&&we(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Te(e,"Chrome/5")||Te(e,"Chrome/6")||Te(e,"UnrealEngine")&&!Te(e,"Chrome")||Te(e,"UCBrowser/12")||Te(e,"UCBrowser/11"))}var Or="on",Pr="attachEvent",Dr="addEventListener",Ar="detachEvent",Nr="removeEventListener",kr="events",jr="visibilitychange",qr="pagehide",Mr="pageshow",Lr="unload",Fr="beforeunload",Ur=rr("aiEvtPageHide"),Br=rr("aiEvtPageShow"),zr=/\.[\.]+/g,Hr=/[\.]+$/,Gr=1,Vr=ir("events"),Wr=/^([^.]*)(?:\.(.+)|)/;function $r(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function Kr(e,t){if(t){var n="";Ee(t)?(n="",De(t,(function(e){(e=$r(e))&&("."!==e[0]&&(e="."+e),n+=e)}))):n=$r(t),n&&("."!==n[0]&&(n="."+n),e=(e||"")+n)}var r=Wr.exec(e||"")||[];return{type:r[1],ns:(r[2]||"").replace(zr,".").replace(Hr,"").split(".").sort().join(".")}}function Qr(e,t,n){void 0===n&&(n=!0);var r=Vr.get(e,kr,{},n),i=r[t];return i||(i=r[t]=[]),i}function Jr(e,t,n,r){e&&t&&t.type&&(e[Nr]?e[Nr](t.type,n,r):e[Ar]&&e[Ar](Or+t.type,n))}function Xr(e,t,n,r){for(var i=t.length;i--;){var o=t[i];o&&(!n.ns||n.ns===o.evtName.ns)&&(!r||r(o))&&(Jr(e,o.evtName,o.handler,o.capture),t.splice(i,1))}}function Yr(e,t){return t?Kr("xx",Ee(t)?[e].concat(t):[e,t]).ns.split("."):e}function Zr(e,t,n,r,i){void 0===i&&(i=!1);var o=!1;if(e)try{var s=Kr(t,r);if(o=function(e,t,n,r){var i=!1;return e&&t&&t.type&&n&&(e[Dr]?(e[Dr](t.type,n,r),i=!0):e[Pr]&&(e[Pr](Or+t.type,n),i=!0)),i}(e,s,n,i),o&&Vr.accept(e)){var a={guid:Gr++,evtName:s,handler:n,capture:i};Qr(e,s.type).push(a)}}catch{}return o}function ei(e,t,n,r,i){if(void 0===i&&(i=!1),e)try{var o=Kr(t,r),s=!1;(function(e,t,n){if(t.type)Xr(e,Qr(e,t.type),t,n);else{var r=Vr.get(e,kr,{});Se(r,(function(r,i){Xr(e,i,t,n)})),0===Le(r).length&&Vr.kill(e,kr)}})(e,o,(function(e){return!((!o.ns||n)&&e.handler!==n||(s=!0,0))})),s||Jr(e,o,n,i)}catch{}}function ti(e,t,n,r){return void 0===r&&(r=!1),Zr(e,t,n,null,r)}function ni(e,t,n,r){void 0===r&&(r=!1),ei(e,t,n,null,r)}function ri(e,t,n){var r=!1,i=Zt();i&&(r=Zr(i,e,t,n),r=Zr(i.body,e,t,n)||r);var o=tn();return o&&(r=Zr(o,e,t,n)||r),r}function ii(e,t,n){var r=Zt();r&&(ei(r,e,t,n),ei(r.body,e,t,n));var i=tn();i&&ei(i,e,t,n)}function oi(e,t,n,r){var i=!1;return t&&e&&e.length>0&&De(e,(function(e){e&&(!n||-1===Ae(n,e))&&(i=ri(e,t,r)||i)})),i}function si(e,t,n,r){var i=!1;return t&&e&&Ee(e)&&!(i=oi(e,t,n,r))&&n&&n.length>0&&(i=oi(e,t,null,r)),i}function ai(e,t,n){e&&Ee(e)&&De(e,(function(e){e&&ii(e,t,n)}))}var ci,li=null,ui=r;function di(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(mi,(function(e){var t=0|$n(15);return("x"===e?t:3&t|8).toString(16)}))}function pi(){var e=cn();return e&&e.now?e.now():Ge()}function hi(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=b,r=0;r<4;r++)n+=t[15&(e=Kn())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+(3&Kn())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}var fi={_canUseCookies:void 0,isTypeof:pe,isUndefined:he,isNullOrUndefined:fe,hasOwnProperty:ge,isFunction:ve,isObject:ye,isDate:_e,isArray:Ee,isError:Ce,isString:Re,isNumber:xe,isBoolean:Ie,toISOString:Pe,arrForEach:De,arrIndexOf:Ae,arrMap:Ne,arrReduce:ke,strTrim:je,objCreate:m,objKeys:Le,objDefineAccessors:Fe,addEventHandler:ri,dateNow:Ge,isIE:hn,disableCookies:vi,newGuid:di,perfNow:pi,newId:Xn,randomValue:$n,random32:Kn,mwcRandomSeed:Qn,mwcRandom32:Jn,generateW3CId:hi},mi=/[xy]/g,gi={Attach:ti,AttachEvent:ti,Detach:ni,DetachEvent:ni};function yi(e,t){var n=br(e,t),r=fi._canUseCookies;return null===li&&(li=[],ci=r,Fe(fi,"_canUseCookies",(function(){return ci}),(function(e){ci=e,De(li,(function(t){t.setEnabled(e)}))}))),-1===Ae(li,n)&&li.push(n),Ie(r)&&n.setEnabled(r),Ie(ci)&&n.setEnabled(ci),n}function vi(){yi().setEnabled(!1)}var bi=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]*)?$/,Si="00",wi="ff",Ti="00000000000000000000000000000000",_i="0000000000000000";function Ei(e,t,n){return!(!e||e.length!==t||e===n||!e.match(/^[\da-f]*$/))}function Ci(e,t,n){return Ei(e,t)?e:n}function Ri(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t.length<2;)t="0"+t;return t}function xi(e){if(!e||(Ee(e)&&(e=e[0]||""),!e||!Re(e)||e.length>8192))return null;var t=bi.exec(je(e));return t&&t[1]!==wi&&t[2]!==Ti&&t[3]!==_i?{version:t[1],traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}function Ii(e){return Ei(e,32,Ti)}function Oi(e){return Ei(e,16,_i)}function Pi(e){return!!(e&&Ei(e.version,2,wi)&&Ei(e.traceId,32,Ti)&&Ei(e.spanId,16,_i)&&Ei(Ri(e.traceFlags),2))}var Di=ir("plugin");function Ai(e){return Di.get(e,"state",{},!0)}function Ni(e,t){for(var n,r=[],i=null,o=e.getNext();o;){var s=o.getPlugin();s&&(i&&ve(i[T])&&ve(s[S])&&i[T](s),(ve(s[_])?s[_]():(n=Ai(s))[_])||r.push(s),i=s,o=o.getNext())}De(r,(function(r){var i=e.core();r.initialize(e.getCfg(),i,t,e.getNext()),n=Ai(r),!r[C]&&!n[C]&&(n[C]=i),n[_]=!0,delete n[E]}))}function ki(e){return e.sort((function(e,t){var n=0;if(t){var r=ve(t[S]);ve(e[S])?n=r?e[w]-t[w]:1:r&&(n=-1)}else n=e?1:-1;return n}))}var ji="TelemetryPluginChain",qi="_hasRun",Mi="_getTelCtx",Li=0;function Fi(e,t,n,r){var i=null,o=[];null!==r&&(i=r?function(e,t,n){for(;e;){if(e.getPlugin()===n)return e;e=e.getNext()}return Hi([n],t.config||{},t)}(e,n,r):e);var s={_next:function(){var e=i;if(i=e?e.getNext():null,!e){var t=o;t&&t.length>0&&(De(t,(function(e){try{e.func.call(e.self,e.args)}catch(e){Dn(n.logger,2,73,"Unexpected Exception during onComplete - "+fn(e))}})),o=[])}return e},ctx:{core:function(){return n},diagLog:function(){return In(n,t)},getCfg:function(){return t},getExtCfg:a,getConfig:function(e,n,r){void 0===r&&(r=!1);var i,o=a(e,null);return o&&!fe(o[n])?i=o[n]:t&&!fe(t[n])&&(i=t[n]),fe(i)?r:i},hasNext:function(){return!!i},getNext:function(){return i},setNext:function(e){i=e},iterate:function(e){for(var t;t=s._next();){var n=t.getPlugin();n&&e(n)}},onComplete:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];e&&o.push({func:e,self:he(t)?s.ctx:t,args:n})}}};function a(e,n,r){var i;if(void 0===n&&(n={}),void 0===r&&(r=0),t){var o=t.extensionConfig;o&&e&&(i=o[e])}if(i){if(ye(n)&&0!==r){var s=et(!0,n,i);t&&2===r&&Se(n,(function(e){if(fe(s[e])){var n=t[e];fe(n)||(s[e]=n)}})),i=s}}else i=n;return i}return s}function Ui(e,t,n,r){var i=Fi(e,t,n,r),o=i.ctx;return o.processNext=function(e){var t=i._next();return t&&t.processTelemetry(e,o),!t},o.createNew=function(e,r){return void 0===e&&(e=null),Ee(e)&&(e=Hi(e,t,n,r)),Ui(e||o.getNext(),t,n,r)},o}function Bi(e,t,n){var r=t.config||{},i=Fi(e,r,t,n),o=i.ctx;return o.processNext=function(e){var t=i._next();return t&&t.unload(o,e),!t},o.createNew=function(e,n){return void 0===e&&(e=null),Ee(e)&&(e=Hi(e,r,t,n)),Bi(e||o.getNext(),t,n)},o}function zi(e,t,n){var r=t.config||{},i=Fi(e,r,t,n).ctx;return i.processNext=function(e){return i.iterate((function(t){ve(t.update)&&t.update(i,e)}))},i.createNew=function(e,n){return void 0===e&&(e=null),Ee(e)&&(e=Hi(e,r,t,n)),zi(e||i.getNext(),t,n)},i}function Hi(e,t,n,r){var i=null,o=!r;if(Ee(e)&&e.length>0){var s=null;De(e,(function(e){if(!o&&r===e&&(o=!0),o&&e&&ve(e.processTelemetry)){var a=function(e,t,n){var r,i=null,o=ve(e.processTelemetry),s=ve(e.setNextPlugin),a={getPlugin:function(){return e},getNext:function(){return i},processTelemetry:function(r,l){c(l=l||function(){var r;return e&&ve(e[Mi])&&(r=e[Mi]()),r||(r=Ui(a,t,n)),r}(),(function(t){if(!e||!o)return!1;var n=Ai(e);return!n.teardown&&!n[x]&&(s&&e.setNextPlugin(i),e.processTelemetry(r,t),!0)}),"processTelemetry",(function(){return{item:r}}),!r.sync)||l.processNext(r)},unload:function(t,n){c(t,(function(){var r=!1;if(e){var i=Ai(e),o=e[C]||i.core;e&&(!o||o===t[C]())&&!i[E]&&(i[C]=null,i[E]=!0,i[_]=!1,e[E]&&!0===e[E](t,n)&&(r=!0))}return r}),"unload",(function(){}),n.isAsync)||t.processNext(n)},update:function(t,n){c(t,(function(){var r=!1;if(e){var i=Ai(e),o=e[C]||i.core;e&&(!o||o===t[C]())&&!i[E]&&e[R]&&!0===e[R](t,n)&&(r=!0)}return r}),"update",(function(){}),!1)||t.processNext(n)},_id:r=e?e.identifier+"-"+e.priority+"-"+Li++:"Unknown-0-"+Li++,_setNext:function(e){i=e}};function c(t,n,o,s,a){var c=!1,l=e?e.identifier:ji,u=t[qi];return u||(u=t[qi]={}),t.setNext(i),e&&Ln(t[C](),(function(){return l+":"+o}),(function(){u[r]=!0;try{var e=i?i._id:b;e&&(u[e]=!1),c=n(t)}catch(e){var s=!i||u[i._id];s&&(c=!0),(!i||!s)&&Dn(t.diagLog(),1,73,"Plugin ["+l+"] failed during "+o+" - "+fn(e)+", run flags: "+fn(u))}}),s,a),c}return ze(a)}(e,t,n);i||(i=a),s&&s._setNext(a),s=a}}))}return r&&!i?Hi([r],t,n):i}var Gi="extensionConfig",Vi=500;function Wi(e,t,n,r){t&&Ee(t)&&t.length>0&&(De(t=t.sort((function(e,t){return e.priority-t.priority})),(function(e){e.priority<Vi&&Je("Channel has invalid priority - "+e.identifier)})),e.push({queue:ze(t),chain:Hi(t,n,r)}))}function $i(){var e=[];return{add:function(t){t&&e.push(t)},run:function(t,n){De(e,(function(e){try{e(t,n)}catch(e){Dn(t.diagLog(),2,73,"Unexpected error calling unload handler - "+fn(e))}})),e=[]}}}var Ki="getPlugin",Qi=function e(){var t,n,r,i,o,s=this;function a(e){void 0===e&&(e=null);var t=e;if(!t){var i=n||Ui(null,{},s.core);t=r&&r[Ki]?i.createNew(null,r[Ki]):i.createNew(null,r)}return t}function c(e,t,i){e&&We(e,Gi,[],null,fe),!i&&t&&(i=t.getProcessTelContext().getNext());var o=r;r&&r[Ki]&&(o=r[Ki]()),s.core=t,n=Ui(i,e,t,o)}function l(){t=!1,s.core=null,n=null,r=null,o=[],i=$i()}l(),At(e,s,(function(e){e.initialize=function(e,n,r,i){c(e,n,i),t=!0},e.teardown=function(t,n){var s=e.core;if(s&&(!t||s===t.core())){var a,c=!1,u=t||Bi(null,s,r&&r[Ki]?r[Ki]():r),d=n||{reason:0,isAsync:!1};return e[I]&&!0===e[I](u,d,p)?a=!0:p(),a}function p(){c||(c=!0,i.run(u,n),De(o,(function(e){e.rm()})),o=[],!0===a&&u.processNext(d),l())}},e.update=function(t,n){var i=e.core;if(i&&(!t||i===t.core())){var o,s=!1,a=t||zi(null,i,r&&r[Ki]?r[Ki]():r),l=n||{reason:0};return e._doUpdate&&!0===e._doUpdate(a,l,u)?o=!0:u(),o}function u(){s||(s=!0,c(a.getCfg(),a.core(),a.getNext()))}},e._addHook=function(e){e&&(Ee(e)?o=o.concat(e):o.push(e))},Ye(e,"_addUnloadCb",(function(){return i}),"add")})),s.diagLog=function(e){return a(e).diagLog()},s[_]=function(){return t},s.setInitialized=function(e){t=e},s[T]=function(e){r=e},s.processNext=function(e,t){t?t.processNext(e):r&&ve(r.processTelemetry)&&r.processTelemetry(e,null)},s._getTelCtx=a},Ji=function(e){function t(){var n,r,i=e.call(this)||this;function o(){n=0,r=[]}return i.identifier="TelemetryInitializerPlugin",i.priority=199,o(),At(t,i,(function(e,t){e.addTelemetryInitializer=function(e){var t={id:n++,fn:e};return r.push(t),{remove:function(){De(r,(function(e,n){if(e.id===t.id)return r.splice(n,1),-1}))}}},e.processTelemetry=function(t,n){for(var i=!1,o=r.length,s=0;s<o;++s){var a=r[s];if(a)try{if(!1===a.fn.apply(null,[t])){i=!0;break}}catch(e){Dn(n.diagLog(),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Ve(e),{exception:fn(e)},!0)}}i||e.processNext(t,n)},e[I]=function(){o()}})),i}return y(t,e),t}(Qi),Xi="Plugins must provide initialize method",Yi="_notificationManager",Zi="SDK is still unloading...",eo={loggingLevelConsole:1};function to(e,t){return new qn(t)}function no(e,t){var n=!1;return De(t,(function(t){if(t===e)return n=!0,-1})),n}var ro=function e(){var t,n,r,i,o,s,a,c,l,u,d,p,h,f,g,y,b,S,w,T=0;At(e,this,(function(e){function _(){t=!1,e.config=et(!0,{},eo),e.logger=new On(e.config),e._extensions=[],f=new Ji,n=[],r=null,i=null,o=null,s=null,a=null,l=null,c=[],u=null,d=null,p=null,h=!1,g=null,y=rr("AIBaseCore",!0),b=$i(),w=null}function C(){return Ui(A(),e.config,e)}function R(t,n){var r=function(e,t,n){var r=[],i={};return De(n,(function(t){(fe(t)||fe(t.initialize))&&Je(Xi);var n=t.priority,o=t.identifier;t&&n&&(fe(i[n])?i[n]=o:An(e,"Two extensions have same priority #"+n+" - "+i[n]+", "+o)),(!n||n<500)&&r.push(t)})),{all:n,core:r}}(e.logger,0,c);l=r.core,a=null;var i=r.all;if(p=ze(function(e,t,n,r){var i=[];if(e&&De(e,(function(e){return Wi(i,e,n,r)})),t){var o=[];De(t,(function(e){e.priority>Vi&&o.push(e)})),Wi(i,o,n,r)}return i}(d,i,t,e)),u){var o=Ae(i,u);-1!==o&&i.splice(o,1),-1!==(o=Ae(l,u))&&l.splice(o,1),u._setQueue(p)}else u=function(e,t){var n;function r(){return Ui(null,t.config,t,null)}function i(e,t,n,r){var i=e?e.length+1:1;function o(){0==--i&&(r&&r(),r=null)}i>0&&De(e,(function(e){if(e&&e.queue.length>0){var r=e.chain,s=t.createNew(r);s.onComplete(o),n(s)}else i--})),o()}var o=!1;return(n={identifier:"ChannelControllerPlugin",priority:Vi,initialize:function(t,n,r,i){o=!0,De(e,(function(e){e&&e.queue.length>0&&Ni(Ui(e.chain,t,n),r)}))},isInitialized:function(){return o},processTelemetry:function(t,n){i(e,n||r(),(function(e){e[O](t)}),(function(){n[O](t)}))},update:function(t,n){var r=n||{reason:0};return i(e,t,(function(e){e[O](r)}),(function(){t[O](r)})),!0}})[D]=function(){i(e,r(),(function(e){e.iterate((function(e){e[D]&&e[D]()}))}),null)},n[P]=function(){i(e,r(),(function(e){e.iterate((function(e){e[P]&&e[P]()}))}),null)},n[E]=function(t,n){var r=n||{reason:0,isAsync:!1};return i(e,t,(function(e){e[O](r)}),(function(){t[O](r),o=!1})),!0},n.getChannel=function(t){var n=null;return e&&e.length>0&&De(e,(function(e){if(e&&e.queue.length>0&&(De(e.queue,(function(e){if(e.identifier===t)return n=e,-1})),n))return-1})),n},n.flush=function(t,n,o,s){var a=1,c=!1,l=null;function u(){a--,c&&0===a&&(l&&(clearTimeout(l),l=null),n&&n(c),n=null)}return s=s||5e3,i(e,r(),(function(e){e.iterate((function(e){if(e.flush){a++;var n=!1;e.flush(t,(function(){n=!0,u()}),o)||n||(t&&null==l?l=setTimeout((function(){l=null,u()}),s):u())}}))}),(function(){c=!0,u()})),!0},n._setQueue=function(t){e=t},n}(p,e);i.push(u),l.push(u),e._extensions=ki(i),u.initialize(t,e,i),Ni(C(),i),e._extensions=ze(ki(l||[])).slice(),n&&function(t){var n=zi(A(),e);(!e._updateHook||!0!==e._updateHook(n,t))&&n.processNext(t)}(n)}function I(t){var n=null,r=null;return De(e._extensions,(function(e){if(e.identifier===t&&e!==u&&e!==f)return r=e,-1})),!r&&u&&(r=u.getChannel(t)),r&&(n={plugin:r,setEnabled:function(e){Ai(r)[x]=!e},isEnabled:function(){var e=Ai(r);return!e[E]&&!e[x]},remove:function(t,n){void 0===t&&(t=!0);var i=[r];L(i,{reason:1,isAsync:t},(function(t){t&&R(e.config,{reason:32,removed:i}),n&&n(t)}))}}),n}function A(){if(!a){var t=(l||[]).slice();-1===Ae(t,f)&&t.push(f),a=Hi(ki(t),e.config,e)}return a}function L(t,n,r){if(t&&t.length>0){var i=Bi(Hi(t,e.config,e),e);i.onComplete((function(){var e=!1,n=[];De(c,(function(r,i){no(r,t)?e=!0:n.push(r)})),c=n;var i=[];d&&(De(d,(function(n,r){var o=[];De(n,(function(n){no(n,t)?e=!0:o.push(n)})),i.push(o)})),d=i),r&&r(e)})),i.processNext(n)}else r(!1)}function F(){var t=e.logger?e.logger.queue:[];t&&(De(t,(function(t){var n={name:g||"InternalMessageId: "+t.messageId,iKey:e.config.instrumentationKey,time:Pe(new Date),baseType:xn.dataType,baseData:{message:t.message}};e.track(n)})),t.length=0)}function U(e,t,n,r){return u?u.flush(e,t,n||6,r):(t&&t(!1),!0)}function B(t){var n=e.logger;n?Dn(n,2,73,t):Je(t)}_(),e.isInitialized=function(){return t},e.initialize=function(n,i,s,a){h&&Je(Zi),e.isInitialized()&&Je("Core should not be initialized more than once"),(!n||fe(n.instrumentationKey))&&Je("Please provide instrumentation key"),r=a,e[Yi]=a,e.config=n||{},function(e){!0===e.disableDbgExt&&S&&(r[k](S),S=null),r&&!S&&!0!==e.disableDbgExt&&(S=En(e),r[N](S))}(n),function(t){!t.enablePerfMgr&&o&&(o=null),t.enablePerfMgr&&We(e.config,"createPerfMgr",to)}(n),n.extensions=fe(n.extensions)?[]:n.extensions,function(e){$e(e,Gi).NotificationManager=r}(n),s&&(e.logger=s),(c=[]).push.apply(c,v(v([],i),n.extensions)),d=(n||{}).channels,R(n,null),(!p||0===p.length)&&Je("No channels available"),t=!0,e.releaseQueue()},e.getTransmissionControls=function(){var e=[];return p&&De(p,(function(t){e.push(t.queue)})),ze(e)},e.track=function(t){We(t,"iKey",e.config.instrumentationKey,null,Ke),We(t,"time",Pe(new Date),null,Ke),We(t,"ver","4.0",null,fe),!h&&e.isInitialized()?C().processNext(t):n.push(t)},e.getProcessTelContext=C,e.getNotifyMgr=function(){return r||(r=function(){var e;return m(((e={})[N]=function(e){},e[k]=function(e){},e[j]=function(e){},e[q]=function(e,t){},e[M]=function(e,t){},e))}(),e[Yi]=r),r},e[N]=function(e){r&&r[N](e)},e[k]=function(e){r&&r[k](e)},e.getCookieMgr=function(){return s||(s=wr(e.config,e.logger)),s},e.setCookieMgr=function(e){s=e},e.getPerfMgr=function(){return!i&&!o&&e.config&&e.config.enablePerfMgr&&ve(e.config.createPerfMgr)&&(o=e.config.createPerfMgr(e,e.getNotifyMgr())),i||o||Fn()},e.setPerfMgr=function(e){i=e},e.eventCnt=function(){return n.length},e.releaseQueue=function(){if(t&&n.length>0){var e=n;n=[],De(e,(function(e){C().processNext(e)}))}},e.pollInternalLogs=function(t){g=t||null;var n=e.config.diagnosticLogInterval;return(!n||!(n>0))&&(n=1e4),T&&clearInterval(T),T=setInterval((function(){F()}),n)},e.stopPollingInternalLogs=function(){T&&(clearInterval(T),T=0,F())},Ze(e,(function(){return f}),["addTelemetryInitializer"]),e.unload=function(n,r,i){void 0===n&&(n=!0),t||Je("SDK is not initialized"),h&&Je(Zi);var o={reason:50,isAsync:n,flushComplete:!1},s=Bi(A(),e);function a(t){o.flushComplete=t,h=!0,b.run(s,o),e.stopPollingInternalLogs(),s.processNext(o)}s.onComplete((function(){_(),r&&r(o)}),e),U(n,a,6,i)||a(!1)},e.getPlugin=I,e.addPlugin=function(t,n,r,i){if(!t)return i&&i(!1),void B(Xi);var o=I(t.identifier);if(o&&!n)return i&&i(!1),void B("Plugin ["+t.identifier+"] is already loaded!");var s={reason:16};function a(n){c.push(t),s.added=[t],R(e.config,s),i&&i(!0)}if(o){var l=[o.plugin];L(l,{reason:2,isAsync:!!r},(function(e){e?(s.removed=l,s.reason|=32,a()):i&&i(!1)}))}else a()},e.evtNamespace=function(){return y},e.flush=U,e.getTraceCtx=function(e){return w||(w=function(e){var t={};return{getName:function(){return t.name},setName:function(e){t.name=e},getTraceId:function(){return t.traceId},setTraceId:function(e){Ii(e)&&(t.traceId=e)},getSpanId:function(){return t.spanId},setSpanId:function(e){Oi(e)&&(t.spanId=e)},getTraceFlags:function(){return t.traceFlags},setTraceFlags:function(e){t.traceFlags=e}}}()),w},e.setTraceCtx=function(e){w=e||null},Ye(e,"addUnloadCb",(function(){return b}),"add")}))};function io(e,t,n,r){De(e,(function(e){if(e&&e[t])if(n)setTimeout((function(){return r(e)}),0);else try{r(e)}catch{}}))}var oo=function e(t){this.listeners=[];var n=!!(t||{}).perfEvtsSendAll;At(e,this,(function(e){e[N]=function(t){e.listeners.push(t)},e[k]=function(t){for(var n=Ae(e.listeners,t);n>-1;)e.listeners.splice(n,1),n=Ae(e.listeners,t)},e[j]=function(t){io(e.listeners,j,!0,(function(e){e[j](t)}))},e[q]=function(t,n){io(e.listeners,q,!0,(function(e){e[q](t,n)}))},e[M]=function(t,n){io(e.listeners,M,n,(function(e){e[M](t,n)}))},e[L]=function(t){t&&(n||!t.isChildEvt())&&io(e.listeners,L,!1,(function(e){t.isAsync?setTimeout((function(){return e[L](t)}),0):e[L](t)}))}}))},so=function(e){function t(){var n=e.call(this)||this;return At(t,n,(function(e,t){function n(t){var n=e.getNotifyMgr();n&&n.eventsDiscarded([t],2)}e.initialize=function(e,n,r,i){t.initialize(e,n,r||new On(e),i||new oo(e))},e.track=function(r){Ln(e.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){null===r&&(n(r),Je("Invalid telemetry item")),function(e){fe(e.name)&&(n(e),Je("telemetry name required"))}(r),t.track(r)}),(function(){return{item:r}}),!r.sync)}})),n}return y(t,e),t}(ro),ao=tt({CRITICAL:1,WARNING:2}),co=tt({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105,InstrumentationKeyDeprecation:106}),lo="_aiHooks",uo=["req","rsp","hkErr","fnErr"];function po(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function ho(e,t,n,r,i){i>=0&&i<=2&&po(e,(function(e,o){var s=e.cbks,a=s[uo[i]];if(a){t.ctx=function(){return r[o]=r[o]||{}};try{a.apply(t.inst,n)}catch(e){var c=t.err;try{var l=s[uo[2]];l&&(t.err=e,l.apply(t.inst,n))}catch{}finally{t.err=c}}}}))}function fo(e,t,n){var r=null;return e&&(ge(e,t)?r=e:n&&(r=fo(de(e),t,!1))),r}function mo(e,t,n,r){var i=n&&n[lo];if(!i){var o=function(e){return function(){var t=arguments,n=e.h,r={name:e.n,inst:this,ctx:null,set:function(e,n){(t=s([],t))[e]=n,o=s([r],t)}},i=[],o=s([r],t);function s(e,t){return po(t,(function(t){e.push(t)})),e}r.evt=Xt("event"),ho(n,r,o,i,0);var a=e.f;if(a)try{r.rslt=a.apply(this,t)}catch(e){throw r.err=e,ho(n,r,o,i,3),e}return ho(n,r,o,i,1),r.rslt}}(i={i:0,n:t,f:n,h:[]});o[lo]=i,e[t]=o}var s={id:i.i,cbks:r,rm:function(){var e=this.id;po(i.h,(function(t,n){if(t.id===e)return i.h.splice(n,1),1}))}};return i.i++,i.h.push(s),s}function go(e,n,r,i){if(void 0===i&&(i=!0),e&&n&&r){var o=fo(e,n,i);if(o){var s=o[n];if(typeof s===t)return mo(o,n,s,r)}}return null}function yo(e,t,n,r){void 0===r&&(r=!0);var i=null;return po(t,(function(t){var o=go(e,t,n,r);o&&(i||(i=[]),i.push(o))})),i}e.AppInsightsCore=so,e.BaseCore=ro,e.BaseTelemetryPlugin=Qi,e.CoreUtils=fi,e.DiagnosticLogger=On,e.EventHelper=gi,e.EventsDiscardedReason=nt,e.InstrumentEvent=function(e,t,n,r){if(e&&t&&n){var i=fo(e,t,r)||e;if(i)return mo(i,t,i[t],n)}return null},e.InstrumentFunc=go,e.InstrumentFuncs=yo,e.InstrumentProto=function(e,t,n){return e?go(e[i],t,n,!1):null},e.InstrumentProtos=function(e,t,n){return e?yo(e[i],t,n,!1):null},e.LoggingSeverity=ao,e.MinChannelPriorty=100,e.NotificationManager=oo,e.PerfEvent=jn,e.PerfManager=qn,e.ProcessTelemetryContext=function(e,t,n,r){var i=Ui(e,t,n,r);Ze(this,i,Le(i))},e.Undefined=ui,e._InternalLogMessage=xn,e._InternalMessageId=co,e.__getRegisteredEvents=function(e,t,n){var r=[],i=Vr.get(e,kr,{},!1),o=Kr(t,n);return Se(i,(function(e,t){De(t,(function(e){(!o.type||o.type===e.evtName.type)&&(!o.ns||o.ns==o.ns)&&r.push({name:e.evtName.type+(e.evtName.ns?"."+e.evtName.ns:""),handler:e.handler})}))})),r},e._legacyCookieMgr=yi,e._logInternalMessage=function(e,t,n){Pn(e).logInternalMessage(t,n)},e._throwInternal=Dn,e._warnToConsole=An,e.addEventHandler=ri,e.addEventListeners=si,e.addPageHideEventListener=function e(t,n,r){var i=Yr(Ur,r),o=oi([qr],t,n,i);return(!n||-1===Ae(n,jr))&&(o=oi([jr],(function(e){var n=tn();t&&n&&"hidden"===n.visibilityState&&t(e)}),n,i)||o),!o&&n&&(o=e(t,null,r)),o},e.addPageShowEventListener=function e(t,n,r){var i=Yr(Br,r),o=oi([Mr],t,n,i);return!(o=oi([jr],(function(e){var n=tn();t&&n&&"visible"===n.visibilityState&&t(e)}),n,i)||o)&&n&&(o=e(t,null,r)),o},e.addPageUnloadEventListener=function(e,t,n){return si([Fr,Lr,qr],e,t,n)},e.areCookiesSupported=Tr,e.arrForEach=De,e.arrIndexOf=Ae,e.arrMap=Ne,e.arrReduce=ke,e.attachEvent=ti,e.canUseCookies=function(e){return yi(null,e).isEnabled()},e.createClassFromInterface=function(e){return function(){var t=this;e&&Se(e,(function(e,n){t[e]=n}))}},e.createCookieMgr=wr,e.createEnumMap=function(e){var t={};return Se(e,(function(e,n){t[e]=e,t[n]=e})),Be(t)},e.createEnumStyle=tt,e.createProcessTelemetryContext=Ui,e.createTraceParent=function(e,t,n,r){return{version:Ei(r,2,wi)?r:Si,traceId:Ii(e)?e:hi(),spanId:Oi(t)?t:hi().substr(0,16),traceFlags:n>=0&&n<=255?n:1}},e.createUniqueNamespace=rr,e.createUnloadHandlerContainer=$i,e.createValueMap=function(e){var t={};return Se(e,(function(e,n){t[e]=n[1],t[n[0]]=n[1]})),Be(t)},e.dateNow=Ge,e.deepFreeze=Be,e.deleteCookie=function(e,t){return yi(null,e).del(t)},e.detachEvent=ni,e.disableCookies=vi,e.doPerf=Ln,e.dumpObj=fn,e.eventOff=ei,e.eventOn=Zr,e.findMetaTag=yn,e.findNamedServerTiming=vn,e.findW3cTraceParent=function(){var e="traceparent",t=xi(yn(e));return t||(t=xi(vn(e))),t},e.formatTraceParent=function(e){if(e){var t=Ri(e.traceFlags);Ei(t,2)||(t="01");var n=e.version||Si;return"00"!==n&&"ff"!==n&&(n=Si),"".concat(n,"-").concat(Ci(e.traceId,32,Ti),"-").concat(Ci(e.spanId,16,_i),"-").concat(t)}return""},e.generateW3CId=hi,e.getConsole=an,e.getCookie=function(e,t){return yi(null,e).get(t)},e.getCrypto=dn,e.getDebugExt=_n,e.getDebugListener=En,e.getDocument=tn,e.getExceptionName=Ve,e.getGblPerfMgr=Fn,e.getGlobal=h,e.getGlobalInst=Xt,e.getHistory=function(){return on()?history:Xt("history")},e.getIEVersion=function(e){if(void 0===e&&(e=null),!e){var t=rn()||{};e=t?(t.userAgent||b).toLowerCase():b}var n=(e||b).toLowerCase();if(Te(n,zt)){var r=tn()||{};return Math.max(parseInt(n.split(zt)[1]),r.documentMode||0)}if(Te(n,Ht)){var i=parseInt(n.split(Ht)[1]);if(i)return i+4}return null},e.getJSON=un,e.getLocation=sn,e.getMsCrypto=pn,e.getNavigator=rn,e.getPerformance=cn,e.getSetValue=$e,e.getWindow=Zt,e.hasDocument=en,e.hasHistory=on,e.hasJSON=ln,e.hasNavigator=nn,e.hasOwnProperty=ge,e.hasWindow=Yt,e.initializePlugins=Ni,e.isArray=Ee,e.isBeaconsSupported=function(){return null===Qt&&(Qt=nn()&&Boolean(rn().sendBeacon)),Qt},e.isBoolean=Ie,e.isDate=_e,e.isError=Ce,e.isFetchSupported=function(e){var t=!1;try{t=!!Xt("fetch");var n=Xt("Request");t&&e&&n&&(t=Jt(n,"keepalive"))}catch{}return t},e.isFunction=ve,e.isIE=hn,e.isNotNullOrUndefined=me,e.isNotTruthy=Ke,e.isNotUndefined=function(e){return!he(e)},e.isNullOrUndefined=fe,e.isNumber=xe,e.isObject=ye,e.isReactNative=function(){var e=rn();return!(!e||!e.product)&&"ReactNative"===e.product},e.isSafari=function(e){if(!e||!Re(e)){var t=rn()||{};e=t?(t.userAgent||b).toLowerCase():b}return(e||b).toLowerCase().indexOf("safari")>=0},e.isSampledFlag=function(e){return!!Pi(e)&&1==(1&e.traceFlags)},e.isString=Re,e.isSymbol=function(e){return"symbol"==typeof e},e.isTruthy=Qe,e.isTypeof=pe,e.isUndefined=he,e.isValidSpanId=Oi,e.isValidTraceId=Ii,e.isValidTraceParent=Pi,e.isXhrSupported=mn,e.mergeEvtNamespace=Yr,e.mwcRandom32=Jn,e.mwcRandomSeed=Qn,e.newGuid=di,e.newId=Xn,e.normalizeJsName=be,e.objCreate=m,e.objDefineAccessors=Fe,e.objExtend=et,e.objForEachKey=Se,e.objFreeze=ze,e.objKeys=Le,e.objSeal=He,e.objToString=function(e){return ie.call(e)},e.optimizeObject=function(e){return e&&c&&(e=s(c({},e))),e},e.parseTraceParent=xi,e.perfNow=pi,e.proxyAssign=function(e,t,n){if(e&&t&&ye(e)&&ye(t)){var r=function(r){if(Re(r)){var i=t[r];ve(i)?(!n||n(r,!0,t,e))&&(e[r]=Xe(t,r)):(!n||n(r,!1,t,e))&&(ge(e,r)&&delete e[r],Fe(e,r,(function(){return t[r]}),(function(e){t[r]=e}))||(e[r]=i))}};for(var i in t)r(i)}return e},e.proxyFunctionAs=Ye,e.proxyFunctions=Ze,e.random32=Kn,e.randomValue=$n,e.removeEventHandler=ii,e.removeEventListeners=ai,e.removePageHideEventListener=function(e,t){var n=Yr(Ur,t);ai([qr],e,n),ai([jr],null,n)},e.removePageShowEventListener=function(e,t){var n=Yr(Br,t);ai([Mr],e,n),ai([jr],null,n)},e.removePageUnloadEventListener=function(e,t){ai([Fr,Lr,qr],e,t)},e.safeGetCookieMgr=function(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var r=t.cookieCfg;n=r[pr]?r[pr]:wr(t)}return n||(n=br(t,(e||{}).logger)),n},e.safeGetLogger=In,e.setCookie=function(e,t,n,r){yi(null,e).set(t,n,null,r)},e.setEnableEnvMocks=function(e){$t=e},e.setGblPerfMgr=function(e){kn=e},e.setValue=We,e.sortPlugins=ki,e.strContains=Te,e.strEndsWith=we,e.strFunction=t,e.strObject=n,e.strPrototype=i,e.strStartsWith=function(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=te?e[B](t):function(e,t){var n=!1,r=t?t.length:0;if(e&&r&&e.length>=r&&!(n=e===t)){for(var i=0;i<r;i++)if(e[i]!==t[i])return!1;n=!0}return n}(e,t)),n},e.strTrim=je,e.strUndefined=r,e.throwError=Je,e.toISOString=Pe,e.uaDisallowsSameSiteNone=Ir,e.unloadComponents=function(e,t,n,r){var i=0;return function r(){for(;i<e.length;){var o=e[i++];if(o){var s=o._doUnload||o[I];if(ve(s)&&!0===s.call(o,t,n,r))return!0}}}()},e.useXDomainRequest=function(){return null===Kt&&(Kt=typeof XDomainRequest!==r)&&mn()&&(Kt=Kt&&!Jt(Xt(Gt),"withCredentials")),Kt},function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof n&&typeof s<"u"?a(n):(i=[t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))})),C=S(((i,s)=>{var a;a=function(){"use strict";var e="constructor",t="prototype",n="function",r="_dynInstFuncs",i="_isDynProxy",o="_dynClass",s="_dynInstChk",a=s,c="_dfOpts",l="_unknown_",u="__proto__",d="_dyn"+u,p="_dynInstProto",h="useBaseInst",f="setInstFuncs",m=Object,g=m.getPrototypeOf,y=m.getOwnPropertyNames,v=0;function b(e,n){return e&&m[t].hasOwnProperty.call(e,n)}function S(e){return e&&(e===m[t]||e===Array[t])}function w(e){return S(e)||e===Function[t]}function T(n){var r;if(n){if(g)return g(n);var i=n[u]||n[t]||(n[e]?n[e][t]:null);r=n[d]||i,b(n,d)||(delete n[p],r=n[d]=n[p]||n[d],n[p]=i)}return r}function _(e,t){var n=[];if(y)n=y(e);else for(var r in e)"string"==typeof r&&b(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function E(t,r,i){return r!==e&&typeof t[r]===n&&(i||b(t,r))}function C(e){throw new TypeError("DynamicProto: "+e)}function R(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function x(e,t,c,l,u){if(!S(e)){var d=c[r]=c[r]||{},p=d[t]=d[t]||{};!1!==d[a]&&(d[a]=!!u),_(c,(function(t){E(c,t,!1)&&c[t]!==l[t]&&(p[t]=c[t],delete c[t],(!b(e,t)||e[t]&&!e[t][i])&&(e[t]=function(e,t){var c=function(){var i=function(e,t,i,c){var l=null;if(e&&b(i,o)){var u=e[r]||{};if((l=(u[i[o]]||{})[t])||C("Missing ["+t+"] "+n),!l[s]&&!1!==u[a]){for(var d=!b(e,t),p=T(e),h=[];d&&p&&!w(p)&&!R(h,p);){var f=p[t];if(f){d=f===c;break}h.push(p),p=T(p)}try{d&&(e[t]=l),l[s]=1}catch{u[a]=!1}}}return l}(this,t,e,c)||function(e,t,r){var i=t[e];return i===r&&(i=T(t)[e]),typeof i!==n&&C("["+e+"] is not a "+n),i}(t,e,c);return i.apply(this,arguments)};return c[i]=1,c}(e,t)))}))}}function I(n,r){return b(n,t)?n.name||r||l:((n||{})[e]||{}).name||r||l}function O(e,n,s,l){b(e,t)||C("theClass is an invalid class definition.");var u=e[t];(function(e,t){if(g){for(var n=[],r=T(t);r&&!w(r)&&!R(n,r);){if(r===e)return!0;n.push(r),r=T(r)}return!1}return!0})(u,n)||C("["+I(e)+"] is not in class hierarchy of ["+I(n)+"]");var d=null;b(u,o)?d=u[o]:(d="_dynCls$"+I(e,"_")+"$"+v,v++,u[o]=d);var p=O[c],m=!!p[h];m&&l&&void 0!==l[h]&&(m=!!l[h]);var y=function(e){var t={};return _(e,(function(n){!t[n]&&E(e,n,!1)&&(t[n]=e[n])})),t}(n),S=function(e,t,n,s){function c(e,t,n){var c=t[n];if(c[i]&&s){var l=e[r]||{};!1!==l[a]&&(c=(l[t[o]]||{})[n]||c)}return function(){return c.apply(e,arguments)}}var l={};_(n,(function(e){l[e]=c(t,n,e)}));for(var u=T(e),d=[];u&&!w(u)&&!R(d,u);)_(u,(function(e){!l[e]&&E(u,e,!g)&&(l[e]=c(t,u,e))})),d.push(u),u=T(u);return l}(u,n,y,m);s(n,S);var P=!!g&&!!p[f];P&&l&&(P=!!l[f]),x(u,d,n,y,!1!==P)}return O[c]={setInstFuncs:!0,useBaseInst:!0},O},"object"==typeof i&&typeof s<"u"?s.exports=a():void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o)})),R=S(((s,a)=>{var c;c=function(e,t,n,r){"use strict";var i,o,s=(o=r)&&"object"==typeof o&&"default"in o?o.default:o,a=n.createEnumStyle({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,CustomerContent_GenericContent:32}),c=n.createEnumStyle({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),l=n.createEnumStyle({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),u=n.createEnumStyle({Normal:1,Critical:2}),d=n.createEnumStyle({NONE:0,ERROR:1,WARNING:2,INFORMATION:3}),p=n.objFreeze(t.__assignFn(t.__assignFn({},n._InternalMessageId),n.createEnumStyle({AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}))),h="3.2.3",f="1DS-Web-JS-"+h,m="withCredentials",g=((i={})[0]=0,i[2]=6,i[1]=1,i[3]=7,i[4098]=6,i[4097]=1,i[4099]=7,i),y=null,v=Boolean(n.getDocument()),b=Boolean(n.getWindow());function S(e){return!(""===e||n.isNullOrUndefined(e))}function w(e){if(e){var t=e.indexOf("-");if(t>-1)return e.substring(0,t)}return""}function T(){return null===y&&(y=!n.isUndefined(Uint8Array)&&!function(){var e=n.getNavigator();if(!n.isUndefined(e)&&e.userAgent){var t=e.userAgent.toLowerCase();if((t.indexOf("safari")>=0||t.indexOf("firefox")>=0)&&t.indexOf("chrome")<0)return!0}return!1}()&&!n.isReactNative()),y}function _(e){return!!(e&&n.isNumber(e)&&e>=1&&e<=4)}function E(e,t,r){if(!t&&!S(t)||"string"!=typeof e)return null;var i=typeof t;if("string"===i||"number"===i||"boolean"===i||n.isArray(t))t={value:t};else if("object"!==i||t.hasOwnProperty("value")){if(n.isNullOrUndefined(t.value)||""===t.value||!n.isString(t.value)&&!n.isNumber(t.value)&&!n.isBoolean(t.value)&&!n.isArray(t.value))return null}else t={value:r?JSON.stringify(t):t};if(n.isArray(t.value)&&!j(t.value))return null;if(!n.isNullOrUndefined(t.kind)){if(n.isArray(t.value)||!k(t.kind))return null;t.value=t.value.toString()}return t}function C(e,t,r){var i=-1;if(!n.isUndefined(e))if(t>0&&(32===t?i=8192:t<=13&&(i=t<<5)),function(e){return e>=0&&e<=9}(r))-1===i&&(i=0),i|=r;else{var o=g[M(e)]||-1;-1!==i&&-1!==o?i|=o:6===o&&(i=o)}return i}function R(){n.safeGetCookieMgr(null).setEnabled(!1)}function x(e,t,r){n.areCookiesSupported(null)&&n.safeGetCookieMgr(null).set(e,t,86400*r,null,"/")}function I(e){n.areCookiesSupported(null)&&n.safeGetCookieMgr(null).del(e)}function O(e){return n.areCookiesSupported(null)?P(n.safeGetCookieMgr(null),e):""}function P(e,t,n){var r;return void 0===n&&(n=!0),e&&(r=e.get(t),n&&r&&decodeURIComponent&&(r=decodeURIComponent(r))),r||""}function D(e){void 0===e&&(e="D");var t=n.newGuid();return"B"===e?t="{"+t+"}":"P"===e?t="("+t+")":"N"===e&&(t=t.replace(/-/g,"")),t}function A(e,t,r,i,o){var s={},a=!1,c=0,l=arguments.length,u=arguments;for("[object Boolean]"===Object[n.strPrototype].toString.call(u[0])&&(a=u[0],c++);c<l;c++)e=u[c],n.objForEachKey(e,(function(e,t){a&&t&&n.isObject(t)?n.isArray(t)?(s[e]=s[e]||[],n.arrForEach(t,(function(t,r){t&&n.isObject(t)?s[e][r]=A(!0,s[e][r],t):s[e][r]=t}))):s[e]=A(!0,s[e],t):s[e]=t}));return s}var N=n.perfNow;function k(e){return 0===e||e>0&&e<=13||32===e}function j(e){return e.length>0}function q(e,t){var n=e;n.timings=n.timings||{},n.timings.processTelemetryStart=n.timings.processTelemetryStart||{},n.timings.processTelemetryStart[t]=N()}function M(e){var r=0;if(null!=e){var i=typeof e;"string"===i?r=1:"number"===i?r=2:"boolean"===i?r=3:i===t.strShimObject&&(r=4,n.isArray(e)?(r=4096,e.length>0&&(r|=M(e[0]))):n.hasOwnProperty(e,"value")&&(r=8192|M(e.value)))}return r}var L={Version:h,FullVersionString:f,strUndefined:n.strUndefined,strObject:n.strObject,Undefined:n.strUndefined,arrForEach:n.arrForEach,arrIndexOf:n.arrIndexOf,arrMap:n.arrMap,arrReduce:n.arrReduce,objKeys:n.objKeys,toISOString:n.toISOString,isReactNative:n.isReactNative,isString:n.isString,isNumber:n.isNumber,isBoolean:n.isBoolean,isFunction:n.isFunction,isArray:n.isArray,isObject:n.isObject,strTrim:n.strTrim,isDocumentObjectAvailable:v,isWindowObjectAvailable:b,isValueAssigned:S,getTenantId:w,isBeaconsSupported:n.isBeaconsSupported,isUint8ArrayAvailable:T,isLatency:_,sanitizeProperty:E,getISOString:n.toISOString,useXDomainRequest:n.useXDomainRequest,getCommonSchemaMetaData:C,cookieAvailable:n.areCookiesSupported,disallowsSameSiteNone:n.uaDisallowsSameSiteNone,setCookie:x,deleteCookie:I,getCookie:O,createGuid:D,extend:A,getTime:N,isValueKind:k,isArrayValid:j,objDefineAccessors:n.objDefineAccessors,addPageUnloadEventListener:n.addPageUnloadEventListener,setProcessTelemetryTimings:q,addEventHandler:n.addEventHandler,getFieldValueType:M,strEndsWith:n.strEndsWith,objForEachKey:n.objForEachKey},F={_canUseCookies:void 0,isTypeof:n.isTypeof,isUndefined:n.isUndefined,isNullOrUndefined:n.isNullOrUndefined,hasOwnProperty:n.hasOwnProperty,isFunction:n.isFunction,isObject:n.isObject,isDate:n.isDate,isArray:n.isArray,isError:n.isError,isString:n.isString,isNumber:n.isNumber,isBoolean:n.isBoolean,toISOString:n.toISOString,arrForEach:n.arrForEach,arrIndexOf:n.arrIndexOf,arrMap:n.arrMap,arrReduce:n.arrReduce,strTrim:n.strTrim,objCreate:t.objCreateFn,objKeys:n.objKeys,objDefineAccessors:n.objDefineAccessors,addEventHandler:n.addEventHandler,dateNow:n.dateNow,isIE:n.isIE,disableCookies:R,newGuid:n.newGuid,perfNow:n.perfNow,newId:n.newId,randomValue:n.randomValue,random32:n.random32,mwcRandomSeed:n.mwcRandomSeed,mwcRandom32:n.mwcRandom32,generateW3CId:n.generateW3CId},U="version",B="properties",z=function(e){function r(){var t=e.call(this)||this;return t.pluginVersionStringArr=[],t.pluginVersionString="",s(r,t,(function(e,t){(!e.logger||!e.logger.queue)&&(e.logger=new n.DiagnosticLogger({loggingLevelConsole:1})),e.initialize=function(r,i,o,s){n.doPerf(e,(function(){return"AppInsightsCore.initialize"}),(function(){if(r){r.endpointUrl||(r.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/");var a=r.propertyStorageOverride;if(a&&(!a.getProperty||!a.setProperty))throw new Error("Invalid property storage override passed.");r.channels&&n.arrForEach(r.channels,(function(t){t&&n.arrForEach(t,(function(t){if(t.identifier&&t.version){var n=t.identifier+"="+t.version;e.pluginVersionStringArr.push(n)}}))}))}e.getWParam=function(){return typeof document<"u"?0:-1},i&&n.arrForEach(i,(function(t){if(t&&t.identifier&&t.version){var n=t.identifier+"="+t.version;e.pluginVersionStringArr.push(n)}})),e.pluginVersionString=e.pluginVersionStringArr.join(";");try{t.initialize(r,i,o,s),e.pollInternalLogs("InternalLog")}catch(t){var c=e.logger,l=n.dumpObj(t);-1!==l.indexOf("channels")&&(l+="\n - Channels must be provided through config.channels only!"),c.throwInternal(1,514,"SDK Initialization Failed - no telemetry will be sent: "+l)}}),(function(){return{config:r,extensions:i,logger:o,notificationManager:s}}))},e.track=function(r){n.doPerf(e,(function(){return"AppInsightsCore.track"}),(function(){var n=r;if(n){n.timings=n.timings||{},n.timings.trackStart=N(),_(n.latency)||(n.latency=1);var i=n.ext=n.ext||{};i.sdk=i.sdk||{},i.sdk.ver=f;var o=n.baseData=n.baseData||{};o[B]||(o[B]={});var s=o[B];s[U]||(s[U]=""),""!==e.pluginVersionString&&(s[U]=e.pluginVersionString)}t.track(n)}),(function(){return{item:r}}),!r.sync)}})),t}return t.__extendsFn(r,e),r}(n.AppInsightsCore),H=function(e){function r(){var t=e.call(this)||this;return s(r,t,(function(e,t){e.initialize=function(r,i,o,s){r&&!r.endpointUrl&&(r.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/"),e.getWParam=function(){return v?0:-1};try{t.initialize(r,i,o,s)}catch(t){n._throwInternal(e.logger,1,514,"Initialization Failed: "+n.dumpObj(t)+"\n - Note: Channels must be provided through config.channels only")}},e.track=function(e){var n=e;if(n){var r=n.ext=n.ext||{};r.sdk=r.sdk||{},r.sdk.ver=f}t.track(n)}})),t}return t.__extendsFn(r,e),r}(n.BaseCore),G=n.isFunction;function V(e,t,n){return function(r){e[t]=r,n()}}var W=function(){function e(t){var n=0,r=null,i=[];function o(){if(i.length>0){var e=i.slice();i=[],setTimeout((function(){for(var t=0,n=e.length;t<n;++t)try{e[t]()}catch{}}),0)}}function a(e){0===n&&(r=e,n=1,o())}function c(e){0===n&&(r=e,n=2,o())}s(e,this,(function(t){t.then=function(t,s){return new e((function(a,c){!function(t,s,a,c){i.push((function(){var i;try{(i=1===n?G(t)?t(r):r:G(s)?s(r):r)instanceof e?i.then(a,c):2!==n||G(s)?a(i):c(i)}catch(e){return void c(e)}})),0!==n&&o()}(t,s,a,c)}))},t.catch=function(e){return t.then(null,e)}})),function(){if(!G(t))throw new TypeError("ESPromise: resolvedFunc argument is not a Function");try{t(a,c)}catch(e){c(e)}}()}return e.resolve=function(t){return t instanceof e?t:t&&G(t.then)?new e((function(e,n){try{t.then(e,n)}catch(e){n(e)}})):new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){if(t&&t.length)return new e((function(e,n){try{for(var r=[],i=0,o=0;o<t.length;o++){var s=t[o];s&&G(s.then)?(i++,s.then(V(r,o,(function(){0==--i&&e(r)})),n)):r[o]=s}0===i&&setTimeout((function(){e(r)}),0)}catch(e){n(e)}}))},e.race=function(t){return new e((function(e,n){if(t&&t.length)try{for(var r=function(r){var i=t[r];i&&G(i.then)?i.then(e,n):setTimeout((function(){e(i)}),0)},i=0;i<t.length;i++)r(i)}catch(e){n(e)}}))},e}(),$=0,K=[],Q=[],J=[];function X(){return(new Date).getTime()}var Y=function(){function e(t,r){var i=0,o=(t||"<unnamed>")+"."+$;function a(e){var t=n.getGlobal();t&&t.QUnit&&console&&console.log("ESPromiseScheduler["+o+"] "+e)}function c(e){r&&r.warnToConsole("ESPromiseScheduler["+o+"] "+e)}$++,s(e,this,(function(e){var t=null,n=0;function r(e,t){for(var n=0;n<e.length;n++)if(e[n].id===t)return e.splice(n,1)[0];return null}e.scheduleEvent=function(e,s,l){var u=o+"."+n;n++,s&&(u+="-("+s+")");var d=u+"{"+i+"}";i++;var p,h,f,m={evt:null,tm:X(),id:d,isRunning:!1,isAborted:!1};return m.evt=t?(p=m,h=t,f=new W((function(e,t){var n=X()-h.tm,i=h.id;a("["+u+"] is waiting for ["+i+":"+n+" ms] to complete before starting -- ["+Q.length+"] waiting and ["+K.length+"] running"),p.abort=function(e){p.abort=null,r(Q,u),p.isAborted=!0,t(new Error(e))},h.evt.then((function(n){r(Q,u),w(p).then(e,t)}),(function(n){r(Q,u),w(p).then(e,t)}))})),Q.push(p),f):w(m),(t=m).evt._schId=d,m.evt;function g(e){for(var t=X(),n=t-6e5,r=e.length,i=0;i<r;){var o=e[i];if(o&&o.tm<n){var s=null;o.abort?(s="Aborting ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",o.abort(s)):s="Removing ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",c(s),e.splice(i,1),r--}else i++}}function y(e,n){var i=!1,o=r(K,e);if(o||(o=r(J,e),i=!0),o){o.to&&(clearTimeout(o.to),o.to=null);var s=X()-o.tm;n?i?c("Timed out event ["+e+"] finally complete -- "+s+" ms"):a("Promise ["+e+"] Complete -- "+s+" ms"):(J.push(o),c("Event ["+e+"] Timed out and removed -- "+s+" ms"))}else a("Failed to remove ["+e+"] from running queue");t&&t.id===e&&(t=null),g(K),g(Q),g(J)}function v(e,t){return function(n){return y(e,!0),t&&t(n),n}}function b(e,t,n,r){t.then((function(t){return t instanceof W?(a("Event ["+e+"] returned a promise -- waiting"),b(e,t,n,r),t):v(e,n)(t)}),v(e,r))}function S(e,t){var n=e.id;return new W((function(r,i){a("Event ["+n+"] Starting -- waited for "+(e.wTm||"--")+" ms"),e.isRunning=!0,e.abort=function(t){e.abort=null,e.isAborted=!0,y(n,!1),i(new Error(t))};var o=t(n);o instanceof W?(l&&(e.to=setTimeout((function(){y(n,!1),i(new Error("Timed out after ["+l+"] ms"))}),l)),b(n,o,(function(t){a("Event ["+n+"] Resolving after "+(X()-e.tm)+" ms"),r(t)}),i)):(a("Promise ["+n+"] Auto completed as the start action did not return a promise"),r())}))}function w(t){var n=X();return t.wTm=n-t.tm,t.tm=n,t.isAborted?W.reject(new Error("["+u+"] was aborted")):(K.push(t),S(t,e))}}}))}return e.incomplete=function(){return K},e.waitingToStart=function(){return Q},e}(),Z=function(){function e(e){var t=this,r={},i=[],o=[];function s(e,t){var s,a=r[e];if(a&&(s=a[t]),!s&&null!==s){if(n.isString(e)&&n.isString(t))if(o.length>0){for(var c=0;c<o.length;c++)if(o[c].handleField(e,t)){s={canHandle:!0,fieldHandler:o[c]};break}}else 0===i.length&&(s={canHandle:!0});if(!s&&null!==s)for(s=null,c=0;c<i.length;c++)if(i[c].handleField(e,t)){s={canHandle:!0,handler:i[c],fieldHandler:null};break}a||(a=r[e]={}),a[t]=s}return s}function a(e,t,r,i,o,s){if(e.handler)return e.handler.property(t,r,o,s);if(!n.isNullOrUndefined(o.kind)){if(4096==(4096&i)||!k(o.kind))return null;o.value=o.value.toString()}return l(e.fieldHandler,t,r,i,o)}function c(e,t,n){return S(n)?{value:n}:null}function l(e,r,i,o,s){if(s&&e){var a=e.getSanitizer(r,i,o,s.kind,s.propertyType);if(a)if(4===o){var u={},d=s.value;n.objForEachKey(d,(function(t,n){var o=r+"."+i;if(S(n)){var s=c(0,0,n);(s=l(e,o,t,M(n),s))&&(u[t]=s.value)}})),s.value=u}else{var p={path:r,name:i,type:o,prop:s,sanitizer:t};s=a.call(t,p)}}return s}e&&o.push(e),t.addSanitizer=function(e){e&&(i.push(e),r={})},t.addFieldSanitizer=function(e){e&&(o.push(e),r={})},t.handleField=function(e,t){var n=s(e,t);return!!n&&n.canHandle},t.value=function(e,t,r,i){var o=s(e,t);if(o&&o.canHandle){if(!o||!o.canHandle)return null;if(o.handler)return o.handler.value(e,t,r,i);if(!n.isString(t)||n.isNullOrUndefined(r)||""===r)return null;var l=null,u=M(r);if(8192==(8192&u)){var d=-8193&u;if(!S((l=r).value)||1!==d&&2!==d&&3!==d&&4096!=(4096&d))return null}else 1===u||2===u||3===u||4096==(4096&u)?l=c(0,0,r):4===u&&(l=c(0,0,i?JSON.stringify(r):r));if(l)return a(o,e,t,u,l,i)}return null},t.property=function(e,t,r,i){var o=s(e,t);if(!o||!o.canHandle||!n.isString(t)||n.isNullOrUndefined(r)||!S(r.value))return null;var c=M(r.value);return 0===c?null:a(o,e,t,c,r,i)}}return e.getFieldType=M,e}();e.BaseTelemetryPlugin=n.BaseTelemetryPlugin,e.DiagnosticLogger=n.DiagnosticLogger,e.EventHelper=n.EventHelper,e.EventsDiscardedReason=n.EventsDiscardedReason,e.InternalAppInsightsCore=n.AppInsightsCore,e.InternalBaseCore=n.BaseCore,e.LoggingSeverity=n.LoggingSeverity,e.MinChannelPriorty=n.MinChannelPriorty,e.NotificationManager=n.NotificationManager,e.PerfEvent=n.PerfEvent,e.PerfManager=n.PerfManager,e.ProcessTelemetryContext=n.ProcessTelemetryContext,e.Undefined=n.strUndefined,e._InternalLogMessage=n._InternalLogMessage,e._InternalMessageId=n._InternalMessageId,e.__getRegisteredEvents=n.__getRegisteredEvents,e._throwInternal=n._throwInternal,e.addEventHandler=n.addEventHandler,e.addEventListeners=n.addEventListeners,e.addPageHideEventListener=n.addPageHideEventListener,e.addPageShowEventListener=n.addPageShowEventListener,e.addPageUnloadEventListener=n.addPageUnloadEventListener,e.areCookiesSupported=n.areCookiesSupported,e.arrForEach=n.arrForEach,e.arrIndexOf=n.arrIndexOf,e.arrMap=n.arrMap,e.arrReduce=n.arrReduce,e.attachEvent=n.attachEvent,e.cookieAvailable=n.areCookiesSupported,e.createCookieMgr=n.createCookieMgr,e.createEnumStyle=n.createEnumStyle,e.createProcessTelemetryContext=n.createProcessTelemetryContext,e.createTraceParent=n.createTraceParent,e.createUniqueNamespace=n.createUniqueNamespace,e.createUnloadHandlerContainer=n.createUnloadHandlerContainer,e.dateNow=n.dateNow,e.detachEvent=n.detachEvent,e.disallowsSameSiteNone=n.uaDisallowsSameSiteNone,e.doPerf=n.doPerf,e.dumpObj=n.dumpObj,e.eventOff=n.eventOff,e.eventOn=n.eventOn,e.findW3cTraceParent=n.findW3cTraceParent,e.formatTraceParent=n.formatTraceParent,e.generateW3CId=n.generateW3CId,e.getConsole=n.getConsole,e.getCrypto=n.getCrypto,e.getDocument=n.getDocument,e.getExceptionName=n.getExceptionName,e.getGlobal=n.getGlobal,e.getGlobalInst=n.getGlobalInst,e.getHistory=n.getHistory,e.getIEVersion=n.getIEVersion,e.getISOString=n.toISOString,e.getJSON=n.getJSON,e.getLocation=n.getLocation,e.getMsCrypto=n.getMsCrypto,e.getNavigator=n.getNavigator,e.getPerformance=n.getPerformance,e.getSetValue=n.getSetValue,e.getWindow=n.getWindow,e.hasDocument=n.hasDocument,e.hasHistory=n.hasHistory,e.hasJSON=n.hasJSON,e.hasNavigator=n.hasNavigator,e.hasOwnProperty=n.hasOwnProperty,e.hasWindow=n.hasWindow,e.isArray=n.isArray,e.isBeaconsSupported=n.isBeaconsSupported,e.isBoolean=n.isBoolean,e.isDate=n.isDate,e.isError=n.isError,e.isFetchSupported=n.isFetchSupported,e.isFunction=n.isFunction,e.isIE=n.isIE,e.isNotTruthy=n.isNotTruthy,e.isNullOrUndefined=n.isNullOrUndefined,e.isNumber=n.isNumber,e.isObject=n.isObject,e.isReactNative=n.isReactNative,e.isSampledFlag=n.isSampledFlag,e.isString=n.isString,e.isTruthy=n.isTruthy,e.isTypeof=n.isTypeof,e.isUndefined=n.isUndefined,e.isValidSpanId=n.isValidSpanId,e.isValidTraceId=n.isValidTraceId,e.isValidTraceParent=n.isValidTraceParent,e.isXhrSupported=n.isXhrSupported,e.mergeEvtNamespace=n.mergeEvtNamespace,e.newGuid=n.newGuid,e.newId=n.newId,e.normalizeJsName=n.normalizeJsName,e.objCreate=n.objCreate,e.objDefineAccessors=n.objDefineAccessors,e.objForEachKey=n.objForEachKey,e.objFreeze=n.objFreeze,e.objKeys=n.objKeys,e.objSeal=n.objSeal,e.optimizeObject=n.optimizeObject,e.parseTraceParent=n.parseTraceParent,e.perfNow=n.perfNow,e.proxyAssign=n.proxyAssign,e.proxyFunctionAs=n.proxyFunctionAs,e.proxyFunctions=n.proxyFunctions,e.random32=n.random32,e.randomValue=n.randomValue,e.removeEventHandler=n.removeEventHandler,e.removeEventListeners=n.removeEventListeners,e.removePageHideEventListener=n.removePageHideEventListener,e.removePageShowEventListener=n.removePageShowEventListener,e.removePageUnloadEventListener=n.removePageUnloadEventListener,e.safeGetCookieMgr=n.safeGetCookieMgr,e.safeGetLogger=n.safeGetLogger,e.setEnableEnvMocks=n.setEnableEnvMocks,e.setValue=n.setValue,e.strContains=n.strContains,e.strEndsWith=n.strEndsWith,e.strFunction=n.strFunction,e.strObject=n.strObject,e.strPrototype=n.strPrototype,e.strStartsWith=n.strStartsWith,e.strTrim=n.strTrim,e.strUndefined=n.strUndefined,e.throwError=n.throwError,e.toISOString=n.toISOString,e.useXDomainRequest=n.useXDomainRequest,e.AppInsightsCore=z,e.BaseCore=H,e.CoreUtils=F,e.ESPromise=W,e.ESPromiseScheduler=Y,e.EventLatency=c,e.EventPersistence=u,e.EventPropertyType=l,e.FullVersionString=f,e.TraceLevel=d,e.Utils=L,e.ValueKind=a,e.ValueSanitizer=Z,e.Version=h,e._ExtendedInternalMessageId=p,e.createGuid=D,e.deleteCookie=I,e.disableCookies=R,e.extend=A,e.getCommonSchemaMetaData=C,e.getCookie=O,e.getCookieValue=P,e.getFieldValueType=M,e.getTenantId=w,e.getTime=N,e.isArrayValid=j,e.isChromium=function(){return!!n.getGlobalInst("chrome")},e.isDocumentObjectAvailable=v,e.isLatency=_,e.isUint8ArrayAvailable=T,e.isValueAssigned=S,e.isValueKind=k,e.isWindowObjectAvailable=b,e.openXhr=function(e,t,n,r,i,o){function s(e,t,n){try{e[t]=n}catch{}}void 0===r&&(r=!1),void 0===i&&(i=!1);var a=new XMLHttpRequest;return r&&s(a,"Microsoft_ApplicationInsights_BypassAjaxInstrumentation",r),n&&s(a,m,n),a.open(e,t,!i),n&&s(a,m,n),!i&&o&&s(a,"timeout",o),a},e.sanitizeProperty=E,e.setCookie=x,e.setProcessTelemetryTimings=q,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof s&&typeof a<"u"?c(s,_(),E(),C()):(i=[t,n(623),n(4719),n(2314)],void 0===(o="function"==typeof(r=c)?r.apply(t,i):r)||(e.exports=o))})),x=S(((n,s)=>{var a;a=function(e){"use strict";var t="function",n="object",r="undefined",i="prototype",o="hasOwnProperty",s="default",a=Object,c=a[i],l=a.assign,u=a.create,d=a.defineProperty,p=c[o],h=null;function f(e){return void 0===e&&(e=!0),(!h||!e)&&(typeof globalThis!==r&&globalThis&&(h=globalThis),typeof self!==r&&self&&(h=self),typeof window!==r&&window&&(h=window),typeof global!==r&&global&&(h=global)),h}function m(e){throw new TypeError(e)}function g(e){if(u)return u(e);if(null==e)return{};var r=typeof e;function o(){}return r!==n&&r!==t&&m("Object prototype may only be an Object:"+e),o[i]=e,new o}var y=(f()||{}).Symbol,v=(f()||{}).Reflect,b=!!v,S="decorate",w="metadata",T="getOwnPropertySymbols",_="iterator",E=l||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])c[o].call(t,i)&&(e[i]=t[i]);return e},C=function(e,t){return(C=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[o](n)&&(e[n]=t[n])})(e,t)};function R(e,n){function r(){this.constructor=e}typeof n!==t&&null!==n&&m("Class extends value "+String(n)+" is not a constructor or null"),C(e,n),e[i]=null===n?g(n):(r[i]=n[i],new r)}function x(e,t,n,r){void 0===r&&(r=n),u?d(e,r,{enumerable:!0,get:function(){return t[n]}}):e[r]=t[n]}e.ObjAssign=l,e.ObjClass=a,e.ObjCreate=u,e.ObjDefineProperty=d,e.ObjHasOwnProperty=p,e.ObjProto=c,e.__assignFn=E,e.__createBindingFn=x,e.__decorateFn=function(e,n,r,i){var o,s=arguments.length,c=s<3?n:null===i?i=a.getOwnPropertyDescriptor(n,r):i;if(b&&typeof v[S]===t)c=v[S](e,n,r,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(c=(s<3?o(c):s>3?o(n,r,c):o(n,r))||c);return s>3&&c&&d(n,r,c),c},e.__exportStarFn=function(e,t){for(var n in e)n!==s&&!p.call(t,n)&&x(t,e,n)},e.__exposeGlobalTsLib=function(){var e,t,n,r,i=f()||{};t=E,n=R,r=x,(e=i).__assign||(e.__assign=l||t),e.__extends||(e.__extends=n),e.__createBinding||(e.__createBinding=r),__assign||(__assign=i.__assign),__extends||(__extends=i.__extends),__createBinding||(__createBinding=i.__createBinding)},e.__extendsFn=R,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)n!==s&&Object.prototype.hasOwnProperty.call(e,n)&&x(t,e,n);return u?d(t,s,{enumerable:!0,value:e}):t[s]=e,t},e.__makeTemplateObjectFn=function(e,t){return d?d(e,"raw",{value:t}):e.raw=t,e},e.__metadataFn=function(e,n){if(b&&v[w]===t)return v[w](e,n)},e.__paramFn=function(e,t){return function(n,r){t(n,r,e)}},e.__readFn=function(e,n){var r=typeof y===t&&e[y[_]];if(!r)return e;var i,o,s=r.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var r={};for(var i in e)p.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&typeof a[T]===t)for(var o=0,s=a[T](e);o<s.length;o++)n.indexOf(s[o])<0&&c.propertyIsEnumerable.call(e,s[o])&&(r[s[o]]=e[s[o]]);return r},e.__spreadArrayFn=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},e.__spreadArraysFn=function(){for(var e=arguments,t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;var i=Array(t),o=0;for(n=0;n<r;n++)for(var s=e[n],a=0,c=s.length;a<c;a++,o++)i[o]=s[a];return i},e.__valuesFn=function(e){var n=typeof y===t&&y[_],r=n&&e[n],i=0;return r?r.call(e):e&&"number"==typeof e.length?{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}}:void m(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=f,e.objCreateFn=g,e.strDefault=s,e.strShimFunction=t,e.strShimHasOwnProperty=o,e.strShimObject=n,e.strShimPrototype=i,e.strShimUndefined=r,e.throwTypeError=m,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof n&&typeof s<"u"?a(n):(i=[t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))})),I=S(((s,a)=>{var c;c=function(e,t,n,r){"use strict";var i,o=(i=n)&&"object"==typeof i&&"default"in i?i.default:i,s="REAL_TIME",a="NEAR_REAL_TIME",c="BEST_EFFORT",l="POST",u="drop",d="requeue",p="application/x-json-stream",h="cache-control",f="content-type",m="kill-duration",g="time-delta-millis",y="client-version",v="client-id",b="time-delta-to-apply-millis",S="upload-time",w="apikey",T="AuthMsaDeviceTicket",_="AuthXToken",E="msfpc";function C(e){var t=(e.ext||{}).intweb;return t&&r.isValueAssigned(t[E])?t[E]:null}function R(e){for(var t=null,n=0;null===t&&n<e.length;n++)t=C(e[n]);return t}var x=function(){function e(t,n){var i=n?[].concat(n):[],o=this,s=R(i);o.iKey=function(){return t},o.Msfpc=function(){return s||""},o.count=function(){return i.length},o.events=function(){return i},o.addEvent=function(e){return!!e&&(i.push(e),s||(s=C(e)),!0)},o.split=function(n,o){var a;if(n<i.length){var c=i.length-n;r.isNullOrUndefined(o)||(c=o<c?o:c),a=i.splice(n,c),s=R(i)}return new e(t,a)}}return e.create=function(t,n){return new e(t,n)},e}(),I=2e6,O=Math.min(I,65e3),P="metadata",D="f",A=/\./,N=function e(t,n,i,s){var a="data",c="baseData",l=!!s,u=n,d={};o(e,this,(function(e){function n(e,t,o,s,a,c,p){r.objForEachKey(e,(function(e,h){var f=null;if(h||r.isValueAssigned(h)){var m=o,g=e,y=a,v=t;if(l&&!s&&A.test(e)){var b=e.split("."),S=b.length;if(S>1){y&&(y=y.slice());for(var w=0;w<S-1;w++){var T=b[w];v=v[T]=v[T]||{},m+="."+T,y&&y.push(T)}g=b[S-1]}}var _=s&&function(e,t){var n=d[e];return void 0===n&&(e.length>=7&&(n=r.strStartsWith(e,"ext.metadata")||r.strStartsWith(e,"ext.web")),d[e]=n),n}(m);if(f=!_&&u&&u.handleField(m,g)?u.value(m,g,h,i):r.sanitizeProperty(g,h,i)){var E=f.value;if(v[g]=E,c&&c(y,g,f),p&&"object"==typeof E&&!r.isArray(E)){var C=y;C&&(C=C.slice()).push(g),n(h,E,m+"."+g,s,C,c,p)}}}}))}e.createPayload=function(e,t,n,r,i,o){return{apiKeys:[],payloadBlob:"",overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:e,isTeardown:t,isSync:n,isBeacon:r,sendType:o,sendReason:i}},e.appendPayload=function(n,i,o){var s=n&&i&&!n.overflow;return s&&r.doPerf(t,(function(){return"Serializer:appendPayload"}),(function(){for(var t=i.events(),s=n.payloadBlob,a=n.numEvents,c=!1,l=[],u=[],d=n.isBeacon,p=d?65e3:3984588,h=d?O:I,f=0,m=0;f<t.length;){var g=t[f];if(g){if(a>=o){n.overflow=i.split(f);break}var y=e.getEventBlob(g);if(y&&y.length<=h){var v=y.length;if(s.length+v>p){n.overflow=i.split(f);break}s&&(s+="\n"),s+=y,++m>20&&(s.substr(0,1),m=0),c=!0,a++}else y?l.push(g):u.push(g),t.splice(f,1),f--}f++}if(l&&l.length>0&&n.sizeExceed.push(x.create(i.iKey(),l)),u&&u.length>0&&n.failedEvts.push(x.create(i.iKey(),u)),c){n.batches.push(i),n.payloadBlob=s,n.numEvents=a;var b=i.iKey();-1===r.arrIndexOf(n.apiKeys,b)&&n.apiKeys.push(b)}}),(function(){return{payload:n,theBatch:{iKey:i.iKey(),evts:i.events()},max:o}})),s},e.getEventBlob=function(e){try{return r.doPerf(t,(function(){return"Serializer.getEventBlob"}),(function(){var t={};t.name=e.name,t.time=e.time,t.ver=e.ver,t.iKey="o:"+r.getTenantId(e.iKey);var i={},o=e.ext;o&&(t.ext=i,r.objForEachKey(o,(function(e,t){n(t,i[e]={},"ext."+e,!0,null,null,!0)})));var s=t[a]={};s.baseType=e.baseType;var l=s[c]={};return n(e.baseData,l,c,!1,[c],(function(e,t,n){k(i,e,t,n)}),!0),n(e.data,s,a,!1,[],(function(e,t,n){k(i,e,t,n)}),!0),JSON.stringify(t)}),(function(){return{item:e}}))}catch{return null}}}))};function k(e,t,n,i){if(i&&e){var o=r.getCommonSchemaMetaData(i.value,i.kind,i.propertyType);if(o>-1){var s=e[P];s||(s=e[P]={f:{}});var a=s[D];if(a||(a=s[D]={}),t)for(var c=0;c<t.length;c++){var l=t[c];a[l]||(a[l]={f:{}});var u=a[l][D];u||(u=a[l][D]={}),a=u}a=a[n]={},r.isArray(i.value)?a.a={t:o}:a.t=o}}}function j(e){var t,n=Math.floor(1200*Math.random())+2400;return t=Math.pow(2,e)*n,Math.min(t,6e5)}var q,M=function e(){var t={};o(e,this,(function(e){e.setKillSwitchTenants=function(e,n){if(e&&n)try{var i=function(e){var t=[];return e&&r.arrForEach(e,(function(e){t.push(r.strTrim(e))})),t}(e.split(","));if("this-request-only"===n)return i;for(var o=1e3*parseInt(n,10),s=0;s<i.length;++s)t[i[s]]=r.dateNow()+o}catch{return[]}return[]},e.isTenantKilled=function(e){var n=t,i=r.strTrim(e);return void 0!==n[i]&&n[i]>r.dateNow()||(delete n[i],!1)}}))},L=function e(){var t=!0,n=!0,r=!0,i="use-collector-delta",s=!1;o(e,this,(function(e){e.allowRequestSending=function(){return t},e.firstRequestSent=function(){r&&(r=!1,s||(t=!1))},e.shouldAddClockSkewHeaders=function(){return n},e.getClockSkewHeaderValue=function(){return i},e.setClockSkew=function(e){s||(e?(i=e,n=!0,s=!0):n=!1,t=!0)}}))},F="sendAttempt",U="&NoResponseBody=true",B=((q={})[1]=d,q[100]=d,q[200]="sent",q[8004]=u,q[8003]=u,q),z={},H={};function G(e,t,n){z[e]=t,!1!==n&&(H[t]=e)}function V(e){try{return e.responseText}catch{}return""}function W(e,t){var n=!1;if(e&&t){var i=r.objKeys(e);if(i&&i.length>0)for(var o=t.toLowerCase(),s=0;s<i.length;s++){var a=i[s];if(a&&r.hasOwnProperty(t,a)&&a.toLowerCase()===o){n=!0;break}}}return n}function $(e,t,n,r){t&&n&&n.length>0&&(r&&z[t]?(e.hdrs[z[t]]=n,e.useHdrs=!0):e.url+="&"+t+"="+n)}G(T,T,!1),G(y,y),G(v,"Client-Id"),G(w,w),G(b,b),G(S,S),G(_,_);var K=function e(t,n,i,s,a){this._responseHandlers=[];var c,d,T,_,C,R,x="?cors=true&"+f.toLowerCase()+"="+p,I=new M,O=!1,P=new L,D=!1,A=0,k=!0,q=[],z={},G=[],K=null,Q=!1,J=!1,X=!1;o(e,this,(function(e){var o=!0;function M(e,t){for(var n=0,i=null,o=0;null==i&&o<e.length;)1===(n=e[o])?r.useXDomainRequest()?i=L:r.isXhrSupported()&&(i=Z):2===n&&r.isFetchSupported(t)?i=Y:D&&3===n&&r.isBeaconsSupported()&&(i=te),o++;return i?{_transport:n,_isSync:t,sendPOST:i}:null}function L(e,t,n){var r=new XDomainRequest;r.open(l,e.urlString),e.timeout&&(r.timeout=e.timeout),r.onload=function(){var e=V(r);ee(t,200,{},e),pe(e)},r.onerror=function(){ee(t,400,{})},r.ontimeout=function(){ee(t,500,{})},r.onprogress=function(){},n?r.send(e.data):a.set((function(){r.send(e.data)}),0)}function Y(e,t,n){var i,s=e.urlString,c=!1,u=!1,d=((i={body:e.data,method:l}).Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,i);n&&(d.keepalive=!0,2===e._sendReason&&(c=!0,s+=U)),o&&(d.credentials="include"),e.headers&&r.objKeys(e.headers).length>0&&(d.headers=e.headers),fetch(s,d).then((function(e){var n={},r="";e.headers&&e.headers.forEach((function(e,t){n[t]=e})),e.body&&e.text().then((function(e){r=e})),u||(u=!0,ee(t,e.status,n,r),pe(r))})).catch((function(e){u||(u=!0,ee(t,0,{}))})),c&&!u&&(u=!0,ee(t,200,{})),!u&&e.timeout>0&&a.set((function(){u||(u=!0,ee(t,500,{}))}),e.timeout)}function Z(e,t,n){var i=e.urlString;function s(e,t,n){if(!e[n]&&t&&t.getResponseHeader){var i=t.getResponseHeader(n);i&&(e[n]=r.strTrim(i))}return e}function a(e,n){ee(t,e.status,function(e){var t={};return e.getAllResponseHeaders?t=function(e){var t={};if(r.isString(e)){var n=r.strTrim(e).split(/[\r\n]+/);r.arrForEach(n,(function(e){if(e){var n=e.indexOf(": ");if(-1!==n){var i=r.strTrim(e.substring(0,n)).toLowerCase(),o=r.strTrim(e.substring(n+1));t[i]=o}else t[r.strTrim(e)]=1}}))}return t}(e.getAllResponseHeaders()):(t=s(t,e,g),t=s(t,e,m),t=s(t,e,"kill-duration-seconds")),t}(e),n)}n&&e.disableXhrSync&&(n=!1);var c=r.openXhr(l,i,o,!0,n,e.timeout);r.objForEachKey(e.headers,(function(e,t){c.setRequestHeader(e,t)})),c.onload=function(){var e=V(c);a(c,e),pe(e)},c.onerror=function(){a(c)},c.ontimeout=function(){a(c)},c.send(e.data)}function ee(e,t,n,i){try{e(t,n,i)}catch(e){r._throwInternal(c.diagLog(),2,518,r.dumpObj(e))}}function te(e,t,n){var i=200,o=e._thePayload,s=e.urlString+U;try{var a=r.getNavigator();if(!a.sendBeacon(s,e.data))if(o){var l=[];r.arrForEach(o.batches,(function(e){if(l&&e&&e.count()>0){for(var t=e.events(),n=0;n<t.length;n++)if(!a.sendBeacon(s,K.getEventBlob(t[n]))){l.push(e.split(n));break}}else l.push(e.split(0))})),he(l,8003,o.sendType,!0)}else i=0}catch(e){c.diagLog().warnToConsole("Failed to send telemetry using sendBeacon API. Ex:"+r.dumpObj(e)),i=0}finally{ee(t,i,{},"")}}function ne(e){return 2===e||3===e}function re(e){return J&&ne(e)&&(e=2),e}function ie(){return!O&&A<n}function oe(){var e=G;return G=[],e}function se(e,t,n){var r=!1;return e&&e.length>0&&!O&&d[t]&&K&&(r=0!==t||ie()&&(n>0||P.allowRequestSending())),r}function ae(e){var t={};return e&&r.arrForEach(e,(function(e,n){t[n]={iKey:e.iKey(),evts:e.events()}})),t}function ce(e,n,i,o,s){if(e&&0!==e.length){if(O)return void he(e,1,o);o=re(o);try{var a=e,l=0!==o;r.doPerf(T,(function(){return"HttpManager:_sendBatches"}),(function(a){a&&(e=e.slice(0));for(var c=[],u=null,p=r.getTime(),h=d[o]||(l?d[1]:d[0]),f=(J||ne(o)||h&&3===h._transport)&&!k&&D&&r.isBeaconsSupported();se(e,o,n);){var m=e.shift();m&&m.count()>0&&(I.isTenantKilled(m.iKey())?c.push(m):(u=u||K.createPayload(n,i,l,f,s,o),K.appendPayload(u,m,t)?null!==u.overflow&&(e=[u.overflow].concat(e),u.overflow=null,ue(u,p,r.getTime(),s),p=r.getTime(),u=null):(ue(u,p,r.getTime(),s),p=r.getTime(),e=[m].concat(e),u=null)))}u&&ue(u,p,r.getTime(),s),e.length>0&&(G=e.concat(G)),he(c,8004,o)}),(function(){return{batches:ae(a),retryCount:n,isTeardown:i,isSynchronous:l,sendReason:s,useSendBeacon:ne(o),sendType:o}}),!l)}catch(e){r._throwInternal(c.diagLog(),2,48,"Unexpected Exception sending batch: "+r.dumpObj(e))}}}function le(e,t,n){e[t]=e[t]||{},e[t][c.identifier]=n}function ue(t,n,o,s){if(t&&t.payloadBlob&&t.payloadBlob.length>0){var a=!!e.sendHook,l=d[t.sendType];!ne(t.sendType)&&t.isBeacon&&2===t.sendReason&&(l=d[2]||d[3]||l);var u=X;(t.isBeacon||3===l._transport)&&(u=!1);var _=function(e,t){var n={url:x,hdrs:{},useHdrs:!1};t?(n.hdrs=r.extend(n.hdrs,z),n.useHdrs=r.objKeys(n.hdrs).length>0):r.objForEachKey(z,(function(e,t){H[e]?$(n,H[e],t,!1):(n.hdrs[e]=t,n.useHdrs=!0)})),$(n,v,"NO_AUTH",t),$(n,y,r.FullVersionString,t);var i="";r.arrForEach(e.apiKeys,(function(e){i.length>0&&(i+=","),i+=e})),$(n,w,i,t),$(n,S,r.dateNow().toString(),t);var o=function(e){for(var t=0;t<e.batches.length;t++){var n=e.batches[t].Msfpc();if(n)return encodeURIComponent(n)}return""}(e);if(r.isValueAssigned(o)&&(n.url+="&ext.intweb.msfpc="+o),P.shouldAddClockSkewHeaders()&&$(n,b,P.getClockSkewHeaderValue(),t),T.getWParam){var s=T.getWParam();s>=0&&(n.url+="&w="+s)}for(var a=0;a<q.length;a++)n.url+="&"+q[a].name+"="+q[a].value;return n}(t,u);u=u||_.useHdrs;var E=r.getTime();r.doPerf(T,(function(){return"HttpManager:_doPayloadSend"}),(function(){for(var d=0;d<t.batches.length;d++)for(var y=t.batches[d].events(),v=0;v<y.length;v++){var b=y[v];if(Q){var S=b.timings=b.timings||{};le(S,"sendEventStart",E),le(S,"serializationStart",n),le(S,"serializationCompleted",o)}b[F]>0?b[F]++:b[F]=1}he(t.batches,1e3+(s||0),t.sendType,!0);var w={data:t.payloadBlob,urlString:_.url,headers:_.hdrs,_thePayload:t,_sendReason:s,timeout:C};r.isUndefined(R)||(w.disableXhrSync=!!R),u&&(W(w.headers,h)||(w.headers[h]="no-cache, no-store"),W(w.headers,f)||(w.headers[f]=p));var x=null;l&&(x=function(n){P.firstRequestSent();var o=function(n,o){!function(t,n,o,s){var a=9e3,l=null,u=!1,d=!1;try{var p=!0;if(typeof t!==r.strUndefined){if(n){P.setClockSkew(n[g]);var h=n[m]||n["kill-duration-seconds"];r.arrForEach(I.setKillSwitchTenants(n["kill-tokens"],h),(function(e){r.arrForEach(o.batches,(function(t){if(t.iKey()===e){l=l||[];var n=t.split(0);o.numEvents-=n.count(),l.push(n)}}))}))}if(200==t||204==t)return void(a=200);(!function(e){return!(e>=300&&e<500&&408!=e&&429!=e||501==e||505==e)}(t)||o.numEvents<=0)&&(p=!1),a=9e3+t%1e3}if(p){a=100;var f=o.retryCnt;0===o.sendType&&(f<i?(u=!0,de((function(){0===o.sendType&&A--,ce(o.batches,f+1,o.isTeardown,J?2:o.sendType,5)}),J,j(f))):(d=!0,J&&(a=8001)))}}finally{u||(P.setClockSkew(),function(t,n,i,o){try{o&&c._backOffTransmission(),200===n&&(!o&&!t.isSync&&c._clearBackOff(),function(e){if(Q){var t=r.getTime();r.arrForEach(e,(function(e){e&&e.count()>0&&function(e,t){Q&&r.arrForEach(e,(function(e){le(e.timings=e.timings||{},"sendEventCompleted",t)}))}(e.events(),t)}))}}(t.batches)),he(t.batches,n,t.sendType,!0)}finally{0===t.sendType&&(A--,5!==i&&e.sendQueuedRequests(t.sendType,i))}}(o,a,s,d)),he(l,8004,o.sendType)}}(n,o,t,s)},a=t.isTeardown||t.isSync;try{l.sendPOST(n,o,a),e.sendListener&&e.sendListener(w,n,a,t.isBeacon)}catch(e){c.diagLog().warnToConsole("Unexpected exception sending payload. Ex:"+r.dumpObj(e)),ee(o,0,{})}}),r.doPerf(T,(function(){return"HttpManager:_doPayloadSend.sender"}),(function(){if(x)if(0===t.sendType&&A++,a&&!t.isBeacon&&3!==l._transport){var n={data:w.data,urlString:w.urlString,headers:r.extend({},w.headers),timeout:w.timeout,disableXhrSync:w.disableXhrSync},i=!1;r.doPerf(T,(function(){return"HttpManager:_doPayloadSend.sendHook"}),(function(){try{e.sendHook(n,(function(e){i=!0,!k&&!e._thePayload&&(e._thePayload=e._thePayload||w._thePayload,e._sendReason=e._sendReason||w._sendReason),x(e)}),t.isSync||t.isTeardown)}catch{i||x(w)}}))}else x(w)}))}),(function(){return{thePayload:t,serializationStart:n,serializationCompleted:o,sendReason:s}}),t.isSync)}t.sizeExceed&&t.sizeExceed.length>0&&he(t.sizeExceed,8003,t.sendType),t.failedEvts&&t.failedEvts.length>0&&he(t.failedEvts,8002,t.sendType)}function de(e,t,n){t?e():a.set(e,n)}function pe(t){var n=e._responseHandlers;try{for(var i=0;i<n.length;i++)try{n[i](t)}catch(e){r._throwInternal(c.diagLog(),1,519,"Response handler failed: "+e)}if(t){var o=JSON.parse(t);r.isValueAssigned(o.webResult)&&r.isValueAssigned(o.webResult[E])&&_.set("MSFPC",o.webResult[E],31536e3)}}catch{}}function he(e,t,n,i){if(e&&e.length>0&&s){var o=s[function(e){var t=B[e];return r.isValueAssigned(t)||(t="oth",e>=9e3&&e<=9999?t="rspFail":e>=8e3&&e<=8999?t=u:e>=1e3&&e<=1999&&(t="send")),t}(t)];if(o){var a=0!==n;r.doPerf(T,(function(){return"HttpManager:_sendBatchesNotification"}),(function(){de((function(){try{o.call(s,e,t,a,n)}catch(e){r._throwInternal(c.diagLog(),1,74,"send request notification failed: "+e)}}),i||a,0)}),(function(){return{batches:ae(e),reason:t,isSync:a,sendSync:i,sendType:n}}),!a)}}}e.initialize=function(e,t,n,i,s){var a;s||(s={}),x=e+x,X=!!r.isUndefined(s.avoidOptions)||!s.avoidOptions,T=t,_=t.getCookieMgr(),Q=!T.config.disableEventTimings;var l=!!T.config.enableCompoundKey;c=n;var u=s.valueSanitizer,p=s.stringifyObjects;r.isUndefined(s.enableCompoundKey)||(l=!!s.enableCompoundKey),C=s.xhrTimeout,R=s.disableXhrSync,D=!r.isReactNative(),K=new N(T,u,p,l);var h=i,f=s.alwaysUseXhrOverride?i:null,m=s.alwaysUseXhrOverride?i:null;if(!i){k=!1;var g=r.getLocation();g&&g.protocol&&"file:"===g.protocol.toLowerCase()&&(o=!1);var y=[];y=r.isReactNative()?[2,1]:[1,2,3];var v=s.transports;v&&(r.isNumber(v)?y=[v].concat(y):r.isArray(v)&&(y=v.concat(y))),i=M(y,!1),h=M(y,!0),i||c.diagLog().warnToConsole("No available transport to send events")}(a={})[0]=i,a[1]=h||M([1,2,3],!0),a[2]=f||M([3,2],!0)||h||M([1],!0),a[3]=m||M([2,3],!0)||h||M([1],!0),d=a},e._getDbgPlgTargets=function(){return[d[0],I,K,d]},e.addQueryStringParameter=function(e,t){for(var n=0;n<q.length;n++)if(q[n].name===e)return void(q[n].value=t);q.push({name:e,value:t})},e.addHeader=function(e,t){z[e]=t},e.canSendRequest=function(){return ie()&&P.allowRequestSending()},e.sendQueuedRequests=function(e,t){r.isUndefined(e)&&(e=0),J&&(e=re(e),t=2),se(G,e,0)&&ce(oe(),0,!1,e,t||0)},e.isCompletelyIdle=function(){return!O&&0===A&&0===G.length},e.setUnloading=function(e){J=e},e.addBatch=function(e){if(e&&e.count()>0){if(I.isTenantKilled(e.iKey()))return!1;G.push(e)}return!0},e.teardown=function(){G.length>0&&ce(oe(),0,!0,2,2)},e.pause=function(){O=!0},e.resume=function(){O=!1,e.sendQueuedRequests(0,4)},e.sendSynchronousBatch=function(e,t,n){e&&e.count()>0&&(r.isNullOrUndefined(t)&&(t=1),J&&(t=re(t),n=2),ce([e],0,!1,t,n||0))}}))};function Q(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout(e,t,n)}function J(e){clearTimeout(e)}function X(e,t){return{set:e||Q,clear:t||J}}var Y="eventsDiscarded",Z="overrideInstrumentationKey",ee="maxEventRetryAttempts",te="maxUnloadEventRetryAttempts",ne=function(e){function n(){var t=e.call(this)||this;t.identifier="PostChannel",t.priority=1011,t.version="3.2.3";var i,l,u,d,p,h,f,m,g=!1,y=[],v=null,b=!1,S=0,w=500,_=0,E=1e4,C={},R=s,I=null,O=null,P=0,D=0,A={},N=-1,k=!0,q=!1,M=6,L=2;return o(n,t,(function(e,t){function n(e){"beforeunload"!==(e||r.getWindow().event).type&&(q=!0,u.setUnloading(q)),W(2,2)}function o(e){q=!1,u.setUnloading(q)}function F(e,t){if(e.sendAttempt||(e.sendAttempt=0),e.latency||(e.latency=1),e.ext&&e.ext.trace&&delete e.ext.trace,e.ext&&e.ext.user&&e.ext.user.id&&delete e.ext.user.id,k&&(e.ext=r.optimizeObject(e.ext),e.baseData&&(e.baseData=r.optimizeObject(e.baseData)),e.data&&(e.data=r.optimizeObject(e.data))),e.sync)if(P||b)e.latency=3,e.sync=!1;else if(u)return k&&(e=r.optimizeObject(e)),void u.sendSynchronousBatch(x.create(e.iKey,[e]),!0===e.sync?1:e.sync,3);var n=e.latency,i=_,o=E;4===n&&(i=S,o=w);var s=!1;if(i<o)s=!J(e,t);else{var a=1,c=20;4===n&&(a=4,c=1),s=!0,function(e,t,n,i){for(;n<=t;){var o=$(e,t,!0);if(o&&o.count()>0){var s=o.split(0,i),a=s.count();if(a>0)return 4===n?S-=a:_-=a,ue(Y,[s],r.EventsDiscardedReason.QueueFull),!0}n++}return ne(),!1}(e.iKey,e.latency,a,c)&&(s=!J(e,t))}s&&le(Y,[e],r.EventsDiscardedReason.QueueFull)}function U(e,t,n){var r=re(e,t,n);return u.sendQueuedRequests(t,n),r}function B(){return _>0}function z(){if(N>=0&&re(N,0,h)&&u.sendQueuedRequests(0,h),S>0&&!O&&!b){var e=C[R][2];e>=0&&(O=G((function(){O=null,U(4,0,1),z()}),e))}var t=C[R][1];!I&&!v&&t>=0&&!b&&(B()?I=G((function(){I=null,U(0===D?3:1,0,1),D++,D%=2,z()}),t):D=0)}function H(){i=null,g=!1,y=[],v=null,b=!1,S=0,w=500,_=0,E=1e4,C={},R=s,I=null,O=null,P=0,D=0,l=null,A={},d=void 0,p=0,N=-1,h=null,k=!0,q=!1,M=6,L=2,f=null,m=X(),u=new K(500,2,1,{requeue:ae,send:de,sent:pe,drop:he,rspFail:fe,oth:me},m),se(),A[4]={batches:[],iKeyMap:{}},A[3]={batches:[],iKeyMap:{}},A[2]={batches:[],iKeyMap:{}},A[1]={batches:[],iKeyMap:{}},ge()}function G(e,t){0===t&&P&&(t=1);var n=1e3;return P&&(n=j(P-1)),m.set(e,t*n)}function V(){return null!==I&&(m.clear(I),I=null,D=0,!0)}function W(e,t){V(),v&&(m.clear(v),v=null),b||U(1,e,t)}function $(e,t,n){var r=A[t];r||(r=A[t=1]);var i=r.iKeyMap[e];return!i&&n&&(i=x.create(e),r.batches.push(i),r.iKeyMap[e]=i),i}function Q(t,n){u.canSendRequest()&&!P&&(d>0&&_>d&&(n=!0),n&&null==v&&e.flush(t,null,20))}function J(e,t){k&&(e=r.optimizeObject(e));var n=e.latency,i=$(e.iKey,n,!0);return!!i.addEvent(e)&&(4!==n?(_++,t&&0===e.sendAttempt&&Q(!e.sync,p>0&&i.count()>=p)):S++,!0)}function ne(){for(var e=0,t=0,n=function(n){var i=A[n];i&&i.batches&&r.arrForEach(i.batches,(function(r){4===n?e+=r.count():t+=r.count()}))},i=1;i<=4;i++)n(i);_=t,S=e}function re(t,n,i){var o=!1,s=0===n;return!s||u.canSendRequest()?r.doPerf(e.core,(function(){return"PostChannel._queueBatches"}),(function(){for(var e=[],n=4;n>=t;){var i=A[n];i&&i.batches&&i.batches.length>0&&(r.arrForEach(i.batches,(function(t){u.addBatch(t)?o=o||t&&t.count()>0:e=e.concat(t.events()),4===n?S-=t.count():_-=t.count()})),i.batches=[],i.iKeyMap={}),n--}e.length>0&&le(Y,e,r.EventsDiscardedReason.KillSwitch),o&&N>=t&&(N=-1,h=0)}),(function(){return{latency:t,sendType:n,sendReason:i}}),!s):(N=N>=0?Math.min(N,t):t,h=Math.max(h,i)),o}function ie(e,t){U(1,0,t),ne(),oe((function(){e&&e(),y.length>0?v=G((function(){v=null,ie(y.shift(),t)}),0):(v=null,z())}))}function oe(e){u.isCompletelyIdle()?e():v=G((function(){v=null,oe(e)}),.25)}function se(){(C={})[s]=[2,1,0],C[a]=[6,3,0],C[c]=[18,9,0]}function ae(t,n){var i=[],o=M;q&&(o=L),r.arrForEach(t,(function(t){t&&t.count()>0&&r.arrForEach(t.events(),(function(t){t&&(t.sync&&(t.latency=4,t.sync=!1),t.sendAttempt<o?(r.setProcessTelemetryTimings(t,e.identifier),F(t,!1)):i.push(t))}))})),i.length>0&&le(Y,i,r.EventsDiscardedReason.NonRetryableStatus),q&&W(2,2)}function ce(t,n){var i=e._notificationManager||{},o=i[t];if(o)try{o.apply(i,n)}catch(n){r._throwInternal(e.diagLog(),1,74,t+" notification failed: "+n)}}function le(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];t&&t.length>0&&ce(e,[t].concat(n))}function ue(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t&&t.length>0&&r.arrForEach(t,(function(t){t&&t.count()>0&&ce(e,[t.events()].concat(n))}))}function de(e,t,n){e&&e.length>0&&ce("eventsSendRequest",[t>=1e3&&t<=1999?t-1e3:0,!0!==n])}function pe(e,t){ue("eventsSent",e,t),z()}function he(e,t){ue(Y,e,t>=8e3&&t<=8999?t-8e3:r.EventsDiscardedReason.Unknown)}function fe(e){ue(Y,e,r.EventsDiscardedReason.NonRetryableStatus),z()}function me(e,t){ue(Y,e,r.EventsDiscardedReason.Unknown),z()}function ge(){p=i&&i.disableAutoBatchFlushLimit?0:Math.max(1500,E/6)}H(),e._getDbgPlgTargets=function(){return[u]},e.initialize=function(s,a,c){r.doPerf(a,(function(){return"PostChannel:initialize"}),(function(){var p=a;t.initialize(s,a,c);try{a.addUnloadCb,f=r.mergeEvtNamespace(r.createUniqueNamespace(e.identifier),a.evtNamespace&&a.evtNamespace());var h=e._getTelCtx();s.extensionConfig[e.identifier]=s.extensionConfig[e.identifier]||{},i=h.getExtCfg(e.identifier),m=X(i.setTimeoutOverride,i.clearTimeoutOverride),k=!i.disableOptimizeObj&&r.isChromium(),function(e){var t=e.getWParam;e.getWParam=function(){var e=0;return i.ignoreMc1Ms0CookieProcessing&&(e|=2),e|t()}}(p),i.eventsLimitInMem>0&&(E=i.eventsLimitInMem),i.immediateEventLimit>0&&(w=i.immediateEventLimit),i.autoFlushEventsLimit>0&&(d=i.autoFlushEventsLimit),r.isNumber(i[ee])&&(M=i[ee]),r.isNumber(i[te])&&(L=i[te]),ge(),i.httpXHROverride&&i.httpXHROverride.sendPOST&&(l=i.httpXHROverride),r.isValueAssigned(s.anonCookieName)&&u.addQueryStringParameter("anoncknm",s.anonCookieName),u.sendHook=i.payloadPreprocessor,u.sendListener=i.payloadListener;var g=i.overrideEndpointUrl?i.overrideEndpointUrl:s.endpointUrl;e._notificationManager=s.extensionConfig.NotificationManager,u.initialize(g,e.core,e,l,i);var y=s.disablePageUnloadEvents||[];r.addPageUnloadEventListener(n,y,f),r.addPageHideEventListener(n,y,f),r.addPageShowEventListener(o,s.disablePageShowEvents,f)}catch(t){throw e.setInitialized(!1),t}}),(function(){return{coreConfig:s,core:a,extensions:c}}))},e.processTelemetry=function(t,n){r.setProcessTelemetryTimings(t,e.identifier);var o=(n=e._getTelCtx(n)).getExtCfg(e.identifier),s=!!i.disableTelemetry;o&&(s=s||!!o.disableTelemetry);var a=t;!s&&!g&&(i[Z]&&(a.iKey=i[Z]),o&&o[Z]&&(a.iKey=o[Z]),F(a,!0),q?W(2,2):z()),e.processNext(a,n)},e._doTeardown=function(e,t){W(2,2),g=!0,u.teardown(),r.removePageUnloadEventListener(null,f),r.removePageHideEventListener(null,f),r.removePageShowEventListener(null,f),H()},e.setEventQueueLimits=function(e,t){E=e>0?e:1e4,d=t>0?t:0,ge();var n=_>e;if(!n&&p>0)for(var i=1;!n&&i<=3;i++){var o=A[i];o&&o.batches&&r.arrForEach(o.batches,(function(e){e&&e.count()>=p&&(n=!0)}))}Q(!0,n)},e.pause=function(){V(),b=!0,u.pause()},e.resume=function(){b=!1,u.resume(),z()},e.addResponseHandler=function(e){u._responseHandlers.push(e)},e._loadTransmitProfiles=function(e){V(),se(),R=s,z(),r.objForEachKey(e,(function(e,t){var n=t.length;if(n>=2){var r=n>2?t[2]:0;if(t.splice(0,n-2),t[1]<0&&(t[0]=-1),t[1]>0&&t[0]>0){var i=t[0]/t[1];t[0]=Math.ceil(i)*t[1]}r>=0&&t[1]>=0&&r>t[1]&&(r=t[1]),t.push(r),C[e]=t}}))},e.flush=function(e,t,n){if(void 0===e&&(e=!0),!b)if(n=n||1,e)null==v?(V(),re(1,0,n),v=G((function(){v=null,ie(t,n)}),0)):y.push(t);else{var r=V();U(1,1,n),null!=t&&t(),r&&z()}},e.setMsaAuthTicket=function(e){u.addHeader(T,e)},e.hasEvents=B,e._setTransmitProfile=function(e){R!==e&&void 0!==C[e]&&(V(),R=e,z())},e._backOffTransmission=function(){P<4&&(P++,V(),z())},e._clearBackOff=function(){P&&(P=0,V(),z())},r.objDefineAccessors(e,"_setTimeoutOverride",(function(){return m.set}),(function(e){m=X(e,m.clear)})),r.objDefineAccessors(e,"_clearTimeoutOverride",(function(){return m.clear}),(function(e){m=X(m.set,e)}))})),t}return t.__extendsFn(n,e),n}(r.BaseTelemetryPlugin);e.BE_PROFILE=c,e.NRT_PROFILE=a,e.PostChannel=ne,e.RT_PROFILE=s,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof s&&typeof a<"u"?c(s,x(),C(),R()):(i=[t,n(623),n(2314),n(9644)],void 0===(o="function"==typeof(r=c)?r.apply(t,i):r)||(e.exports=o))})),O=S(((e,t)=>{"use strict";var n=function(){function e(){}return e.info=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.enableDebug&&console.info(e.TAG+t,n)},e.warn=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.disableWarnings||console.warn(e.TAG+t,n)},e.enableDebug=!1,e.disableWarnings=!1,e.disableErrors=!1,e.TAG="ApplicationInsights:",e}();t.exports=n})),P=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScopeManager=e.OpenTelemetryScopeManagerWrapper=void 0;var r=Rr(),i=n(2361),o=function(){function e(){}return e.prototype.active=function(){var e=this,n=r.CorrelationContextManager.getCurrentContext();return t(t({},n),{getValue:function(t){return e._activeSymbol?t===e._activeSymbol&&n:(e._activeSymbol=t,n)},setValue:function(){}})},e.prototype.with=function(t,n){var i=t.parentSpanId,o=t.name,s=e._spanToContext(t,i,o);return r.CorrelationContextManager.runWithContext(s,n)()},e.prototype.bind=function(e){return"function"==typeof e?r.CorrelationContextManager.wrapCallback(e):(e instanceof i.EventEmitter&&r.CorrelationContextManager.wrapEmitter(e),e)},e.prototype.enable=function(){return r.CorrelationContextManager.enable(),this},e.prototype.disable=function(){return r.CorrelationContextManager.disable(),this},e._spanToContext=function(e,n,i){var o=n?"|"+e.spanContext().traceId+"."+n+".":e.spanContext().traceId,s=t(t({},e.spanContext()),{traceFlags:e.spanContext().traceFlags});return r.CorrelationContextManager.spanToContextObject(s,o,i)},e}();e.OpenTelemetryScopeManagerWrapper=o,e.AsyncScopeManager=new o})),D=S(((e,t)=>{var n;e=t.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var m=a++;s[m]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var g=a++;s[g]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var y=a++;s[y]="[0-9A-Za-z-]+";var v=a++;s[v]="(?:\\+("+s[y]+"(?:\\."+s[y]+")*))";var b=a++,S="v?"+s[d]+s[m]+"?"+s[v]+"?";s[b]="^"+S+"$";var w="[v=\\s]*"+s[p]+s[g]+"?"+s[v]+"?",T=a++;s[T]="^"+w+"$";var _=a++;s[_]="((?:<|>)?=?)";var E=a++;s[E]=s[l]+"|x|X|\\*";var C=a++;s[C]=s[c]+"|x|X|\\*";var R=a++;s[R]="[v=\\s]*("+s[C]+")(?:\\.("+s[C]+")(?:\\.("+s[C]+")(?:"+s[m]+")?"+s[v]+"?)?)?";var x=a++;s[x]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[g]+")?"+s[v]+"?)?)?";var I=a++;s[I]="^"+s[_]+"\\s*"+s[R]+"$";var O=a++;s[O]="^"+s[_]+"\\s*"+s[x]+"$";var P=a++;s[P]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=a++;s[D]="(?:~>?)";var A=a++;s[A]="(\\s*)"+s[D]+"\\s+",o[A]=new RegExp(s[A],"g");var N=a++;s[N]="^"+s[D]+s[R]+"$";var k=a++;s[k]="^"+s[D]+s[x]+"$";var j=a++;s[j]="(?:\\^)";var q=a++;s[q]="(\\s*)"+s[j]+"\\s+",o[q]=new RegExp(s[q],"g");var M=a++;s[M]="^"+s[j]+s[R]+"$";var L=a++;s[L]="^"+s[j]+s[x]+"$";var F=a++;s[F]="^"+s[_]+"\\s*("+w+")$|^$";var U=a++;s[U]="^"+s[_]+"\\s*("+S+")$|^$";var B=a++;s[B]="(\\s*)"+s[_]+"\\s*("+w+"|"+s[R]+")",o[B]=new RegExp(s[B],"g");var z=a++;s[z]="^\\s*("+s[R]+")\\s+-\\s+("+s[R]+")\\s*$";var H=a++;s[H]="^\\s*("+s[x]+")\\s+-\\s+("+s[x]+")\\s*$";var G,V=a++;for(s[V]="(<|>)?=?\\s*\\*",G=0;G<35;G++)n(G,s[G]),o[G]||(o[G]=new RegExp(s[G]));function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e||e.length>r)return null;if(!(t.loose?o[T]:o[b]).test(e))return null;try{return new $(e,t)}catch{return null}}function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?o[T]:o[b]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=W,e.valid=function(e,t){var n=W(e,t);return n?n.version:null},e.clean=function(e,t){var n=W(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=$,$.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},$.prototype.toString=function(){return this.version},$.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof $||(e=new $(e,this.options)),this.compareMain(e)||this.comparePre(e)},$.prototype.compareMain=function(e){return e instanceof $||(e=new $(e,this.options)),Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)},$.prototype.comparePre=function(e){if(e instanceof $||(e=new $(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return Q(r,i)}while(++t)},$.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new $(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=W(e),r=W(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function J(e,t,n){return new $(e,n).compare(new $(t,n))}function X(e,t,n){return J(e,t,n)>0}function Y(e,t,n){return J(e,t,n)<0}function Z(e,t,n){return 0===J(e,t,n)}function ee(e,t,n){return 0!==J(e,t,n)}function te(e,t,n){return J(e,t,n)>=0}function ne(e,t,n){return J(e,t,n)<=0}function re(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Z(e,n,r);case"!=":return ee(e,n,r);case">":return X(e,n,r);case">=":return te(e,n,r);case"<":return Y(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return Q(t,e)},e.major=function(e,t){return new $(e,t).major},e.minor=function(e,t){return new $(e,t).minor},e.patch=function(e,t){return new $(e,t).patch},e.compare=J,e.compareLoose=function(e,t){return J(e,t,!0)},e.rcompare=function(e,t,n){return J(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=X,e.lt=Y,e.eq=Z,e.neq=ee,e.gte=te,e.lte=ne,e.cmp=re,e.Comparator=ie;var oe={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=ae(n)?"":ae(r)?">="+n+".0.0":ae(i)?">="+n+"."+r+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==oe&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new se(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,o,s,a,c;switch(e=new $(e,r),t=new se(t,r),n){case">":i=X,o=ne,s=Y,a=">",c=">=";break;case"<":i=Y,o=te,s=X,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===oe&&(e=new ie(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?o[F]:o[U],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===oe||("string"==typeof e&&(e=new $(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[H]:o[z];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[B],"$1$2$3"),n("comparator trim",e,o[B]),e=(e=(e=e.replace(o[A],"$1~")).replace(o[q],"$1^")).split(/\s+/).join(" ");var i=t?o[F]:o[U],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[L]:o[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?o[k]:o[N];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?o[O]:o[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=ae(i),l=c||ae(o),u=l||ae(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[V],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new $(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new $(r=e,n))})),r},e.minVersion=function(e,t){e=new se(e,t);var n=new $("0.0.0");if(e.test(n)||(n=new $("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new $(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||X(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=W(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(o[P]);return null==t?null:W(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),A=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makePatchingRequire=void 0;var t=n(1017),r=D(),i=n(8188),o=Object.keys(process.binding("natives")),s=i.prototype.require;e.makePatchingRequire=function(e){var n={};return function(a){var c=s.apply(this,arguments);if(e[a]){var l=i._resolveFilename(a,this);if(n.hasOwnProperty(l))return n[l];var u=void 0;if(o.indexOf(a)<0)try{u=s.call(this,t.join(a,"package.json")).version}catch{return c}else u=process.version.substring(1);var d=u.indexOf("-");d>=0&&(u=u.substring(0,d));for(var p=c,h=0,f=e[a];h<f.length;h++){var m=f[h];r.satisfies(u,m.versionSpecifier)&&(p=m.patch(p,l))}return n[l]=p}return c}}})),N=S(((e,t)=>{t.exports={name:"diagnostic-channel",version:"1.0.0",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"tslint -c tslint.json -p tsconfig.json",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^5.3.0"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",tslint:"^5.0.0",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}})),k=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.channel=e.makePatchingRequire=void 0;var t=A(),r=A();Object.defineProperty(e,"makePatchingRequire",{enumerable:!0,get:function(){return r.makePatchingRequire}});var i=function(e){return!0},o=function(){function e(){this.version=N().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var r={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,n.forEach((function(e){var t=e.listener,n=e.filter;try{n&&n(!0)&&t(r)}catch{}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,n){void 0===n&&(n=i),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:n})},e.prototype.unsubscribe=function(e,t,n){void 0===n&&(n=i);var r=this.subscribers[e];if(r)for(var o=0;o<r.length;++o)if(r[o].listener===t&&r[o].filter===n)return r.splice(o,1),!0;return!1},e.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(e){return e},Object.getOwnPropertyNames(this.knownPatches).forEach((function(t){return delete e.knownPatches[t]}))},e.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},e.prototype.addContextPreservation=function(e){var t=this.contextPreservationFunction;this.contextPreservationFunction=function(n){return e(t(n))}},e.prototype.registerMonkeyPatch=function(e,t){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(t)},e.prototype.getPatchesObject=function(){return this.knownPatches},e}();global.diagnosticsSource||(global.diagnosticsSource=new o,n(8188).prototype.require=t.makePatchingRequire(global.diagnosticsSource.getPatchesObject())),e.channel=global.diagnosticsSource})),j=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),q=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._globalThis=void 0,e._globalThis="object"==typeof globalThis?globalThis:global})),M=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(q(),e)})),L=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(M(),e)})),F=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.0.3"})),U=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompatible=e._makeCompatibilityCheck=void 0;var t=F(),n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function r(e){var t=new Set([e]),r=new Set,i=e.match(n);if(!i)return function(){return!1};var o=+i[1],s=+i[2],a=+i[3];if(null!=i[4])return function(t){return t===e};function c(e){return r.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var i=e.match(n);if(!i)return c(e);var u=+i[1],d=+i[2],p=+i[3];return null!=i[4]||o!==u?c(e):0===o?s===d&&a<=p?l(e):c(e):s<=d?l(e):c(e)}}e._makeCompatibilityCheck=r,e.isCompatible=r(t.VERSION)})),B=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unregisterGlobal=e.getGlobal=e.registerGlobal=void 0;var t=L(),n=F(),r=U(),i=n.VERSION.split(".")[0],o=Symbol.for("opentelemetry.js.api."+i),s=t._globalThis;e.registerGlobal=function(e,t,r,i){var a;void 0===i&&(i=!1);var c=s[o]=null!==(a=s[o])&&void 0!==a?a:{version:n.VERSION};if(!i&&c[e]){var l=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(l.stack||l.message),!1}return c.version!==n.VERSION?(l=new Error("@opentelemetry/api: All API registration versions must match"),r.error(l.stack||l.message),!1):(c[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+n.VERSION+"."),!0)},e.getGlobal=function(e){var t,n,i=null===(t=s[o])||void 0===t?void 0:t.version;if(i&&r.isCompatible(i))return null===(n=s[o])||void 0===n?void 0:n[e]},e.unregisterGlobal=function(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+n.VERSION+".");var r=s[o];r&&delete r[e]}})),z=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagComponentLogger=void 0;var t=B(),n=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("verbose",this._namespace,e)},e}();function r(e,n,r){var i=t.getGlobal("diag");if(i)return r.unshift(n),i[e].apply(i,r)}e.DiagComponentLogger=n})),H=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiagLogLevel=void 0,(t=e.DiagLogLevel||(e.DiagLogLevel={}))[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})),G=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogLevelDiagLogger=void 0;var t=H();e.createLogLevelDiagLogger=function(e,n){function r(t,r){var i=n[t];return"function"==typeof i&&e>=r?i.bind(n):function(){}}return e<t.DiagLogLevel.NONE?e=t.DiagLogLevel.NONE:e>t.DiagLogLevel.ALL&&(e=t.DiagLogLevel.ALL),n=n||{},{error:r("error",t.DiagLogLevel.ERROR),warn:r("warn",t.DiagLogLevel.WARN),info:r("info",t.DiagLogLevel.INFO),debug:r("debug",t.DiagLogLevel.DEBUG),verbose:r("verbose",t.DiagLogLevel.VERBOSE)}}})),V=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagAPI=void 0;var t=z(),n=G(),r=H(),i=B(),o=function(){function e(){function e(e){return function(){var t=i.getGlobal("diag");if(t)return t[e].apply(t,arguments)}}var o=this;o.setLogger=function(e,t){var s,a;if(void 0===t&&(t=r.DiagLogLevel.INFO),e===o){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return o.error(null!==(s=c.stack)&&void 0!==s?s:c.message),!1}var l=i.getGlobal("diag"),u=n.createLogLevelDiagLogger(t,e);if(l){var d=null!==(a=(new Error).stack)&&void 0!==a?a:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+d),u.warn("Current logger will overwrite one already registered from "+d)}return i.registerGlobal("diag",u,o,!0)},o.disable=function(){i.unregisterGlobal("diag",o)},o.createComponentLogger=function(e){return new t.DiagComponentLogger(e)},o.verbose=e("verbose"),o.debug=e("debug"),o.info=e("info"),o.warn=e("warn"),o.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();e.DiagAPI=o})),W=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaggageImpl=void 0;var t=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){return[e[0],e[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=new e(this._entries),i=0,o=t;i<o.length;i++){var s=o[i];r._entries.delete(s)}return r},e.prototype.clear=function(){return new e},e}();e.BaggageImpl=t})),$=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataSymbol=void 0,e.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")})),K=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataFromString=e.createBaggage=void 0;var t=V(),n=W(),r=$(),i=t.DiagAPI.instance();e.createBaggage=function(e){return void 0===e&&(e={}),new n.BaggageImpl(new Map(Object.entries(e)))},e.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(i.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:r.baggageEntryMetadataSymbol,toString:function(){return e}}}})),Q=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),J=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),X=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagConsoleLogger=void 0;var t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];e.DiagConsoleLogger=function(){function e(e){return function(){var t=arguments;if(console){var n=console[e];if("function"!=typeof n&&(n=console.log),"function"==typeof n)return n.apply(console,t)}}}for(var n=0;n<t.length;n++)this[t[n].n]=e(t[n].c)}})),Y=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(X(),e),n(H(),e)})),Z=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTextMapSetter=e.defaultTextMapGetter=void 0,e.defaultTextMapGetter={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},e.defaultTextMapSetter={set:function(e,t,n){null!=e&&(e[t]=n)}}})),ee=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),te=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ne=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ROOT_CONTEXT=e.createContextKey=void 0,e.createContextKey=function(e){return Symbol.for(e)};e.ROOT_CONTEXT=new function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}})),re=S((e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.NoopContextManager=void 0;var n=ne(),r=function(){function e(){}return e.prototype.active=function(){return n.ROOT_CONTEXT},e.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,t([r],i))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}();e.NoopContextManager=r})),ie=S((e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.ContextAPI=void 0;var n=re(),r=B(),i=V(),o="context",s=new n.NoopContextManager,a=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return r.registerGlobal(o,e,i.DiagAPI.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,t([e,n,r],o))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return r.getGlobal(o)||s},e.prototype.disable=function(){this._getContextManager().disable(),r.unregisterGlobal(o,i.DiagAPI.instance())},e}();e.ContextAPI=a})),oe=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TraceFlags=void 0,(t=e.TraceFlags||(e.TraceFlags={}))[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})),se=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=void 0;var t=oe();e.INVALID_SPANID="0000000000000000",e.INVALID_TRACEID="00000000000000000000000000000000",e.INVALID_SPAN_CONTEXT={traceId:e.INVALID_TRACEID,spanId:e.INVALID_SPANID,traceFlags:t.TraceFlags.NONE}})),ae=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NonRecordingSpan=void 0;var t=se(),n=function(){function e(e){void 0===e&&(e=t.INVALID_SPAN_CONTEXT),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}();e.NonRecordingSpan=n})),ce=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSpanContext=e.setSpanContext=e.deleteSpan=e.setSpan=e.getSpan=void 0;var t=ne(),n=ae(),r=t.createContextKey("OpenTelemetry Context Key SPAN");function i(e){return e.getValue(r)||void 0}function o(e,t){return e.setValue(r,t)}e.getSpan=i,e.setSpan=o,e.deleteSpan=function(e){return e.deleteValue(r)},e.setSpanContext=function(e,t){return o(e,new n.NonRecordingSpan(t))},e.getSpanContext=function(e){var t;return null===(t=i(e))||void 0===t?void 0:t.spanContext()}})),le=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSpanContext=e.isSpanContextValid=e.isValidSpanId=e.isValidTraceId=void 0;var t=se(),n=ae(),r=/^([0-9a-f]{32})$/i,i=/^[0-9a-f]{16}$/i;function o(e){return r.test(e)&&e!==t.INVALID_TRACEID}function s(e){return i.test(e)&&e!==t.INVALID_SPANID}e.isValidTraceId=o,e.isValidSpanId=s,e.isSpanContextValid=function(e){return o(e.traceId)&&s(e.spanId)},e.wrapSpanContext=function(e){return new n.NonRecordingSpan(e)}})),ue=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracer=void 0;var t=ie(),n=ce(),r=ae(),i=le(),o=t.ContextAPI.getInstance(),s=function(){function e(){}return e.prototype.startSpan=function(e,t,o){if(Boolean(null==t?void 0:t.root))return new r.NonRecordingSpan;var s=o&&n.getSpanContext(o);return function(e){return"object"==typeof e&&"string"==typeof e.spanId&&"string"==typeof e.traceId&&"number"==typeof e.traceFlags}(s)&&i.isSpanContextValid(s)?new r.NonRecordingSpan(s):new r.NonRecordingSpan},e.prototype.startActiveSpan=function(e,t,r,i){var s,a,c;if(!(arguments.length<2)){2===arguments.length?c=t:3===arguments.length?(s=t,c=r):(s=t,a=r,c=i);var l=a??o.active(),u=this.startSpan(e,s,l),d=n.setSpan(l,u);return o.with(d,c,void 0,u)}},e}();e.NoopTracer=s})),de=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracer=void 0;var t=new(ue().NoopTracer),n=function(){function e(e,t,n){this._provider=e,this.name=t,this.version=n}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version);return e?(this._delegate=e,this._delegate):t},e}();e.ProxyTracer=n})),pe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracerProvider=void 0;var t=ue(),n=function(){function e(){}return e.prototype.getTracer=function(e,n){return new t.NoopTracer},e}();e.NoopTracerProvider=n})),he=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracerProvider=void 0;var t=de(),n=new(pe().NoopTracerProvider),r=function(){function e(){}return e.prototype.getTracer=function(e,n){var r;return null!==(r=this.getDelegateTracer(e,n))&&void 0!==r?r:new t.ProxyTracer(this,e,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:n},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t)},e}();e.ProxyTracerProvider=r})),fe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),me=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SamplingDecision=void 0,(t=e.SamplingDecision||(e.SamplingDecision={}))[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})),ge=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ye=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanKind=void 0,(t=e.SpanKind||(e.SpanKind={}))[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})),ve=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),be=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Se=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanStatusCode=void 0,(t=e.SpanStatusCode||(e.SpanStatusCode={}))[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})),we=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Te=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),_e=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ee=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ce=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceAPI=void 0;var t=B(),n=he(),r=le(),i=ce(),o=V(),s="trace",a=function(){function e(){this._proxyTracerProvider=new n.ProxyTracerProvider,this.wrapSpanContext=r.wrapSpanContext,this.isSpanContextValid=r.isSpanContextValid,this.deleteSpan=i.deleteSpan,this.getSpan=i.getSpan,this.getSpanContext=i.getSpanContext,this.setSpan=i.setSpan,this.setSpanContext=i.setSpanContext}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var n=t.registerGlobal(s,this._proxyTracerProvider,o.DiagAPI.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},e.prototype.getTracerProvider=function(){return t.getGlobal(s)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){t.unregisterGlobal(s,o.DiagAPI.instance()),this._proxyTracerProvider=new n.ProxyTracerProvider},e}();e.TraceAPI=a})),Re=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTextMapPropagator=void 0;var t=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}();e.NoopTextMapPropagator=t})),xe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteBaggage=e.setBaggage=e.getBaggage=void 0;var t=ne().createContextKey("OpenTelemetry Baggage Key");e.getBaggage=function(e){return e.getValue(t)||void 0},e.setBaggage=function(e,n){return e.setValue(t,n)},e.deleteBaggage=function(e){return e.deleteValue(t)}})),Ie=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropagationAPI=void 0;var t=B(),n=Re(),r=Z(),i=xe(),o=K(),s=V(),a="propagation",c=new n.NoopTextMapPropagator,l=function(){function e(){this.createBaggage=o.createBaggage,this.getBaggage=i.getBaggage,this.setBaggage=i.setBaggage,this.deleteBaggage=i.deleteBaggage}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return t.registerGlobal(a,e,s.DiagAPI.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=r.defaultTextMapSetter),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=r.defaultTextMapGetter),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){t.unregisterGlobal(a,s.DiagAPI.instance())},e.prototype._getGlobalPropagator=function(){return t.getGlobal(a)||c},e}();e.PropagationAPI=l})),Oe=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.diag=e.propagation=e.trace=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.baggageEntryMetadataFromString=void 0,n(j(),e);var r=K();Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return r.baggageEntryMetadataFromString}}),n(Q(),e),n(J(),e),n(Y(),e),n(Z(),e),n(ee(),e),n(te(),e),n(de(),e),n(he(),e),n(fe(),e),n(me(),e),n(ge(),e),n(ye(),e),n(ve(),e),n(be(),e),n(Se(),e),n(oe(),e),n(we(),e),n(Te(),e),n(_e(),e);var i=le();Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return i.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return i.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return i.isValidSpanId}});var o=se();Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return o.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return o.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return o.INVALID_SPAN_CONTEXT}}),n(ne(),e),n(Ee(),e);var s=ie();e.context=s.ContextAPI.getInstance();var a=Ce();e.trace=a.TraceAPI.getInstance();var c=Ie();e.propagation=c.PropagationAPI.getInstance();var l=V();e.diag=l.DiagAPI.instance(),e.default={trace:e.trace,context:e.context,propagation:e.propagation,diag:e.diag}})),Pe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTracingSuppressed=e.unsuppressTracing=e.suppressTracing=void 0;var t=Oe().createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");e.suppressTracing=function(e){return e.setValue(t,!0)},e.unsuppressTracing=function(e){return e.deleteValue(t)},e.isTracingSuppressed=function(e){return!0===e.getValue(t)}})),De=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BAGGAGE_MAX_TOTAL_LENGTH=e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=e.BAGGAGE_MAX_NAME_VALUE_PAIRS=e.BAGGAGE_HEADER=e.BAGGAGE_ITEMS_SEPARATOR=e.BAGGAGE_PROPERTIES_SEPARATOR=e.BAGGAGE_KEY_PAIR_SEPARATOR=void 0,e.BAGGAGE_KEY_PAIR_SEPARATOR="=",e.BAGGAGE_PROPERTIES_SEPARATOR=";",e.BAGGAGE_ITEMS_SEPARATOR=",",e.BAGGAGE_HEADER="baggage",e.BAGGAGE_MAX_NAME_VALUE_PAIRS=180,e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096,e.BAGGAGE_MAX_TOTAL_LENGTH=8192})),Ae=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseKeyPairsIntoRecord=e.parsePairKeyValue=e.getKeyPairs=e.serializeKeyPairs=void 0;var t=Oe(),n=De();e.serializeKeyPairs=e=>e.reduce(((e,t)=>{let r=`${e}${""!==e?n.BAGGAGE_ITEMS_SEPARATOR:""}${t}`;return r.length>n.BAGGAGE_MAX_TOTAL_LENGTH?e:r}),""),e.getKeyPairs=e=>e.getAllEntries().map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`)),e.parsePairKeyValue=e=>{let r=e.split(n.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let i=r.shift();if(!i)return;let o=i.split(n.BAGGAGE_KEY_PAIR_SEPARATOR);if(2!==o.length)return;let s,a=decodeURIComponent(o[0].trim()),c=decodeURIComponent(o[1].trim());return r.length>0&&(s=t.baggageEntryMetadataFromString(r.join(n.BAGGAGE_PROPERTIES_SEPARATOR))),{key:a,value:c,metadata:s}},e.parseKeyPairsIntoRecord=t=>"string"!=typeof t||0===t.length?{}:t.split(n.BAGGAGE_ITEMS_SEPARATOR).map((t=>e.parsePairKeyValue(t))).filter((e=>void 0!==e&&e.value.length>0)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})})),Ne=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpBaggagePropagator=void 0;var t=Oe(),n=Pe(),r=De(),i=Ae();e.HttpBaggagePropagator=class{inject(e,o,s){let a=t.propagation.getBaggage(e);if(!a||n.isTracingSuppressed(e))return;let c=i.getKeyPairs(a).filter((e=>e.length<=r.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS)).slice(0,r.BAGGAGE_MAX_NAME_VALUE_PAIRS),l=i.serializeKeyPairs(c);l.length>0&&s.set(o,r.BAGGAGE_HEADER,l)}extract(e,n,o){let s=o.get(n,r.BAGGAGE_HEADER);if(!s)return e;let a={};return 0===s.length||(s.split(r.BAGGAGE_ITEMS_SEPARATOR).forEach((e=>{let t=i.parsePairKeyValue(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),a[t.key]=e}})),0===Object.entries(a).length)?e:t.propagation.setBaggage(e,t.propagation.createBaggage(a))}fields(){return[r.BAGGAGE_HEADER]}}})),ke=S((e=>{"use strict";function t(e){return null==e||(Array.isArray(e)?function(e){let t;for(let r of e)if(null!=r){if(!t){if(n(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}(e):n(e))}function n(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.isAttributeValue=e.sanitizeAttributes=void 0,e.sanitizeAttributes=function(e){let n={};if(null==e||"object"!=typeof e)return n;for(let[r,i]of Object.entries(e))t(i)&&(Array.isArray(i)?n[r]=i.slice():n[r]=i);return n},e.isAttributeValue=t})),je=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loggingErrorHandler=void 0;var t=Oe();e.loggingErrorHandler=function(){return e=>{t.diag.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){let t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach((e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}})),qe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalErrorHandler=e.setGlobalErrorHandler=void 0;var t=je().loggingErrorHandler();e.setGlobalErrorHandler=function(e){t=e},e.globalErrorHandler=e=>{try{t(e)}catch{}}})),Me=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TracesSamplerValues=void 0,(t=e.TracesSamplerValues||(e.TracesSamplerValues={})).AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})),Le=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEnvironment=e.DEFAULT_ENVIRONMENT=void 0;var t=Oe(),n=Me(),r=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT"];function i(e){return r.indexOf(e)>-1}var o=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function s(e){return o.indexOf(e)>-1}function a(e,t,n,r=-1/0,i=1/0){if(typeof n[e]<"u"){let o=Number(n[e]);isNaN(o)||(t[e]=o<r?r:o>i?i:o)}}function c(e,t,n,r=","){let i=n[e];"string"==typeof i&&(t[e]=i.split(r).map((e=>e.trim())))}e.DEFAULT_ENVIRONMENT={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:t.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"none",OTEL_TRACES_SAMPLER:n.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:""};var l={ALL:t.DiagLogLevel.ALL,VERBOSE:t.DiagLogLevel.VERBOSE,DEBUG:t.DiagLogLevel.DEBUG,INFO:t.DiagLogLevel.INFO,WARN:t.DiagLogLevel.WARN,ERROR:t.DiagLogLevel.ERROR,NONE:t.DiagLogLevel.NONE};function u(e,t,n){let r=n[e];if("string"==typeof r){let n=l[r.toUpperCase()];null!=n&&(t[e]=n)}}e.parseEnvironment=function(t){let n={};for(let r in e.DEFAULT_ENVIRONMENT){let e=r;if("OTEL_LOG_LEVEL"===e)u(e,n,t);else if(i(e))a(e,n,t);else if(s(e))c(e,n,t);else{let r=t[e];typeof r<"u"&&null!==r&&(n[e]=String(r))}}return n}})),Fe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=void 0;var t=n(2037),r=Le();e.getEnv=function(){let e=r.parseEnvironment(process.env);return Object.assign({HOSTNAME:t.hostname()},r.DEFAULT_ENVIRONMENT,e)}})),Ue=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBase64=void 0,e.hexToBase64=function(e){let t=e.length,n="";for(let r=0;r<t;r+=2){let t=e.substring(r,r+2),i=parseInt(t,16);n+=String.fromCharCode(i)}return Buffer.from(n,"ascii").toString("base64")}})),Be=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomIdGenerator=void 0,e.RandomIdGenerator=class{constructor(){this.generateTraceId=n(16),this.generateSpanId=n(8)}};var t=Buffer.allocUnsafe(16);function n(e){return function(){for(let n=0;n<e/4;n++)t.writeUInt32BE(Math.random()*2**32>>>0,4*n);for(let n=0;n<e&&!(t[n]>0);n++)n===e-1&&(t[e-1]=1);return t.toString("hex",0,e)}}})),ze=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.otperformance=void 0;var t=n(4074);e.otperformance=t.performance})),He=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="0.23.0"})),Ge=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RpcGrpcStatusCodeValues=e.MessagingOperationValues=e.MessagingDestinationKindValues=e.HttpFlavorValues=e.NetTransportValues=e.FaasInvokedProviderValues=e.FaasDocumentOperationValues=e.FaasTriggerValues=e.DbCassandraConsistencyLevelValues=e.DbSystemValues=e.SemanticAttributes=void 0,e.SemanticAttributes={DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_METHOD:"rpc.jsonrpc.method",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message"},(t=e.DbSystemValues||(e.DbSystemValues={})).OTHER_SQL="other_sql",t.MSSQL="mssql",t.MYSQL="mysql",t.ORACLE="oracle",t.DB2="db2",t.POSTGRESQL="postgresql",t.REDSHIFT="redshift",t.HIVE="hive",t.CLOUDSCAPE="cloudscape",t.HSQLDB="hsqldb",t.PROGRESS="progress",t.MAXDB="maxdb",t.HANADB="hanadb",t.INGRES="ingres",t.FIRSTSQL="firstsql",t.EDB="edb",t.CACHE="cache",t.ADABAS="adabas",t.FIREBIRD="firebird",t.DERBY="derby",t.FILEMAKER="filemaker",t.INFORMIX="informix",t.INSTANTDB="instantdb",t.INTERBASE="interbase",t.MARIADB="mariadb",t.NETEZZA="netezza",t.PERVASIVE="pervasive",t.POINTBASE="pointbase",t.SQLITE="sqlite",t.SYBASE="sybase",t.TERADATA="teradata",t.VERTICA="vertica",t.H2="h2",t.COLDFUSION="coldfusion",t.CASSANDRA="cassandra",t.HBASE="hbase",t.MONGODB="mongodb",t.REDIS="redis",t.COUCHBASE="couchbase",t.COUCHDB="couchdb",t.COSMOSDB="cosmosdb",t.DYNAMODB="dynamodb",t.NEO4J="neo4j",t.GEODE="geode",t.ELASTICSEARCH="elasticsearch",t.MEMCACHED="memcached",t.COCKROACHDB="cockroachdb",function(e){e.ALL="all",e.EACH_QUORUM="each_quorum",e.QUORUM="quorum",e.LOCAL_QUORUM="local_quorum",e.ONE="one",e.TWO="two",e.THREE="three",e.LOCAL_ONE="local_one",e.ANY="any",e.SERIAL="serial",e.LOCAL_SERIAL="local_serial"}(e.DbCassandraConsistencyLevelValues||(e.DbCassandraConsistencyLevelValues={})),function(e){e.DATASOURCE="datasource",e.HTTP="http",e.PUBSUB="pubsub",e.TIMER="timer",e.OTHER="other"}(e.FaasTriggerValues||(e.FaasTriggerValues={})),function(e){e.INSERT="insert",e.EDIT="edit",e.DELETE="delete"}(e.FaasDocumentOperationValues||(e.FaasDocumentOperationValues={})),function(e){e.AWS="aws",e.AZURE="azure",e.GCP="gcp"}(e.FaasInvokedProviderValues||(e.FaasInvokedProviderValues={})),function(e){e.IP_TCP="ip_tcp",e.IP_UDP="ip_udp",e.IP="ip",e.UNIX="unix",e.PIPE="pipe",e.INPROC="inproc",e.OTHER="other"}(e.NetTransportValues||(e.NetTransportValues={})),function(e){e.HTTP_1_0="1.0",e.HTTP_1_1="1.1",e.HTTP_2_0="2.0",e.SPDY="SPDY",e.QUIC="QUIC"}(e.HttpFlavorValues||(e.HttpFlavorValues={})),function(e){e.QUEUE="queue",e.TOPIC="topic"}(e.MessagingDestinationKindValues||(e.MessagingDestinationKindValues={})),function(e){e.RECEIVE="receive",e.PROCESS="process"}(e.MessagingOperationValues||(e.MessagingOperationValues={})),function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"}(e.RpcGrpcStatusCodeValues||(e.RpcGrpcStatusCodeValues={}))})),Ve=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ge(),e)})),We=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetrySdkLanguageValues=e.OsTypeValues=e.HostArchValues=e.AwsEcsLaunchtypeValues=e.CloudPlatformValues=e.CloudProviderValues=e.ResourceAttributes=void 0,e.ResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},(t=e.CloudProviderValues||(e.CloudProviderValues={})).AWS="aws",t.AZURE="azure",t.GCP="gcp",function(e){e.AWS_EC2="aws_ec2",e.AWS_ECS="aws_ecs",e.AWS_EKS="aws_eks",e.AWS_LAMBDA="aws_lambda",e.AWS_ELASTIC_BEANSTALK="aws_elastic_beanstalk",e.AZURE_VM="azure_vm",e.AZURE_CONTAINER_INSTANCES="azure_container_instances",e.AZURE_AKS="azure_aks",e.AZURE_FUNCTIONS="azure_functions",e.AZURE_APP_SERVICE="azure_app_service",e.GCP_COMPUTE_ENGINE="gcp_compute_engine",e.GCP_CLOUD_RUN="gcp_cloud_run",e.GCP_KUBERNETES_ENGINE="gcp_kubernetes_engine",e.GCP_CLOUD_FUNCTIONS="gcp_cloud_functions",e.GCP_APP_ENGINE="gcp_app_engine"}(e.CloudPlatformValues||(e.CloudPlatformValues={})),function(e){e.EC2="ec2",e.FARGATE="fargate"}(e.AwsEcsLaunchtypeValues||(e.AwsEcsLaunchtypeValues={})),function(e){e.AMD64="amd64",e.ARM32="arm32",e.ARM64="arm64",e.IA64="ia64",e.PPC32="ppc32",e.PPC64="ppc64",e.X86="x86"}(e.HostArchValues||(e.HostArchValues={})),function(e){e.WINDOWS="windows",e.LINUX="linux",e.DARWIN="darwin",e.FREEBSD="freebsd",e.NETBSD="netbsd",e.OPENBSD="openbsd",e.DRAGONFLYBSD="dragonflybsd",e.HPUX="hpux",e.AIX="aix",e.SOLARIS="solaris",e.Z_OS="z_os"}(e.OsTypeValues||(e.OsTypeValues={})),function(e){e.CPP="cpp",e.DOTNET="dotnet",e.ERLANG="erlang",e.GO="go",e.JAVA="java",e.NODEJS="nodejs",e.PHP="php",e.PYTHON="python",e.RUBY="ruby",e.WEBJS="webjs"}(e.TelemetrySdkLanguageValues||(e.TelemetrySdkLanguageValues={}))})),$e=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(We(),e)})),Ke=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ve(),e),n($e(),e)})),Qe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDK_INFO=void 0;var t=He(),n=Ke();e.SDK_INFO={[n.ResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[n.ResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[n.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.TelemetrySdkLanguageValues.NODEJS,[n.ResourceAttributes.TELEMETRY_SDK_VERSION]:t.VERSION}})),Je=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unrefTimer=void 0,e.unrefTimer=function(e){e.unref()}})),Xe=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Fe(),e),n(Ue(),e),n(Be(),e),n(ze(),e),n(Qe(),e),n(Je(),e)})),Ye=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Xe(),e)})),Ze=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeInput=e.isTimeInputHrTime=e.hrTimeToMicroseconds=e.hrTimeToMilliseconds=e.hrTimeToNanoseconds=e.hrTimeToTimeStamp=e.hrTimeDuration=e.timeInputToHrTime=e.hrTime=void 0;var t=Ye(),n=9,r=Math.pow(10,n);function i(e){let t=e/1e3,i=Math.trunc(t);return[i,Number((t-i).toFixed(n))*r]}function o(){let e=t.otperformance.timeOrigin;if("number"!=typeof e){let n=t.otperformance;e=n.timing&&n.timing.fetchStart}return e}function s(e){let n=i(o()),s=i("number"==typeof e?e:t.otperformance.now()),a=n[0]+s[0],c=n[1]+s[1];return c>r&&(c-=r,a+=1),[a,c]}function a(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}e.hrTime=s,e.timeInputToHrTime=function(e){if(a(e))return e;if("number"==typeof e)return e<o()?s(e):i(e);if(e instanceof Date)return i(e.getTime());throw TypeError("Invalid input type")},e.hrTimeDuration=function(e,t){let n=t[0]-e[0],i=t[1]-e[1];return i<0&&(n-=1,i+=r),[n,i]},e.hrTimeToTimeStamp=function(e){let t=n,r=`${"0".repeat(t)}${e[1]}Z`,i=r.substr(r.length-t-1);return new Date(1e3*e[0]).toISOString().replace("000Z",i)},e.hrTimeToNanoseconds=function(e){return e[0]*r+e[1]},e.hrTimeToMilliseconds=function(e){return Math.round(1e3*e[0]+e[1]/1e6)},e.hrTimeToMicroseconds=function(e){return Math.round(1e6*e[0]+e[1]/1e3)},e.isTimeInputHrTime=a,e.isTimeInput=function(e){return a(e)||"number"==typeof e||e instanceof Date}})),et=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),tt=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ExportResultCode=void 0,(t=e.ExportResultCode||(e.ExportResultCode={}))[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})),nt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePropagator=void 0;var t=Oe();e.CompositePropagator=class{constructor(e={}){var t;this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((e=>"function"==typeof e.fields?e.fields():[])).reduce(((e,t)=>e.concat(t)),[])))}inject(e,n,r){for(let i of this._propagators)try{i.inject(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}}extract(e,n,r){return this._propagators.reduce(((e,i)=>{try{return i.extract(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return e}),e)}fields(){return this._fields.slice()}}})),rt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateValue=e.validateKey=void 0;var t="[_0-9a-z-*/]",n=new RegExp(`^(?:[a-z]${t}{0,255}|[a-z0-9]${t}{0,240}@[a-z]${t}{0,13})$`),r=/^[ -~]{0,255}[!-~]$/,i=/,|=/;e.validateKey=function(e){return n.test(e)},e.validateValue=function(e){return r.test(e)&&!i.test(e)}})),it=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceState=void 0;var t=rt(),n=class{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>(e.push(t+"="+this.get(t)),e)),[]).join(",")}_parse(e){e.length>512||(this._internalState=e.split(",").reverse().reduce(((e,n)=>{let r=n.trim(),i=r.indexOf("=");if(-1!==i){let o=r.slice(0,i),s=r.slice(i+1,n.length);t.validateKey(o)&&t.validateValue(s)&&e.set(o,s)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new n;return e._internalState=new Map(this._internalState),e}};e.TraceState=n})),ot=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpTraceContextPropagator=e.parseTraceParent=e.TRACE_STATE_HEADER=e.TRACE_PARENT_HEADER=void 0;var t=Oe(),n=Pe(),r=it();e.TRACE_PARENT_HEADER="traceparent",e.TRACE_STATE_HEADER="tracestate";var i=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function o(e){let t=i.exec(e);return!t||"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}e.parseTraceParent=o,e.HttpTraceContextPropagator=class{inject(r,i,o){let s=t.trace.getSpanContext(r);if(!s||n.isTracingSuppressed(r)||!t.isSpanContextValid(s))return;let a=`00-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||t.TraceFlags.NONE).toString(16)}`;o.set(i,e.TRACE_PARENT_HEADER,a),s.traceState&&o.set(i,e.TRACE_STATE_HEADER,s.traceState.serialize())}extract(n,i,s){let a=s.get(i,e.TRACE_PARENT_HEADER);if(!a)return n;let c=Array.isArray(a)?a[0]:a;if("string"!=typeof c)return n;let l=o(c);if(!l)return n;l.isRemote=!0;let u=s.get(i,e.TRACE_STATE_HEADER);if(u){let e=Array.isArray(u)?u.join(","):u;l.traceState=new r.TraceState("string"==typeof e?e:void 0)}return t.trace.setSpanContext(n,l)}fields(){return[e.TRACE_PARENT_HEADER,e.TRACE_STATE_HEADER]}}})),st=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),at=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRPCMetadata=e.deleteRPCMetadata=e.setRPCMetadata=e.RPCType=void 0;var t=Oe().createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");(e.RPCType||(e.RPCType={})).HTTP="http",e.setRPCMetadata=function(e,n){return e.setValue(t,n)},e.deleteRPCMetadata=function(e){return e.deleteValue(t)},e.getRPCMetadata=function(e){return e.getValue(t)}})),ct=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOffSampler=void 0;var t=Oe();e.AlwaysOffSampler=class{shouldSample(){return{decision:t.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}})),lt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOnSampler=void 0;var t=Oe();e.AlwaysOnSampler=class{shouldSample(){return{decision:t.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}})),ut=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParentBasedSampler=void 0;var t=Oe(),n=qe(),r=ct(),i=lt();e.ParentBasedSampler=class{constructor(e){var t,o,s,a;this._root=e.root,this._root||(n.globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new i.AlwaysOnSampler),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new i.AlwaysOnSampler,this._remoteParentNotSampled=null!==(o=e.remoteParentNotSampled)&&void 0!==o?o:new r.AlwaysOffSampler,this._localParentSampled=null!==(s=e.localParentSampled)&&void 0!==s?s:new i.AlwaysOnSampler,this._localParentNotSampled=null!==(a=e.localParentNotSampled)&&void 0!==a?a:new r.AlwaysOffSampler}shouldSample(e,n,r,i,o,s){let a=t.trace.getSpanContext(e);return a&&t.isSpanContextValid(a)?a.isRemote?a.traceFlags&t.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,s):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,s):a.traceFlags&t.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,s):this._localParentNotSampled.shouldSample(e,n,r,i,o,s):this._root.shouldSample(e,n,r,i,o,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}})),dt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceIdRatioBasedSampler=void 0;var t=Oe();e.TraceIdRatioBasedSampler=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}shouldSample(e,n){return{decision:t.isValidTraceId(n)&&this._accumulate(n)<this._upperBound?t.SamplingDecision.RECORD_AND_SAMPLED:t.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){let r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t}}})),pt=S((e=>{"use strict";function t(e,t){return"string"==typeof t?e===t:t.test(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.isUrlIgnored=e.urlMatches=void 0,e.urlMatches=t,e.isUrlIgnored=function(e,n){if(!n)return!1;for(let r of n)if(t(e,r))return!0;return!1}})),ht=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWrapped=void 0,e.isWrapped=function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}})),ft=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.baggageUtils=void 0,n(Ne(),e),n(ke(),e),n(qe(),e),n(je(),e),n(Ze(),e),n(et(),e),n(tt(),e),n(He(),e),e.baggageUtils=Ae(),n(Ye(),e),n(nt(),e),n(ot(),e),n(st(),e),n(at(),e),n(ct(),e),n(lt(),e),n(ut(),e),n(dt(),e),n(Pe(),e),n(it(),e),n(Le(),e),n(Me(),e),n(pt(),e),n(ht(),e),n(He(),e)})),mt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionEventName=void 0,e.ExceptionEventName="exception"})),gt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0;var t=Oe(),n=ft(),r=Ke(),i=mt();e.Span=class{constructor(e,r,i,o,s,a,c=[],l=n.hrTime()){this.attributes={},this.links=[],this.events=[],this.status={code:t.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=o,this.parentSpanId=a,this.kind=s,this.links=c,this.startTime=n.timeInputToHrTime(l),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}spanContext(){return this._spanContext}setAttribute(e,r){return null==r||this._isSpanEnded()?this:0===e.length?(t.diag.warn(`Invalid attribute key: ${e}`),this):n.isAttributeValue(r)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=r),this):(t.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}addEvent(e,r,i){return this._isSpanEnded()||(this.events.length>=this._spanLimits.eventCountLimit&&(t.diag.warn("Dropping extra events."),this.events.shift()),n.isTimeInput(r)&&(typeof i>"u"&&(i=r),r=void 0),typeof i>"u"&&(i=n.hrTime()),this.events.push({name:e,attributes:r,time:n.timeInputToHrTime(i)})),this}setStatus(e){return this._isSpanEnded()||(this.status=e),this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e=n.hrTime()){this._isSpanEnded()?t.diag.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=n.timeInputToHrTime(e),this._duration=n.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0&&t.diag.warn("Inconsistent start and end time, startTime > endTime",this.startTime,this.endTime),this._spanProcessor.onEnd(this))}isRecording(){return!1===this._ended}recordException(e,o=n.hrTime()){let s={};"string"==typeof e?s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?s[r.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(s[r.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(s[r.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),s[r.SemanticAttributes.EXCEPTION_TYPE]||s[r.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(i.ExceptionEventName,s,o):t.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}_isSpanEnded(){return this._ended&&t.diag.warn("Can not execute the operation on ended Span {traceId: %s, spanId: %s}",this._spanContext.traceId,this._spanContext.spanId),this._ended}}})),yt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildSamplerFromEnv=e.DEFAULT_CONFIG=void 0;var t=Oe(),n=ft(),r=n.getEnv(),i=n.TracesSamplerValues.AlwaysOn;function o(e=n.getEnv()){switch(e.OTEL_TRACES_SAMPLER){case n.TracesSamplerValues.AlwaysOn:return new n.AlwaysOnSampler;case n.TracesSamplerValues.AlwaysOff:return new n.AlwaysOffSampler;case n.TracesSamplerValues.ParentBasedAlwaysOn:return new n.ParentBasedSampler({root:new n.AlwaysOnSampler});case n.TracesSamplerValues.ParentBasedAlwaysOff:return new n.ParentBasedSampler({root:new n.AlwaysOffSampler});case n.TracesSamplerValues.TraceIdRatio:return new n.TraceIdRatioBasedSampler(a(e));case n.TracesSamplerValues.ParentBasedTraceIdRatio:return new n.ParentBasedSampler({root:new n.TraceIdRatioBasedSampler(a(e))});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${e.OTEL_TRACES_SAMPLER} invalid, defaulting to ${i}".`),new n.AlwaysOnSampler}}e.DEFAULT_CONFIG={sampler:o(r),forceFlushTimeoutMillis:3e4,spanLimits:{attributeCountLimit:n.getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:n.getEnv().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:n.getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT}},e.buildSamplerFromEnv=o;var s=1;function a(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return t.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${s}.`),s;let n=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${s}.`),s):n<0||n>1?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${s}.`),s):n}})),vt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConfig=void 0;var t=yt();e.mergeConfig=function(e){let n={sampler:t.buildSamplerFromEnv()},r=Object.assign({},t.DEFAULT_CONFIG,n,e);return r.spanLimits=Object.assign({},t.DEFAULT_CONFIG.spanLimits,e.spanLimits||{}),r}})),bt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tracer=void 0;var t=Oe(),n=ft(),r=gt(),i=vt();e.Tracer=class{constructor(e,t,r){this._tracerProvider=r;let o=i.mergeConfig(t);this._sampler=o.sampler,this._spanLimits=o.spanLimits,this._idGenerator=t.idGenerator||new n.RandomIdGenerator,this.resource=r.resource,this.instrumentationLibrary=e}startSpan(e,i={},o=t.context.active()){var s,a;if(n.isTracingSuppressed(o))return t.diag.debug("Instrumentation suppressed, returning Noop Span"),t.trace.wrapSpanContext(t.INVALID_SPAN_CONTEXT);let c,l,u,d=function(e,n){if(!e.root)return t.trace.getSpanContext(n)}(i,o),p=this._idGenerator.generateSpanId();d&&t.trace.isSpanContextValid(d)?(c=d.traceId,l=d.traceState,u=d.spanId):c=this._idGenerator.generateTraceId();let h=null!==(s=i.kind)&&void 0!==s?s:t.SpanKind.INTERNAL,f=null!==(a=i.links)&&void 0!==a?a:[],m=n.sanitizeAttributes(i.attributes),g=this._sampler.shouldSample(i.root?t.trace.setSpanContext(o,t.INVALID_SPAN_CONTEXT):o,c,e,h,m,f),y={traceId:c,spanId:p,traceFlags:g.decision===t.SamplingDecision.RECORD_AND_SAMPLED?t.TraceFlags.SAMPLED:t.TraceFlags.NONE,traceState:l};if(g.decision===t.SamplingDecision.NOT_RECORD)return t.diag.debug("Recording is off, propagating context in a non-recording span"),t.trace.wrapSpanContext(y);let v=new r.Span(this,o,e,y,h,u,f,i.startTime);return v.setAttributes(Object.assign(m,g.attributes)),v}startActiveSpan(e,n,r,i){let o,s,a;if(arguments.length<2)return;2===arguments.length?a=n:3===arguments.length?(o=n,a=r):(o=n,s=r,a=i);let c=s??t.context.active(),l=this.startSpan(e,o,c),u=t.trace.setSpan(c,l);return t.context.with(u,a,void 0,l)}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}})),St=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultServiceName=void 0,e.defaultServiceName=function(){return`unknown_service:${process.argv0}`}})),wt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectResources=void 0;var t=xt(),r=Oe(),i=n(3837);e.detectResources=async(e={})=>{let n=Object.assign(e),i=await Promise.all((n.detectors||[]).map((async e=>{try{let t=await e.detect(n);return r.diag.debug(`${e.constructor.name} found resource.`,t),t}catch(n){return r.diag.debug(`${e.constructor.name} failed: ${n.message}`),t.Resource.empty()}})));return o(i),i.reduce(((e,t)=>e.merge(t)),t.Resource.empty())};var o=e=>{e.forEach((e=>{if(Object.keys(e.attributes).length>0){let t=i.inspect(e.attributes,{depth:2,breakLength:1/0,sorted:!0,compact:!1});r.diag.verbose(t)}}))}})),Tt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envDetector=void 0;var t=Oe(),n=ft(),r=Ke(),i=Pt();e.envDetector=new class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}async detect(e){let o={},s=n.getEnv(),a=s.OTEL_RESOURCE_ATTRIBUTES,c=s.OTEL_SERVICE_NAME;if(a)try{let e=this._parseResourceAttributes(a);Object.assign(o,e)}catch(e){t.diag.debug(`EnvDetector failed: ${e.message}`)}return c&&(o[r.ResourceAttributes.SERVICE_NAME]=c),new i.Resource(o)}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR,-1);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2!==n.length)continue;let[r,i]=n;if(r=r.trim(),i=i.trim().split('^"|"$').join(""),!this._isValidAndNotEmpty(r))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(i))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[r]=i}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isPrintableString(e)}_isPrintableString(e){for(let t=0;t<e.length;t++){let n=e.charAt(t);if(n<=" "||n>="~")return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}}})),_t=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processDetector=void 0;var t=Oe(),n=Ke(),r=Pt();e.processDetector=new class{async detect(e){let t={[n.ResourceAttributes.PROCESS_PID]:process.pid,[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title||"",[n.ResourceAttributes.PROCESS_COMMAND]:process.argv[1]||"",[n.ResourceAttributes.PROCESS_COMMAND_LINE]:process.argv.join(" ")||""};return this._getResourceAttributes(t,e)}_getResourceAttributes(e,i){return""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]||""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_PATH]||""===e[n.ResourceAttributes.PROCESS_COMMAND]||""===e[n.ResourceAttributes.PROCESS_COMMAND_LINE]?(t.diag.debug("ProcessDetector failed: Unable to find required process resources. "),r.Resource.empty()):new r.Resource(Object.assign({},e))}}})),Et=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Tt(),e),n(_t(),e)})),Ct=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(St(),e),n(wt(),e),n(Et(),e)})),Rt=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ct(),e)})),xt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Resource=void 0;var t=Ke(),n=ft(),r=Rt(),i=class{constructor(e){this.attributes=e}static empty(){return i.EMPTY}static default(){return new i({[t.ResourceAttributes.SERVICE_NAME]:r.defaultServiceName(),[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE],[t.ResourceAttributes.TELEMETRY_SDK_NAME]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_NAME],[t.ResourceAttributes.TELEMETRY_SDK_VERSION]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_VERSION]})}merge(e){if(!e||!Object.keys(e.attributes).length)return this;let t=Object.assign({},this.attributes,e.attributes);return new i(t)}};e.Resource=i,i.EMPTY=new i({})})),It=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ot=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Pt=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(xt(),e),n(Rt(),e),n(It(),e),n(Ot(),e)})),Dt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSpanProcessor=void 0;var t=ft();e.MultiSpanProcessor=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise((n=>{Promise.all(e).then((()=>{n()})).catch((e=>{t.globalErrorHandler(e||new Error("MultiSpanProcessor: forceFlush failed")),n()}))}))}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise(((t,n)=>{Promise.all(e).then((()=>{t()}),n)}))}}})),At=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopSpanProcessor=void 0,e.NoopSpanProcessor=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}})),Nt=S(((e,t)=>{var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",c="[object Null]",l="[object Object]",u="[object Proxy]",d="[object Undefined]",p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[i]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[s]=f["[object Map]"]=f["[object Number]"]=f[l]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var m,g="object"==typeof global&&global&&global.Object===Object&&global,y="object"==typeof self&&self&&self.Object===Object&&self,v=g||y||Function("return this")(),b="object"==typeof e&&e&&!e.nodeType&&e,S=b&&"object"==typeof t&&t&&!t.nodeType&&t,w=S&&S.exports===b,T=w&&g.process,_=function(){try{return S&&S.require&&S.require("util").types||T&&T.binding&&T.binding("util")}catch{}}(),E=_&&_.isTypedArray,C=Array.prototype,R=Function.prototype,x=Object.prototype,I=v["__core-js_shared__"],O=R.toString,P=x.hasOwnProperty,D=(m=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",A=x.toString,N=O.call(Object),k=RegExp("^"+O.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=w?v.Buffer:void 0,q=v.Symbol,M=v.Uint8Array,L=(j&&j.allocUnsafe,function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object)),F=Object.create,U=x.propertyIsEnumerable,B=C.splice,z=q?q.toStringTag:void 0,H=function(){try{var e=ue(Object,"defineProperty");return e({},"",{}),e}catch{}}(),G=j?j.isBuffer:void 0,V=Math.max,W=Date.now,$=ue(v,"Map"),K=ue(Object,"create"),Q=function(){function e(){}return function(t){if(!Te(t))return{};if(F)return F(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function J(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Z(e){var t=this.__data__=new X(e);this.size=t.size}function ee(e,t,n){(void 0!==n&&!me(e[t],n)||void 0===n&&!(t in e))&&re(e,t,n)}function te(e,t,n){var r=e[t];(!P.call(e,t)||!me(r,n)||void 0===n&&!(t in e))&&re(e,t,n)}function ne(e,t){for(var n=e.length;n--;)if(me(e[n][0],t))return n;return-1}function re(e,t,n){"__proto__"==t&&H?H(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}J.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},J.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},J.prototype.get=function(e){var t=this.__data__;if(K){var r=t[e];return r===n?void 0:r}return P.call(t,e)?t[e]:void 0},J.prototype.has=function(e){var t=this.__data__;return K?void 0!==t[e]:P.call(t,e)},J.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=K&&void 0===t?n:t,this},X.prototype.clear=function(){this.__data__=[],this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=ne(t,e);return!(n<0||(n==t.length-1?t.pop():B.call(t,n,1),--this.size,0))},X.prototype.get=function(e){var t=this.__data__,n=ne(t,e);return n<0?void 0:t[n][1]},X.prototype.has=function(e){return ne(this.__data__,e)>-1},X.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new J,map:new($||X),string:new J}},Y.prototype.delete=function(e){var t=le(this,e).delete(e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return le(this,e).get(e)},Y.prototype.has=function(e){return le(this,e).has(e)},Y.prototype.set=function(e,t){var n=le(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof X){var r=n.__data__;if(!$||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Y(r)}return n.set(e,t),this.size=n.size,this};var ie=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var a=o[++r];if(!1===t(i[a],a,i))break}return e};function oe(e){return null==e?void 0===e?d:c:z&&z in Object(e)?function(e){var t=P.call(e,z),n=e[z];try{e[z]=void 0;var r=!0}catch{}var i=A.call(e);return r&&(t?e[z]=n:delete e[z]),i}(e):function(e){return A.call(e)}(e)}function se(e){return _e(e)&&oe(e)==i}function ae(e,t,n,r,i){e!==t&&ie(t,(function(o,s){if(i||(i=new Z),Te(o))!function(e,t,n,r,i,o,s){var a=he(e,n),c=he(t,n),u=s.get(c);if(u)ee(e,n,u);else{var d=o?o(a,c,n+"",e,t,s):void 0,p=void 0===d;if(p){var h=ye(c),f=!h&&be(c),m=!h&&!f&&Ee(c);d=c,h||f||m?ye(a)?d=a:function(e){return _e(e)&&ve(e)}(a)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):f?(p=!1,d=function(e,t){return e.slice()}(c)):m?(p=!1,d=function(e,t){var n=function(e){var t=new e.constructor(e.byteLength);return new M(t).set(new M(e)),t}(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}(c)):d=[]:function(e){if(!_e(e)||oe(e)!=l)return!1;var t=L(e);if(null===t)return!0;var n=P.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&O.call(n)==N}(c)||ge(c)?(d=a,ge(a)?d=function(e){return function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],c=void 0;void 0===c&&(c=e[a]),i?re(n,a,c):te(n,a,c)}return n}(e,Ce(e))}(a):(!Te(a)||Se(a))&&(d=function(e){return"function"!=typeof e.constructor||pe(e)?{}:Q(L(e))}(c))):p=!1}p&&(s.set(c,d),i(d,c,r,o,s),s.delete(c)),ee(e,n,d)}}(e,t,s,n,ae,r,i);else{var a=r?r(he(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),ee(e,s,a)}}),Ce)}var ce=H?function(e,t){return H(e,"toString",{configurable:!0,enumerable:!1,value:xe(t),writable:!0})}:Ie;function le(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Te(e)||function(e){return!!D&&D in e}(e))&&(Se(e)?k:p).test(function(e){if(null!=e){try{return O.call(e)}catch{}try{return e+""}catch{}}return""}(e))}(n)?n:void 0}function de(e,t){var n=typeof e;return!!(t=t??r)&&("number"==n||"symbol"!=n&&h.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||x)}function he(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var fe=function(e){var t=0,n=0;return function(){var r=W(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ce);function me(e,t){return e===t||e!=e&&t!=t}var ge=se(function(){return arguments}())?se:function(e){return _e(e)&&P.call(e,"callee")&&!U.call(e,"callee")},ye=Array.isArray;function ve(e){return null!=e&&we(e.length)&&!Se(e)}var be=G||function(){return!1};function Se(e){if(!Te(e))return!1;var t=oe(e);return t==s||t==a||t==o||t==u}function we(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function _e(e){return null!=e&&"object"==typeof e}var Ee=E?function(e){return function(t){return e(t)}}(E):function(e){return _e(e)&&we(e.length)&&!!f[oe(e)]};function Ce(e){return ve(e)?function(e,t){var n=ye(e),r=!n&&ge(e),i=!n&&!r&&be(e),o=!n&&!r&&!i&&Ee(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var l in e)(t||P.call(e,l))&&(!s||!("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||de(l,c)))&&a.push(l);return a}(e,!0):function(e){if(!Te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=pe(e),n=[];for(var r in e)"constructor"==r&&(t||!P.call(e,r))||n.push(r);return n}(e)}var Re=function(e){return function(e,t){return fe(function(e,t,n){return t=V(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=V(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,Ie),e+"")}((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&function(e,t,n){if(!Te(n))return!1;var r=typeof t;return!!("number"==r?ve(n)&&de(t,n.length):"string"==r&&t in n)&&me(n[t],e)}(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r)}return t}))}((function(e,t,n){ae(e,t,n)}));function xe(e){return function(){return e}}function Ie(e){return e}t.exports=Re})),kt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessorBase=void 0;var t=Oe(),n=ft();e.BatchSpanProcessorBase=class{constructor(e,t){this._exporter=e,this._finishedSpans=[],this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve();let r=n.getEnv();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT}forceFlush(){return this._isShutdown?this._shuttingDownPromise:this._flushAll()}onStart(e){}onEnd(e){this._isShutdown||this._addToBuffer(e)}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this.onShutdown())).then((()=>this._flushAll())).then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}_addToBuffer(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())}_flushAll(){return new Promise(((e,t)=>{let n=[];for(let e=0,t=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then((()=>{e()})).catch(t)}))}_flushOneBatch(){return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise(((e,r)=>{let i=setTimeout((()=>{r(new Error("Timeout"))}),this._exportTimeoutMillis);t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export(this._finishedSpans.splice(0,this._maxExportBatchSize),(t=>{var o;clearTimeout(i),t.code===n.ExportResultCode.SUCCESS?e():r(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))}))}))}_maybeStartTimer(){void 0===this._timer&&(this._timer=setTimeout((()=>{this._flushOneBatch().then((()=>{this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())})).catch((e=>{n.globalErrorHandler(e)}))}),this._scheduledDelayMillis),n.unrefTimer(this._timer))}_clearTimer(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}})),jt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessor=void 0;var t=kt(),n=class extends t.BatchSpanProcessorBase{onShutdown(){}};e.BatchSpanProcessor=n})),qt=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(jt(),e)})),Mt=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(qt(),e)})),Lt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTracerProvider=e.ForceFlushState=void 0;var t,n,r=Oe(),i=ft(),o=Pt(),s=$t(),a=yt(),c=Dt(),l=At(),u=Nt(),d=Mt();(n=t=e.ForceFlushState||(e.ForceFlushState={}))[n.resolved=0]="resolved",n[n.timeout=1]="timeout",n[n.error=2]="error",n[n.unresolved=3]="unresolved";var p=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let n=u({},a.DEFAULT_CONFIG,e);this.resource=null!==(t=n.resource)&&void 0!==t?t:o.Resource.empty(),this.resource=o.Resource.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});let r=this._buildExporterFromEnv();if(void 0!==r){let e=new d.BatchSpanProcessor(r);this.activeSpanProcessor=e}else this.activeSpanProcessor=new l.NoopSpanProcessor}getTracer(e,t){let n=`${e}@${t||""}`;return this._tracers.has(n)||this._tracers.set(n,new s.Tracer({name:e,version:t},this._config,this)),this._tracers.get(n)}addSpanProcessor(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((e=>r.diag.error("Error while trying to shutdown current span processor",e))),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new c.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){r.trace.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&r.context.setGlobalContextManager(e.contextManager),e.propagator&&r.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map((n=>new Promise((r=>{let i,o=setTimeout((()=>{r(new Error(`Span processor did not completed within timeout period of ${e} ms`)),i=t.timeout}),e);n.forceFlush().then((()=>{clearTimeout(o),i!==t.timeout&&(i=t.resolved,r(i))})).catch((e=>{clearTimeout(o),i=t.error,r(e)}))}))));return new Promise(((e,r)=>{Promise.all(n).then((n=>{let i=n.filter((e=>e!==t.resolved));i.length>0?r(i):e()})).catch((e=>r([e])))}))}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return null===(t=p._registeredPropagators.get(e))||void 0===t?void 0:t()}_getSpanExporter(e){var t;return null===(t=p._registeredExporters.get(e))||void 0===t?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(i.getEnv().OTEL_PROPAGATORS)),t=e.map((e=>{let t=this._getPropagator(e);return t||r.diag.warn(`Propagator "${e}" requested through environment variable is unavailable.`),t})).reduce(((e,t)=>(t&&e.push(t),e)),[]);if(0!==t.length)return 1===e.length?t[0]:new i.CompositePropagator({propagators:t})}_buildExporterFromEnv(){let e=i.getEnv().OTEL_TRACES_EXPORTER;if("none"===e)return;let t=this._getSpanExporter(e);return t||r.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};e.BasicTracerProvider=p,p._registeredPropagators=new Map([["tracecontext",()=>new i.HttpTraceContextPropagator],["baggage",()=>new i.HttpBaggagePropagator]]),p._registeredExporters=new Map})),Ft=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleSpanExporter=void 0;var t=ft();e.ConsoleSpanExporter=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),Promise.resolve()}_exportInfo(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:t.hrTimeToMicroseconds(e.startTime),duration:t.hrTimeToMicroseconds(e.duration),attributes:e.attributes,status:e.status,events:e.events}}_sendSpans(e,n){for(let t of e)console.log(this._exportInfo(t));if(n)return n({code:t.ExportResultCode.SUCCESS})}}})),Ut=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemorySpanExporter=void 0;var t=ft();e.InMemorySpanExporter=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,n){if(this._stopped)return n({code:t.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout((()=>n({code:t.ExportResultCode.SUCCESS})),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}})),Bt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),zt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSpanProcessor=void 0;var t=Oe(),n=ft();e.SimpleSpanProcessor=class{constructor(e){this._exporter=e,this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve()}forceFlush(){return Promise.resolve()}onStart(e){}onEnd(e){this._isShutdown||t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export([e],(e=>{var t;e.code!==n.ExportResultCode.SUCCESS&&n.globalErrorHandler(null!==(t=e.error)&&void 0!==t?t:new Error(`SimpleSpanProcessor: span export failed (status ${e})`))}))}))}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}}})),Ht=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Gt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Vt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Wt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),$t=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(bt(),e),n(Lt(),e),n(Mt(),e),n(Ft(),e),n(Ut(),e),n(Bt(),e),n(zt(),e),n(Ht(),e),n(At(),e),n(gt(),e),n(Gt(),e),n(Vt(),e),n(Wt(),e)})),Kt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.azureCoreTracing=e.AzureMonitorSymbol=void 0;var t=k();e.AzureMonitorSymbol="Azure_Monitor_Tracer";var n=!1;e.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(r){if(n)return r;try{var i=$t(),o=Oe(),s=(new i.BasicTracerProvider).getTracer("applicationinsights tracer"),a=r.setTracer;r.setTracer=function(n){var r=n.startSpan;n.startSpan=function(e,n,i){var o=r.call(this,e,n,i),s=o.end;return o.end=function(){var e=s.apply(this,arguments);return t.channel.publish("azure-coretracing",o),e},o},n[e.AzureMonitorSymbol]=!0,a.call(this,n)},o.trace.getSpan(o.context.active()),r.setTracer(s),n=!0}catch{}return r}},e.enable=function(){t.channel.registerMonkeyPatch("@azure/core-tracing",e.azureCoreTracing)}})),Qt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.bunyan=void 0;var t=k();e.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var n=e.prototype._emit;return e.prototype._emit=function(e,r){var i=n.apply(this,arguments);if(!r){var o=i;o||(o=n.call(this,e,!0)),t.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},e.enable=function(){t.channel.registerMonkeyPatch("bunyan",e.bunyan)}})),Jt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.console=void 0;var t=k(),r=n(2781);e.console={versionSpecifier:">= 4.0.0",patch:function(e){var n=new r.Writable,i=new r.Writable;n.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n}),!0},i.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n,stderr:!0}),!0};for(var o=new e.Console(n,i),s=function(t){var n=e[t];n&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch{}return n.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a<c.length;a++)s(c[a]);return e}},e.enable=function(){t.channel.registerMonkeyPatch("console",e.console),n(6206)}})),Xt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongoCore=void 0;var t=k();e.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=n.apply(this,arguments),r=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=t.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=t.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},e.enable=function(){t.channel.registerMonkeyPatch("mongodb-core",e.mongoCore)}})),Yt=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongo330=e.mongo3=e.mongo2=void 0;var n=k();e.mongo2={versionSpecifier:">= 2.0.0 <= 3.0.5",patch:function(e){var r=e.instrument({operationIdGenerator:{next:function(){return n.channel.bindToContext((function(e){return e()}))}}}),i={};return r.on("started",(function(e){i[e.requestId]||(i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},e.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var r=e.instrument(),i={},o={};return r.on("started",(function(e){i[e.requestId]||(o[e.requestId]=n.channel.bindToContext((function(e){return e()})),i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete o[e.requestId])})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete o[e.requestId])})),e}},e.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=n.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=n.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e}}(e);var t=e.instrument(),r={},i={};return t.on("started",(function(e){r[e.requestId]||(i[e.requestId]=n.channel.bindToContext((function(e){return e()})),r[e.requestId]=e)})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete i[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete i[e.requestId])})),e}},e.enable=function(){n.channel.registerMonkeyPatch("mongodb",e.mongo2),n.channel.registerMonkeyPatch("mongodb",e.mongo3),n.channel.registerMonkeyPatch("mongodb",e.mongo330)}})),Zt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mysql=void 0;var t=k(),r=n(1017);e.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,i){var o=function(e,n){return function(n,r){var i=e[n];i&&(e[n]=function(){for(var e=arguments.length-1,n=arguments.length-1;n>=0;--n){if("function"==typeof arguments[n]){e=n;break}if(typeof arguments[n]<"u")break}var o=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof o&&(r?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=t.channel.bindToContext(r(s,o))):arguments[e]=t.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=n(5029)(r.dirname(i)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return s(a)(e)})),o(a)("createQuery",(function(e,n){return function(r){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;t.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:r,duration:o,time:e.startDate}),n.apply(this,arguments)}}));var c=n(3437)(r.dirname(i)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return s(c)(e)})),e}},e.enable=function(){t.channel.registerMonkeyPatch("mysql",e.mysql)}})),en=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgresPool1=void 0;var t=k();e.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var n=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=t.channel.bindToContext(e)),n.apply(this,arguments)},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg-pool",e.postgresPool1)}})),tn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgres7=e.postgres6=void 0;var t=k(),r=n(2361);e.postgres6={versionSpecifier:"6.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},l=process.hrtime();function u(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(l);if(c.result=i&&{rowCount:i.rowCount,command:i.command},c.error=n,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",c),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(c.query.preparable={text:e,args:n},s=u(s)):(c.query.text=e,s?s=u(s):n=u(n)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=u(s):n?n=u(n):e.callback=u(e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments)},e}},e.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c=this,l=!!s,u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime();function p(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(d);if(u.result=i&&{rowCount:i.rowCount,command:i.command},u.error=n,u.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",u),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(u.query.preparable={text:e,args:n},s=(l="function"==typeof s)?p(s):s):(u.query.text=e,s?s=(l="function"==typeof s)?p(s):s:n=(l="function"==typeof n)?p(n):n):("string"==typeof e.name?u.query.plan=e.name:e.values instanceof Array?u.query.preparable={text:e.text,args:e.values}:u.query.text=e.text,s?(l="function"==typeof s,s=p(s)):n?n=(l="function"==typeof n)?p(n):n:(l="function"==typeof e.callback,e.callback=l?p(e.callback):e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments),l?a:a.then((function(e){return p()(void 0,e),new c._Promise((function(t,n){t(e)}))})).catch((function(e){return p()(e,void 0),new c._Promise((function(t,n){n(e)}))}))},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg",e.postgres6),t.channel.registerMonkeyPatch("pg",e.postgres7)}})),nn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.redis=void 0;var t=k();e.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var r=e.callback;if(!r||!r.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;e.callback=t.channel.bindToContext((function(n,a){var c=process.hrtime(o),l=1e3*c[0]+c[1]/1e6|0;t.channel.publish("redis",{duration:l,address:i,commandObj:e,err:n,result:a,time:s}),"function"==typeof r&&r.apply(this,arguments)})),e.callback.pubsubBound=!0}}return n.call(this,e)},e}},e.enable=function(){t.channel.registerMonkeyPatch("redis",e.redis)}})),rn=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=void 0;var n=k();e.tedious={versionSpecifier:">= 6.0.0 < 9.0.0",patch:function(e){var r=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){var e,i,o,s=arguments[0];arguments[0].callback=(e=s.callback,i=process.hrtime(),o={query:{},database:{host:null,port:null},result:null,error:null,duration:0},n.channel.bindToContext((function(r,s,a){var c=process.hrtime(i);o=t(t({},o),{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!r&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:r,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),n.channel.publish("tedious",o),e.call(this,r,s,a)}))),r.apply(this,arguments)},e}},e.enable=function(){n.channel.registerMonkeyPatch("tedious",e.tedious)}})),on=S((e=>{"use strict";var t,n=e&&e.__extends||(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)},function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),r=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.winston2=e.winston3=void 0;var i=k();e.winston3={versionSpecifier:"3.x",patch:function(e){var t=function(e){function t(t,n){var r=e.call(this,n)||this;return r.winston=t,r}return n(t,e),t.prototype.log=function(e,t){var n=e.message,o=e.level,s=e.meta,a=r(e,["message","level","meta"]);o="function"==typeof Symbol.for?e[Symbol.for("level")]:o,n=e instanceof Error?e:n;var c=function(e,t){return null!=e.config.npm.levels[t]?"npm":null!=e.config.syslog.levels[t]?"syslog":"unknown"}(this.winston,o);for(var l in s=s||{},a)a.hasOwnProperty(l)&&(s[l]=a[l]);i.channel.publish("winston",{message:n,level:o,levelKind:c,meta:s}),t()},t}(e.Transport);function o(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);this.add(new t(e,{level:n}))}var s=e.createLogger;e.createLogger=function(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);var a=s.apply(this,arguments);a.add(new t(e,{level:n}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),o.apply(this,arguments)},a};var a=e.configure;return e.configure=function(){a.apply(this,arguments),o.apply(this,arguments)},e.add(new t(e)),e}},e.winston2={versionSpecifier:"2.x",patch:function(e){var t,n=e.Logger.prototype.log,r=function(n,r,o){var s;return s=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",i.channel.publish("winston",{level:n,message:r,meta:o,levelKind:s}),r};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==r&&(this.filters=this.filters.filter((function(e){return e!==r})),this.filters.push(r)):this.filters=[r],n.apply(this,arguments)},e}},e.enable=function(){i.channel.registerMonkeyPatch("winston",e.winston2),i.channel.registerMonkeyPatch("winston",e.winston3)}})),sn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=e.pgPool=e.pg=e.winston=e.redis=e.mysql=e.mongodb=e.mongodbCore=e.console=e.bunyan=e.azuresdk=void 0;var t=Kt();e.azuresdk=t;var n=Qt();e.bunyan=n;var r=Jt();e.console=r;var i=Xt();e.mongodbCore=i;var o=Yt();e.mongodb=o;var s=Zt();e.mysql=s;var a=en();e.pgPool=a;var c=tn();e.pg=c;var l=nn();e.redis=l;var u=rn();e.tedious=u;var d=on();e.winston=d,e.enable=function(){n.enable(),r.enable(),i.enable(),o.enable(),s.enable(),c.enable(),a.enable(),l.enable(),d.enable(),t.enable(),u.enable()}})),an=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextPreservation=e.IsInitialized=void 0;var t=P(),n=O();e.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL;var r,i,o,s,a="DiagnosticChannel";if(e.IsInitialized){for(s in r=sn(),i=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),o={bunyan:r.bunyan,console:r.console,mongodb:r.mongodb,mongodbCore:r.mongodbCore,mysql:r.mysql,redis:r.redis,pg:r.pg,pgPool:r.pgPool,winston:r.winston,azuresdk:r.azuresdk})-1===i.indexOf(s)&&(o[s].enable(),n.info(a,"Subscribed to "+s+" events"));i.length>0&&n.info(a,"Some modules will not be patched",i)}else n.info(a,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");e.registerContextPreservation=function(n){if(e.IsInitialized){var r=k();r.channel.addContextPreservation(n),r.channel.spanContextPropagator=t.AsyncScopeManager}}})),cn=S(((e,t)=>{"use strict";t.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}})),ln=S(((e,t)=>{"use strict";var r=e&&e.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=n(3685),o=n(5687),s=n(7310),a=n(2057),c=O(),l=cn(),u=function(){function e(){}return e.getCookie=function(t,n){var r="";if(t&&t.length&&"string"==typeof n)for(var i=t+"=",o=n.split(";"),s=0;s<o.length;s++)if(n=o[s],(n=e.trim(n))&&0===n.indexOf(i)){r=n.substring(i.length,o[s].length);break}return r},e.trim=function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,""):""},e.int32ArrayToBase64=function(e){var t=function(e,t){return String.fromCharCode(e>>t&255)},n=e.map((function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)})).join(""),r=(Buffer.from?Buffer.from(n,"binary"):new Buffer(n,"binary")).toString("base64");return r.substr(0,r.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i<4;i++)r+=n[15&(t=e.random32())]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var o=n[8+4*Math.random()|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+o+r.substr(16,3)+r.substr(19,12)},e.w3cSpanId=function(){return e.w3cTraceId().substring(16)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,n=n.length<2?"0"+n:n,(i>0?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var n={};for(var r in t){var i="",o=t[r],s=typeof o;if(e.isPrimitive(o))i=o.toString();else if(null===o||"undefined"===s)i="";else{if("function"===s){c.info("key: "+r+" was function; will not serialize");continue}var a=e.isArray(o)?o:e.extractObject(o);try{i=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){i=o.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return n}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||0==n.length||!t)return!0;for(var r=0;r<n.length;r++)if(new RegExp(n[r].replace(/\./g,".").replace(/\*/g,".*")).test(s.parse(t).hostname))return!1;return!0},e.getCorrelationContextTarget=function(e,t){var n=e.headers&&e.headers[l.requestContextHeader];if(n)for(var r=n.split(","),i=0;i<r.length;++i){var o=r[i].split("=");if(2==o.length&&o[0]==t)return o[1]}},e.makeRequest=function(t,n,a,l){n&&0===n.indexOf("//")&&(n="https:"+n);var u=s.parse(n),d=r(r({},a),{host:u.hostname,port:u.port,path:u.pathname}),p=void 0;if("https:"===u.protocol&&(p=t.proxyHttpsUrl||void 0),"http:"===u.protocol&&(p=t.proxyHttpUrl||void 0),p){0===p.indexOf("//")&&(p="http:"+p);var h=s.parse(p);"https:"===h.protocol?(c.info("Proxies that use HTTPS are not supported"),p=void 0):d=r(r({},d),{host:h.hostname,port:h.port||"80",path:n,headers:r(r({},d.headers),{Host:u.hostname})})}var f="https:"===u.protocol&&!p;return f&&void 0!==t.httpsAgent?d.agent=t.httpsAgent:f||void 0===t.httpAgent?f&&(d.agent=e.tlsRestrictedAgent):d.agent=t.httpAgent,f?o.request(d,l):i.request(d,l)},e.safeIncludeCorrelationHeader=function(t,n,r){var i;if("string"==typeof r)i=r;else if(r instanceof Array)i=r.join(",");else if(r&&"function"==typeof r.toString)try{i=r.toString()}catch(e){c.warn("Outgoing request-context header could not be read. Correlation of requests may be lost.",e,r)}i?e.addCorrelationIdHeaderFromString(t,n,i):n.setHeader(l.requestContextHeader,l.requestContextSourceKey+"="+t.config.correlationId)},e.dumpObj=function(e){var t=Object.prototype.toString.call(e);return t+("[object Error]"===t?"{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":JSON.stringify(e))},e.addCorrelationIdHeaderFromString=function(e,t,n){var r=n.split(","),i=l.requestContextSourceKey+"=";r.some((function(e){return e.substring(0,i.length)===i}))||t.setHeader(l.requestContextHeader,n+","+l.requestContextSourceKey+"="+e.config.correlationId)},e.MAX_PROPERTY_LENGTH=8192,e.tlsRestrictedAgent=new o.Agent({keepAlive:!0,maxSockets:25,secureOptions:a.SSL_OP_NO_SSLv2|a.SSL_OP_NO_SSLv3|a.SSL_OP_NO_TLSv1|a.SSL_OP_NO_TLSv1_1}),e}();t.exports=u})),un=S(((e,t)=>{"use strict";var n=ln(),r=O(),i=function(){function e(){}return e.queryCorrelationId=function(t,i){var o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))i(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(i);else{e.pendingLookups[o]=[i];var s=function(){if(e.pendingLookups[o]){var i={method:"GET",disableAppInsightsAutoCollection:!0};r.info(e.TAG,i);var a=n.makeRequest(t,o,i,(function(n){if(200===n.statusCode){var i="";n.setEncoding("utf-8"),n.on("data",(function(e){i+=e})),n.on("end",(function(){r.info(e.TAG,i);var t=e.correlationIdPrefix+i;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach((function(e){return e(t)})),delete e.pendingLookups[o]}))}else n.statusCode>=400&&n.statusCode<500?(e.completedLookups[o]=void 0,delete e.pendingLookups[o]):setTimeout(s,t.correlationIdRetryIntervalMs)}));a&&(a.on("error",(function(t){r.warn(e.TAG,t)})),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,n){var r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[r];i&&(e.pendingLookups[r]=i.filter((function(e){return e!=n})),0==e.pendingLookups[r].length&&delete e.pendingLookups[r])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+n.w3cTraceId()+"."},e.appendSuffix=function(t,r,i){if(t.length+r.length<e.requestIdMaxLength)return t+r+i;var o=e.requestIdMaxLength-9;if(t.length>o)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(r=n.randomu32().toString(16);r.length<8;)r="0"+r;return t.substring(0,o)+r+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=n.randomu32(),e}();t.exports=i})),dn=S(((e,t)=>{"use strict";var n=ln(),r=un(),i=function(){function e(t,i){if(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.version=e.DEFAULT_VERSION,t&&"string"==typeof t)if(t.split(",").length>1)this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16);else{var o=t.trim().split("-"),s=o.length;s>=4?(this.version=o[0],this.traceId=o[1],this.spanId=o[2],this.traceFlag=o[3]):(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId()),"00"===this.version&&4!==s&&(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),"ff"===this.version&&(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=e.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.traceId=n.w3cTraceId()),e.isValidTraceId(this.traceId)||(this.traceId=n.w3cTraceId()),e.isValidSpanId(this.spanId)||(this.spanId=n.w3cTraceId().substr(0,16),this.traceId=n.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(i){this.parentId=i.slice();var a=r.getRootId(i);e.isValidTraceId(a)||(this.legacyRootId=a,a=n.w3cTraceId()),-1!==i.indexOf("|")&&(i=i.substring(1+i.substring(0,i.length-1).lastIndexOf("."),i.length-1)),this.traceId=a,this.spanId=i}else this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.formatOpenTelemetryTraceFlags=function(e){var t="0"+e.toString(16);return t.substring(t.length-2)},e.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},e.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},e.prototype.updateSpanId=function(){this.spanId=n.w3cTraceId().substr(0,16)},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}();t.exports=i})),pn=S(((e,t)=>{"use strict";var n=function(){function e(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return e.prototype.toString=function(){var e=this.fieldmap;return e&&0!=e.length?e.join(", "):null},e.validateKeyChars=function(e){var t=e.split("@");if(2==t.length){var n=t[0].trim(),r=t[1].trim(),i=Boolean(n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/)),o=Boolean(r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/));return i&&o}return 1==t.length&&Boolean(e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/))},e.prototype.parseHeader=function(t){var n=[],r={},i=t.split(",");if(i.length>32)return null;for(var o=0,s=i;o<s.length;o++){var a=s[o].trim();if(0!==a.length){var c=a.split("=");if(2!==c.length||!e.validateKeyChars(c[0])||r[c[0]])return null;r[c[0]]=!0,n.push(a)}}return n},e.strict=!0,e}();t.exports=n})),hn=S(((e,t)=>{"use strict";t.exports=function(){}})),fn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),mn=S(((e,t)=>{"use strict";t.exports=function(){}})),gn=S(((e,t)=>{"use strict";t.exports=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}})),yn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return e.call(this)||this}return r(t,e),t}(mn());t.exports=i})),vn=S(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Measurement=0]="Measurement",r[r.Aggregation=1]="Aggregation",t.exports=n})),bn=S(((e,t)=>{"use strict";var n=vn();t.exports=function(){this.kind=n.Measurement}})),Sn=S(((e,t)=>{"use strict";t.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}})),wn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),Tn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),_n=S(((e,t)=>{"use strict";t.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}})),En=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return r(t,e),t}(hn());t.exports=i})),Cn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return r(t,e),t}(hn());t.exports=i})),Rn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(wn());t.exports=i})),xn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),In=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),On=S(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical",t.exports=n})),Pn=S(((e,t)=>{"use strict";t.exports=function(){}})),Dn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AvailabilityData=fn(),e.Base=mn(),e.ContextTagKeys=gn(),e.Data=yn(),e.DataPoint=bn(),e.DataPointType=vn(),e.Domain=hn(),e.Envelope=Sn(),e.EventData=wn(),e.ExceptionData=Tn(),e.ExceptionDetails=_n(),e.MessageData=En(),e.MetricData=Cn(),e.PageViewData=Rn(),e.RemoteDependencyData=xn(),e.RequestData=In(),e.SeverityLevel=On(),e.StackFrame=Pn()})),An=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.domainSupportsProperties=e.RemoteDependencyDataConstants=void 0;var t=Dn(),n=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();e.RemoteDependencyDataConstants=n,e.domainSupportsProperties=function(e){return"properties"in e||e instanceof t.EventData||e instanceof t.ExceptionData||e instanceof t.MessageData||e instanceof t.MetricData||e instanceof t.PageViewData||e instanceof t.RemoteDependencyData||e instanceof t.RequestData}})),Nn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),kn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),jn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),qn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Mn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ln=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Fn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Un=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Bn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),zn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Hn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Gn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Vn=S((e=>{"use strict";var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryType=e.TelemetryTypeString=e.baseTypeToTelemetryType=e.telemetryTypeToBaseType=void 0,e.telemetryTypeToBaseType=function(e){switch(e){case t.Event:return"EventData";case t.Exception:return"ExceptionData";case t.Trace:return"MessageData";case t.Metric:return"MetricData";case t.Request:return"RequestData";case t.Dependency:return"RemoteDependencyData";case t.Availability:return"AvailabilityData";case t.PageView:return"PageViewData"}},e.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return t.Event;case"ExceptionData":return t.Exception;case"MessageData":return t.Trace;case"MetricData":return t.Metric;case"RequestData":return t.Request;case"RemoteDependencyData":return t.Dependency;case"AvailabilityData":return t.Availability;case"PageViewData":return t.PageView}},e.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},(n=t=e.TelemetryType||(e.TelemetryType={}))[n.Event=0]="Event",n[n.Exception=1]="Exception",n[n.Trace=2]="Trace",n[n.Metric=3]="Metric",n[n.Request=4]="Request",n[n.Dependency=5]="Dependency",n[n.Availability=6]="Availability",n[n.PageView=7]="PageView"})),Wn=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Nn(),e),n(kn(),e),n(jn(),e),n(qn(),e),n(Mn(),e),n(Ln(),e),n(Fn(),e),n(Un(),e),n(Bn(),e),n(zn(),e),n(Hn(),e),n(Gn(),e),n(Vn(),e)})),$n=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Kn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Qn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Jn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Xn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Yn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Zn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),er=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),tr=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n($n(),e),n(Kn(),e),n(Qn(),e),n(Jn(),e),n(Xn(),e),n(Yn(),e),n(Zn(),e),n(er(),e)})),nr=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(An(),e),n(Dn(),e),n(Wn(),e),n(tr(),e)})),rr=S(((e,t)=>{"use strict";var n=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var r=this.properties||{};if(t)if("string"==typeof t)r.error=t;else if(t instanceof Error)r.error=t.message;else if("object"==typeof t)for(var i in t)r[i]=t[i]&&t[i].toString&&t[i].toString();this.properties=r},e.prototype._isSuccess=function(){return 0<this.statusCode&&this.statusCode<400},e}();t.exports=n})),ir=S(((e,t)=>{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(7310),s=nr(),a=ln(),c=cn(),l=rr(),u=un(),d=pn(),p=dn(),h=function(e){function t(t,n){var r=e.call(this)||this;return t&&(r.method=t.method,r.url=r._getAbsoluteUrl(t),r.startTime=+new Date,r.socketRemoteAddress=t.socket&&t.socket.remoteAddress,r.parseHeaders(t,n),t.connection&&(r.connectionRemoteAddress=t.connection.remoteAddress,r.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),r}return i(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+o.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e&&e.time?t.time=e.time:this.startTime&&(t.time=new Date(this.startTime)),e){for(var n in e)t[n]||(t[n]=e[n]);if(e.properties)for(var n in e.properties)t.properties[n]=e.properties[n]}return t},t.prototype.getRequestTags=function(e){var n={};for(var r in e)n[r]=e[r];return n[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),n[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),n[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),n[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),n[t.keys.operationName]=this.getOperationName(e),n[t.keys.operationParentId]=this.getOperationParentId(e),n[t.keys.operationId]=this.getOperationId(e),n},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+o.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype.getTraceparent=function(){return this.traceparent},t.prototype.getTracestate=function(){return this.tracestate},t.prototype.getLegacyRootId=function(){return this.legacyRootId},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,n=o.parse(e.url),r=n.pathname,i=n.search,s=t||"https"==e.headers["x-forwarded-proto"]?"https":"http";return o.format({protocol:s,host:e.headers.host,pathname:r,search:i})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var n=e.exec(t);if(n)return n[0]},n=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!n&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(n="127.0.0.1"),n},t.prototype._getId=function(e){var n=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(a.getCookie(e,n))},t.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=a.getCorrelationContextTarget(e,c.requestContextSourceKey),e.headers){var n=e.headers[c.traceStateHeader]?e.headers[c.traceStateHeader].toString():null,r=e.headers[c.traceparentHeader]?e.headers[c.traceparentHeader].toString():null,i=e.headers[c.requestIdHeader]?e.headers[c.requestIdHeader].toString():null,o=e.headers[c.parentIdHeader]?e.headers[c.parentIdHeader].toString():null,s=e.headers[c.rootIdHeader]?e.headers[c.rootIdHeader].toString():null;this.correlationContextHeader=e.headers[c.correlationContextHeader]?e.headers[c.correlationContextHeader].toString():null,u.w3cEnabled&&(r||n)?(this.traceparent=new p(r?r.toString():null),this.tracestate=r&&n&&new d(n?n.toString():null),this.setBackCompatFromThisTraceContext()):i?u.w3cEnabled?(this.traceparent=new p(null,i),this.setBackCompatFromThisTraceContext()):(this.parentId=i,this.requestId=u.generateRequestId(this.parentId),this.operationId=u.getRootId(this.requestId)):u.w3cEnabled?(this.traceparent=new p,this.traceparent.parentId=o,this.traceparent.legacyRootId=s||o,this.setBackCompatFromThisTraceContext()):(this.parentId=o,this.requestId=u.generateRequestId(s||this.parentId),this.correlationContextHeader=null,this.operationId=u.getRootId(this.requestId)),t&&(this.requestId=t,this.operationId=u.getRootId(this.requestId))}},t.parseId=function(e){var t=e.split("|");return t.length>0?t[0]:""},t.keys=new s.ContextTagKeys,t}(l);t.exports=h})),or=S(((e,t)=>{var n;e=t.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var m=a++;s[m]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var g=a++;s[g]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var y=a++;s[y]="[0-9A-Za-z-]+";var v=a++;s[v]="(?:\\+("+s[y]+"(?:\\."+s[y]+")*))";var b=a++,S="v?"+s[d]+s[m]+"?"+s[v]+"?";s[b]="^"+S+"$";var w="[v=\\s]*"+s[p]+s[g]+"?"+s[v]+"?",T=a++;s[T]="^"+w+"$";var _=a++;s[_]="((?:<|>)?=?)";var E=a++;s[E]=s[l]+"|x|X|\\*";var C=a++;s[C]=s[c]+"|x|X|\\*";var R=a++;s[R]="[v=\\s]*("+s[C]+")(?:\\.("+s[C]+")(?:\\.("+s[C]+")(?:"+s[m]+")?"+s[v]+"?)?)?";var x=a++;s[x]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[g]+")?"+s[v]+"?)?)?";var I=a++;s[I]="^"+s[_]+"\\s*"+s[R]+"$";var O=a++;s[O]="^"+s[_]+"\\s*"+s[x]+"$";var P=a++;s[P]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=a++;s[D]="(?:~>?)";var A=a++;s[A]="(\\s*)"+s[D]+"\\s+",o[A]=new RegExp(s[A],"g");var N=a++;s[N]="^"+s[D]+s[R]+"$";var k=a++;s[k]="^"+s[D]+s[x]+"$";var j=a++;s[j]="(?:\\^)";var q=a++;s[q]="(\\s*)"+s[j]+"\\s+",o[q]=new RegExp(s[q],"g");var M=a++;s[M]="^"+s[j]+s[R]+"$";var L=a++;s[L]="^"+s[j]+s[x]+"$";var F=a++;s[F]="^"+s[_]+"\\s*("+w+")$|^$";var U=a++;s[U]="^"+s[_]+"\\s*("+S+")$|^$";var B=a++;s[B]="(\\s*)"+s[_]+"\\s*("+w+"|"+s[R]+")",o[B]=new RegExp(s[B],"g");var z=a++;s[z]="^\\s*("+s[R]+")\\s+-\\s+("+s[R]+")\\s*$";var H=a++;s[H]="^\\s*("+s[x]+")\\s+-\\s+("+s[x]+")\\s*$";var G,V=a++;for(s[V]="(<|>)?=?\\s*\\*",G=0;G<35;G++)n(G,s[G]),o[G]||(o[G]=new RegExp(s[G]));function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e||e.length>r)return null;if(!(t.loose?o[T]:o[b]).test(e))return null;try{return new $(e,t)}catch{return null}}function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?o[T]:o[b]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=W,e.valid=function(e,t){var n=W(e,t);return n?n.version:null},e.clean=function(e,t){var n=W(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=$,$.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},$.prototype.toString=function(){return this.version},$.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof $||(e=new $(e,this.options)),this.compareMain(e)||this.comparePre(e)},$.prototype.compareMain=function(e){return e instanceof $||(e=new $(e,this.options)),Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)},$.prototype.comparePre=function(e){if(e instanceof $||(e=new $(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return Q(r,i)}while(++t)},$.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new $(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=W(e),r=W(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function J(e,t,n){return new $(e,n).compare(new $(t,n))}function X(e,t,n){return J(e,t,n)>0}function Y(e,t,n){return J(e,t,n)<0}function Z(e,t,n){return 0===J(e,t,n)}function ee(e,t,n){return 0!==J(e,t,n)}function te(e,t,n){return J(e,t,n)>=0}function ne(e,t,n){return J(e,t,n)<=0}function re(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Z(e,n,r);case"!=":return ee(e,n,r);case">":return X(e,n,r);case">=":return te(e,n,r);case"<":return Y(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return Q(t,e)},e.major=function(e,t){return new $(e,t).major},e.minor=function(e,t){return new $(e,t).minor},e.patch=function(e,t){return new $(e,t).patch},e.compare=J,e.compareLoose=function(e,t){return J(e,t,!0)},e.rcompare=function(e,t,n){return J(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=X,e.lt=Y,e.eq=Z,e.neq=ee,e.gte=te,e.lte=ne,e.cmp=re,e.Comparator=ie;var oe={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=ae(n)?"":ae(r)?">="+n+".0.0":ae(i)?">="+n+"."+r+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==oe&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new se(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,o,s,a,c;switch(e=new $(e,r),t=new se(t,r),n){case">":i=X,o=ne,s=Y,a=">",c=">=";break;case"<":i=Y,o=te,s=X,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===oe&&(e=new ie(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?o[F]:o[U],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===oe||("string"==typeof e&&(e=new $(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[H]:o[z];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[B],"$1$2$3"),n("comparator trim",e,o[B]),e=(e=(e=e.replace(o[A],"$1~")).replace(o[q],"$1^")).split(/\s+/).join(" ");var i=t?o[F]:o[U],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[L]:o[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?o[k]:o[N];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?o[O]:o[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=ae(i),l=c||ae(o),u=l||ae(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[V],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new $(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new $(r=e,n))})),r},e.minVersion=function(e,t){e=new se(e,t);var n=new $("0.0.0");if(e.test(n)||(n=new $("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new $(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||X(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=W(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(o[P]);return null==t?null:W(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),sr=S(((e,t)=>{"use strict";function n(e){return"function"==typeof e}var r=console.error.bind(console);function i(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function o(e){e&&e.logger&&(n(e.logger)?r=e.logger:r("new logger isn't a function, not replacing"))}function s(e,t,o){if(e&&e[t]){if(!o)return r("no wrapper function"),void r((new Error).stack);if(n(e[t])&&n(o)){var s=e[t],a=o(s,t);return i(a,"__original",s),i(a,"__unwrap",(function(){e[t]===a&&i(e,t,s)})),i(a,"__wrapped",!0),i(e,t,a),a}r("original object and wrapper must be functions")}else r("no original function "+t+" to wrap")}function a(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void r("no original to unwrap to -- has "+t+" already been unwrapped?"):(r("no function to unwrap."),void r((new Error).stack))}o.wrap=s,o.massWrap=function(e,t,n){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t,n)}))})):r("must provide one or more functions to wrap on modules")},o.unwrap=a,o.massUnwrap=function(e,t){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){a(e,t)}))})):r("must provide one or more functions to unwrap on modules")},t.exports=o})),ar=S(((e,t)=>{"use strict";var n=sr(),r=n.wrap,i=n.unwrap,o="wrap@before";function s(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function a(e,t){var n;return n=e._events&&e._events[t],Array.isArray(n)||(n=n?[n]:[]),n}function c(e,t){if(e){var n=e;if("function"==typeof e)n=t(e);else if(Array.isArray(e)){n=[];for(var r=0;r<e.length;r++)n[r]=t(e[r])}return n}}t.exports=function(e,t,n){if(!(e&&e.on&&e.addListener&&e.removeListener&&e.emit))throw new Error("can only wrap real EEs");if(!t)throw new Error("must have function to run on listener addition");if(!n)throw new Error("must have function to wrap listeners when emitting");function l(e){return function(t,n){var i=a(this,t).slice();try{var s=e.call(this,t,n);return function(e,t,n){var r=a(e,t).filter((function(e){return-1===n.indexOf(e)}));r.length>0&&function(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r],s=e[o];if("function"==typeof s)s(i);else if(Array.isArray(s))for(var a=s.length,c=0;c<a;c++)s[c](i)}}(e,r)}(this,t,i),s}finally{this.on.__wrapped||r(this,"on",l),this.addListener.__wrapped||r(this,"addListener",l)}}}e[o]?"function"==typeof e[o]?s(e,o,[e[o],t]):Array.isArray(e[o])&&e[o].push(t):s(e,o,t),e.__wrapped||(r(e,"addListener",l),r(e,"on",l),r(e,"emit",(function(e){return function(t){if(!this._events||!this._events[t])return e.apply(this,arguments);var o=this._events[t];r(this,"removeListener",(function(e){return function(){this._events[t]=o;try{return e.apply(this,arguments)}finally{o=this._events[t],this._events[t]=c(o,n)}}}));try{return this._events[t]=c(o,n),e.apply(this,arguments)}finally{i(this,"removeListener"),this._events[t]=o}}})),s(e,"__unwrap",(function(){i(e,"addListener"),i(e,"on"),i(e,"emit"),delete e[o],delete e.__wrapped})),s(e,"__wrapped",!0))}})),cr=S(((e,t)=>{"use strict";var r=n(3837),i=n(9491),o=ar(),s=n(852),a="cls@contexts",c="error@context",l=process.env.DEBUG_CLS_HOOKED,u=-1;function d(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function h(e){let t=p(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function f(...e){l&&process._rawDebug(`${r.format(...e)}`)}t.exports={getNamespace:p,createNamespace:function(e){i.ok(e,"namespace must be given a name."),l&&f(`NS-CREATING NAMESPACE (${e})`);let t=new d(e);return t.id=u,s.createHook({init(n,i,o,a){if(u=s.executionAsyncId(),t.active)t._contexts.set(n,t.active),l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`);else if(0===u){let o=s.triggerAsyncId(),c=t._contexts.get(o);c?(t._contexts.set(n,c),l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)):l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}if(l&&"PROMISE"===i){f(r.inspect(a,{showHidden:!0}));let s=a.parentId;f(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${s} asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}},before(n){let i;if(u=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(u),i){if(l){let o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`),t._indent+=2}t.enter(i)}else if(l){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${n} currentUid:${u} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${r.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(n){let i;if(u=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(u),i){if(l){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}t.exit(i)}else if(l){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}},destroy(n){if(u=s.executionAsyncId(),l){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${u} asyncId:${n} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(t._contexts.get(u))}`)}t._contexts.delete(n)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:h,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){h(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},d.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,l&&f(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+u+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),t},d.prototype.get=function(e){if(this.active){if(l){let t=s.executionAsyncId(),n=s.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);f(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+u+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),f(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} active:${r.inspect(this.active)}`)}return this.active[e]}if(l){let t=s.currentId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length}`)}},d.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=u,l){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} context:${r.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},d.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(l){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} context:${r.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[c]=t),e}finally{if(l){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} ${r.inspect(t)}`)}this.exit(t)}},d.prototype.runAndReturn=function(e){let t;return this.run((function(n){t=e(n)})),t},d.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return l&&f("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(l&&f("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,l&&f("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},d.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},d.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),l){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${u} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}this._set.push(this.active),this.active=e},d.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),l){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${u} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(l&&f("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},d.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},d.prototype.fromException=function(e){return e[c]},process.namespaces={}})),lr=S(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=process.nextTick;process.nextTick=function(){if(!t.enabled)return r.apply(process,arguments);let i=new Array(arguments.length);for(let e=0;e<arguments.length;e++)i[e]=arguments[e];let o=i[0];if("function"!=typeof o)throw new TypeError("callback is not a function");let s=new n,a=--t.counter;return e.init.call(s,a,0,null,null),i[0]=function(){e.pre.call(s,a);let t=!0;try{o.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(s,a,!0),e.destroy.call(null,a)}))}e.post.call(s,a,!1),e.destroy.call(null,a)},r.apply(process,i)}}})),ur=S(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=global.Promise,i=r.prototype.then;function o(t,n,r,i){return"function"!=typeof t?i?function(t){return function(n){return e.destroy.call(null,t),n}}(r):function(t){return function(n){throw e.destroy.call(null,t),n}}(r):function(){e.pre.call(n,r);try{return t.apply(this,arguments)}finally{e.post.call(n,r,!1),e.destroy.call(null,r)}}}r.prototype.then=function(r,s){if(!t.enabled)return i.call(this,r,s);let a=new n,c=--t.counter;return e.init.call(a,c,0,null,null),i.call(this,o(r,a,c,!0),o(s,a,c,!1))}}})),dr=S(((e,t)=>{"use strict";var r=n(9512);function i(){}function o(){}function s(){}var a=new Map,c=new Map,l=new Map,u=null,d=!1;function p(e,t,n,i,o,s,a){let c=r[n],l=r[i];r[n]=function(){if(!t.enabled)return c.apply(r,arguments);let n=new Array(arguments.length);for(let e=0;e<arguments.length;e++)n[e]=arguments[e];let i=n[0];if("function"!=typeof i)throw new TypeError('"callback" argument must be a function');let l,p=new o,h=--t.counter;return e.init.call(p,h,0,null,null),n[0]=function(){u=l,e.pre.call(p,h);let t=!0;try{i.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(p,h,!0),s.delete(l),e.destroy.call(null,h)}))}e.post.call(p,h,!1),u=null,(a||d)&&(d=!1,s.delete(l),e.destroy.call(null,h))},l=c.apply(r,n),s.set(l,h),l},r[i]=function(t){if(u===t&&null!==t)d=!0;else if(s.has(t)){let n=s.get(t);s.delete(t),e.destroy.call(null,n)}l.apply(r,arguments)}}t.exports=function(){p(this._hooks,this._state,"setTimeout","clearTimeout",i,a,!0),p(this._hooks,this._state,"setInterval","clearInterval",o,c,!1),p(this._hooks,this._state,"setImmediate","clearImmediate",s,l,!0),global.setTimeout=r.setTimeout,global.setInterval=r.setInterval,global.setImmediate=r.setImmediate,global.clearTimeout=r.clearTimeout,global.clearInterval=r.clearInterval,global.clearImmediate=r.clearImmediate}})),pr=S(((e,t)=>{t.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen <amwebdk@gmail.com>",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}})),hr=S(((e,t)=>{"use strict";var n=process.binding("async_wrap"),r=n.Providers.TIMERWRAP,i={nextTick:lr(),promise:ur(),timers:dr()},o=new Set;function s(){this.enabled=!1,this.counter=0}function a(){let e=this.initFns=[],t=this.preFns=[],n=this.postFns=[],i=this.destroyFns=[];this.init=function(t,n,i,s){if(n!==r)for(let r of e)r(t,this,n,i,s);else o.add(t)},this.pre=function(e){if(!o.has(e))for(let n of t)n(e,this)},this.post=function(e,t){if(!o.has(e))for(let r of n)r(e,this,t)},this.destroy=function(e){if(o.has(e))o.delete(e);else for(let t of i)t(e)}}function c(e,t){let n=e.indexOf(t);-1!==n&&e.splice(n,1)}function l(){this._state=new s,this._hooks=new a,this.version=pr().version,this.providers=n.Providers;for(let e of Object.keys(i))i[e].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),n.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}a.prototype.add=function(e){e.init&&this.initFns.push(e.init),e.pre&&this.preFns.push(e.pre),e.post&&this.postFns.push(e.post),e.destroy&&this.destroyFns.push(e.destroy)},a.prototype.remove=function(e){e.init&&c(this.initFns,e.init),e.pre&&c(this.preFns,e.pre),e.post&&c(this.postFns,e.post),e.destroy&&c(this.destroyFns,e.destroy)},t.exports=l,l.prototype.addHooks=function(e){this._hooks.add(e)},l.prototype.removeHooks=function(e){this._hooks.remove(e)},l.prototype.enable=function(){this._state.enabled=!0,n.enable()},l.prototype.disable=function(){this._state.enabled=!1,n.disable()}})),fr=S(((e,t)=>{t.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen <amwebdk@gmail.com>",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}})),mr=S(((e,t)=>{t.exports=function(e,t){var n=[];n.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return"<error: "+e+">"}catch{return"<error>"}}}(e));for(var r=0;r<t.length;r++){var i,o=t[r];try{i=o.toString()}catch(e){try{i="<error: "+e+">"}catch{i="<error>"}}n.push("    at "+i)}return n.join("\n")}})),gr=S(((e,t)=>{var n=mr();function r(){this.extend=new s,this.filter=new s,this.format=new a,this.version=fr().version}var i=!1;r.prototype.callSite=function e(t){t||(t={}),i=!0;var n={};Error.captureStackTrace(n,e);var r=n.stack;return i=!1,r=r.slice(t.slice||0),t.extend&&(r=this.extend._modify(n,r)),t.filter&&(r=this.filter._modify(n,r)),r};var o=new r;function s(){this._modifiers=[]}function a(){this._formater=n,this._previous=void 0}s.prototype._modify=function(e,t){for(var n=0,r=this._modifiers.length;n<r;n++)t=this._modifiers[n](e,t);return t},s.prototype.attach=function(e){this._modifiers.push(e)},s.prototype.deattach=function(e){var t=this._modifiers.indexOf(e);return-1!==t&&(this._modifiers.splice(t,1),!0)},a.prototype.replace=function(e){e?this._formater=e:this.restore()},a.prototype.restore=function(){this._formater=n,this._previous=void 0},a.prototype._backup=function(){this._previous=this._formater},a.prototype._roolback=function(){this._previous===n?this.replace(void 0):this.replace(this._previous),this._previous=void 0},Error.prepareStackTrace&&o.format.replace(Error.prepareStackTrace);var c=!1;function l(e,t){if(i)return t;if(c)return n(e,t);var r=t.concat();r=o.extend._modify(e,r),r=(r=o.filter._modify(e,r)).slice(0,Error.stackTraceLimit),Object.isExtensible(e)&&void 0===Object.getOwnPropertyDescriptor(e,"callSite")&&(e.callSite={original:t,mutated:r}),c=!0;var s=o.format._formater(e,r);return c=!1,s}Object.defineProperty(Error,"prepareStackTrace",{get:function(){return l},set:function(e){e===l?o.format._roolback():(o.format._backup(),o.format.replace(e))}}),Object.defineProperty(Error.prototype,"callSite",{get:function(){return this.stack,this.callSite},set:function(e){Object.defineProperty(this,"callSite",{value:e,writable:!0,configurable:!0})},configurable:!0}),t.exports=o})),yr=S(((e,t)=>{if(global._stackChain){if(global._stackChain.version!==fr().version)throw new Error("Conflicting version of stack-chain found");t.exports=global._stackChain}else t.exports=global._stackChain=gr()})),vr=S(((e,t)=>{"use strict";var n=hr();if(global._asyncHook){if(global._asyncHook.version!==pr().version)throw new Error("Conflicting version of async-hook-jl found");t.exports=global._asyncHook}else yr().filter.attach((function(e,t){return t.filter((function(e){let t=e.getFileName();return!(t&&t.slice(0,__dirname.length)===__dirname)}))})),t.exports=global._asyncHook=new n})),br=S(((e,t)=>{"use strict";var r=n(3837),i=n(9491),o=ar(),s=vr(),a="cls@contexts",c="error@context",l=[];for(let e in s.providers)l[s.providers[e]]=e;var u,d,p=process.env.DEBUG_CLS_HOOKED,h=-1;function f(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function m(e){return process.namespaces[e]}function g(e){let t=m(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function y(e){process.env.DEBUG&&process._rawDebug(e)}function v(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(t.exports={getNamespace:m,createNamespace:function(e){i.ok(e,"namespace must be given a name."),p&&y("CREATING NAMESPACE "+e);let t=new f(e);return t.id=h,s.addHooks({init(n,i,o,s,a){h=n,s?(t._contexts.set(n,t._contexts.get(s)),p&&y("PARENTID: "+e+" uid:"+n+" parent:"+s+" provider:"+o)):t._contexts.set(h,t.active),p&&y("INIT "+e+" uid:"+n+" parent:"+s+" provider:"+l[o]+" active:"+r.inspect(t.active,!0))},pre(n,i){h=n;let o=t._contexts.get(n);o?(p&&y(" PRE "+e+" uid:"+n+" handle:"+v(i)+" context:"+r.inspect(o)),t.enter(o)):p&&y(" PRE MISSING CONTEXT "+e+" uid:"+n+" handle:"+v(i))},post(n,i){h=n;let o=t._contexts.get(n);o?(p&&y(" POST "+e+" uid:"+n+" handle:"+v(i)+" context:"+r.inspect(o)),t.exit(o)):p&&y(" POST MISSING CONTEXT "+e+" uid:"+n+" handle:"+v(i))},destroy(n){h=n,p&&y("DESTROY "+e+" uid:"+n+" context:"+r.inspect(t._contexts.get(h))+" active:"+r.inspect(t.active,!0)),t._contexts.delete(n)}}),process.namespaces[e]=t,t},destroyNamespace:g,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){g(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},f.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return p&&y("    SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0)),this.active[e]=t,t},f.prototype.get=function(e){if(this.active)return p&&y("    GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0)),this.active[e];p&&y("    GETTING KEY:"+e+"=undefined "+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0))},f.prototype.createContext=function(){p&&y("   CREATING Context: "+this.name+" uid:"+h+" len:"+this._set.length+"  active:"+r.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=h,p&&y("   CREATED Context: "+this.name+" uid:"+h+" len:"+this._set.length+"  context:"+r.inspect(e,!0,2,!0)),e},f.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return p&&y(" BEFORE RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),e(t),t}catch(e){throw e&&(e[c]=t),e}finally{p&&y(" AFTER RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t)}},f.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},f.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return p&&y(" BEFORE runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(p&&y(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,p&&y(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},f.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},f.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),p&&y("  ENTER "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+r.inspect(e)),this._set.push(this.active),this.active=e},f.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),p&&y("  EXIT "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+r.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(p&&y("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},f.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},f.prototype.fromException=function(e){return e[c]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),p)for(d in(u=yr()).filter._modifiers)u.filter.deattach(d)})),Sr=S(((e,t)=>{"use strict";var n=or();process&&n.gte(process.versions.node,"8.0.0")?t.exports=cr():t.exports=br()})),wr=S(((e,t)=>{var n;e=t.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var m=a++;s[m]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var g=a++;s[g]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var y=a++;s[y]="[0-9A-Za-z-]+";var v=a++;s[v]="(?:\\+("+s[y]+"(?:\\."+s[y]+")*))";var b=a++,S="v?"+s[d]+s[m]+"?"+s[v]+"?";s[b]="^"+S+"$";var w="[v=\\s]*"+s[p]+s[g]+"?"+s[v]+"?",T=a++;s[T]="^"+w+"$";var _=a++;s[_]="((?:<|>)?=?)";var E=a++;s[E]=s[l]+"|x|X|\\*";var C=a++;s[C]=s[c]+"|x|X|\\*";var R=a++;s[R]="[v=\\s]*("+s[C]+")(?:\\.("+s[C]+")(?:\\.("+s[C]+")(?:"+s[m]+")?"+s[v]+"?)?)?";var x=a++;s[x]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[g]+")?"+s[v]+"?)?)?";var I=a++;s[I]="^"+s[_]+"\\s*"+s[R]+"$";var O=a++;s[O]="^"+s[_]+"\\s*"+s[x]+"$";var P=a++;s[P]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=a++;s[D]="(?:~>?)";var A=a++;s[A]="(\\s*)"+s[D]+"\\s+",o[A]=new RegExp(s[A],"g");var N=a++;s[N]="^"+s[D]+s[R]+"$";var k=a++;s[k]="^"+s[D]+s[x]+"$";var j=a++;s[j]="(?:\\^)";var q=a++;s[q]="(\\s*)"+s[j]+"\\s+",o[q]=new RegExp(s[q],"g");var M=a++;s[M]="^"+s[j]+s[R]+"$";var L=a++;s[L]="^"+s[j]+s[x]+"$";var F=a++;s[F]="^"+s[_]+"\\s*("+w+")$|^$";var U=a++;s[U]="^"+s[_]+"\\s*("+S+")$|^$";var B=a++;s[B]="(\\s*)"+s[_]+"\\s*("+w+"|"+s[R]+")",o[B]=new RegExp(s[B],"g");var z=a++;s[z]="^\\s*("+s[R]+")\\s+-\\s+("+s[R]+")\\s*$";var H=a++;s[H]="^\\s*("+s[x]+")\\s+-\\s+("+s[x]+")\\s*$";var G,V=a++;for(s[V]="(<|>)?=?\\s*\\*",G=0;G<35;G++)n(G,s[G]),o[G]||(o[G]=new RegExp(s[G]));function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e||e.length>r)return null;if(!(t.loose?o[T]:o[b]).test(e))return null;try{return new $(e,t)}catch{return null}}function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?o[T]:o[b]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=W,e.valid=function(e,t){var n=W(e,t);return n?n.version:null},e.clean=function(e,t){var n=W(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=$,$.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},$.prototype.toString=function(){return this.version},$.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof $||(e=new $(e,this.options)),this.compareMain(e)||this.comparePre(e)},$.prototype.compareMain=function(e){return e instanceof $||(e=new $(e,this.options)),Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)},$.prototype.comparePre=function(e){if(e instanceof $||(e=new $(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return Q(r,i)}while(++t)},$.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new $(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=W(e),r=W(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function J(e,t,n){return new $(e,n).compare(new $(t,n))}function X(e,t,n){return J(e,t,n)>0}function Y(e,t,n){return J(e,t,n)<0}function Z(e,t,n){return 0===J(e,t,n)}function ee(e,t,n){return 0!==J(e,t,n)}function te(e,t,n){return J(e,t,n)>=0}function ne(e,t,n){return J(e,t,n)<=0}function re(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Z(e,n,r);case"!=":return ee(e,n,r);case">":return X(e,n,r);case">=":return te(e,n,r);case"<":return Y(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return Q(t,e)},e.major=function(e,t){return new $(e,t).major},e.minor=function(e,t){return new $(e,t).minor},e.patch=function(e,t){return new $(e,t).patch},e.compare=J,e.compareLoose=function(e,t){return J(e,t,!0)},e.rcompare=function(e,t,n){return J(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=X,e.lt=Y,e.eq=Z,e.neq=ee,e.gte=te,e.lte=ne,e.cmp=re,e.Comparator=ie;var oe={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=ae(n)?"":ae(r)?">="+n+".0.0":ae(i)?">="+n+"."+r+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==oe&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new se(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,o,s,a,c;switch(e=new $(e,r),t=new se(t,r),n){case">":i=X,o=ne,s=Y,a=">",c=">=";break;case"<":i=Y,o=te,s=X,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===oe&&(e=new ie(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?o[F]:o[U],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===oe||("string"==typeof e&&(e=new $(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[H]:o[z];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[B],"$1$2$3"),n("comparator trim",e,o[B]),e=(e=(e=e.replace(o[A],"$1~")).replace(o[q],"$1^")).split(/\s+/).join(" ");var i=t?o[F]:o[U],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[L]:o[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?o[k]:o[N];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?o[O]:o[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=ae(i),l=c||ae(o),u=l||ae(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[V],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new $(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new $(r=e,n))})),r},e.minVersion=function(e,t){e=new se(e,t);var n=new $("0.0.0");if(e.test(n)||(n=new $("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new $(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||X(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=W(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(o[P]);return null==t?null:W(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),Tr=S(((e,t)=>{var n,r,i,o,s,a=sr().wrap,c=1,l=2,u=4,d=8,p=[],h=0,f=!1,m=[];function g(e,t){var n=e.length,r=t.length,i=[];if(0===n&&0===r)return i;for(var o=0;o<n;o++)i[o]=e[o];if(0===r)return i;for(var s=0;s<r;s++){var a=!0;for(o=0;o<n;o++)if(e[o].uid===t[s].uid){a=!1;break}a&&i.push(t[s])}return i}function y(e,t){"function"==typeof e.create&&(this.create=e.create,this.flags|=c),"function"==typeof e.before&&(this.before=e.before,this.flags|=l),"function"==typeof e.after&&(this.after=e.after,this.flags|=u),"function"==typeof e.error&&(this.error=e.error,this.flags|=d),this.uid=++h,this.data=void 0===t?null:t}function v(e,t){if("object"!=typeof e||!e)throw new TypeError("callbacks argument must be an object");return e instanceof y?e:new y(e,t)}process._fatalException?(i=!1,n=function(e){var t=p.length;if(i||0===t)return!1;var n=!1;i=!0;for(var r=0;r<t;++r){var s=p[r];if(0!=(s.flags&d)){var a=o&&o[s.uid];n=s.error(a,e)||n}}return i=!1,m.length>0&&(p=m.pop()),o=void 0,n&&!f},r=function(e,t,n){var r=[];f=!0;for(var i=0;i<n;++i){var s=t[i];if(r[s.uid]=s.data,0!=(s.flags&c)){var a=s.create(s.data);void 0!==a&&(r[s.uid]=a)}}return f=!1,function(){o=r,m.push(p),p=g(t,p),f=!0;for(var i=0;i<n;++i)(t[i].flags&l)>0&&t[i].before(this,r[t[i].uid]);f=!1;var s=e.apply(this,arguments);for(f=!0,i=0;i<n;++i)(t[i].flags&u)>0&&t[i].after(this,r[t[i].uid]);return f=!1,p=m.pop(),o=void 0,s}},a(process,"_fatalException",(function(e){return function(t){return n(t)||e(t)}}))):(s=!1,n=function(e){if(s)throw e;for(var t=!1,n=p.length,r=0;r<n;++r){var i=p[r];0!=(i.flags&d)&&(t=i.error(null,e)||t)}if(!t&&f)throw e},r=function(e,t,r){var i=[];f=!0;for(var o=0;o<r;++o){var a=t[o];if(i[a.uid]=a.data,0!=(a.flags&c)){var h=a.create(a.data);void 0!==h&&(i[a.uid]=h)}}return f=!1,function(){var o,a=!1,c=!1;m.push(p),p=g(t,p),f=!0;for(var h=0;h<r;++h)(t[h].flags&l)>0&&t[h].before(this,i[t[h].uid]);f=!1;try{o=e.apply(this,arguments)}catch(e){for(a=!0,h=0;h<r;++h)if(0!=(p[h].flags&d))try{c=p[h].error(i[t[h].uid],e)||c}catch(e){throw s=!0,e}if(!c)throw process.removeListener("uncaughtException",n),process._originalNextTick((function(){process.addListener("uncaughtException",n)})),e}finally{if(!a||c){for(f=!0,h=0;h<r;++h)(t[h].flags&u)>0&&t[h].after(this,i[t[h].uid]);f=!1}p=m.pop()}return o}},process.addListener("uncaughtException",n)),y.prototype.create=void 0,y.prototype.before=void 0,y.prototype.after=void 0,y.prototype.error=void 0,y.prototype.data=void 0,y.prototype.uid=0,y.prototype.flags=0,process.createAsyncListener=v,process.addAsyncListener=function(e,t){var n;n=e instanceof y?e:v(e,t);for(var r=!1,i=0;i<p.length;i++)if(n===p[i]){r=!0;break}return r||p.push(n),n},process.removeAsyncListener=function(e){for(var t=0;t<p.length;t++)if(e===p[t]){p.splice(t,1);break}},t.exports=function(e){var t=p.length;if(0===t)return e;for(var n=p.slice(),i=0;i<t;++i)if(n[i].flags>0)return r(e,n,t);return function(e,t,n){f=!0;for(var r=0;r<n;++r){var i=t[r];i.create&&i.create(i.data)}return f=!1,function(){m.push(p),p=g(t,p);var n=e.apply(this,arguments);return p=m.pop(),n}}(e,n,t)}})),_r=S(((e,t)=>{"use strict";t.exports=(e,t)=>class extends e{constructor(e){var n,r;super((function(e,o){n=this,r=[function(n){return t(i,!1),e(n)},function(e){return t(i,!1),o(e)}]}));var i=this;try{e.apply(n,r)}catch(e){r[1](e)}return i}}})),Er=S((()=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var e=sr(),t=wr(),r=e.wrap,i=e.massWrap,o=Tr(),s=n(3837),a=t.gte(process.version,"6.0.0"),c=t.gte(process.version,"7.0.0"),l=t.gte(process.version,"8.0.0"),u=t.gte(process.version,"11.0.0"),d=n(1808);function p(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=o(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=o(this._handle.onconnection))}}}function h(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=o(t._originalOnread)}}c&&!d._normalizeArgs?d._normalizeArgs=function(e){if(0===e.length)return[{},null];var t=e[0],n={};"object"==typeof t&&null!==t?n=t:function(e){return"string"==typeof e&&!1===function(e){return(e=Number(e))>=0&&e}(e)}(t)?n.path=t:(n.port=t,e.length>1&&"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"!=typeof r?[n,null]:[n,r]}:!c&&!d._normalizeConnectArgs&&(d._normalizeConnectArgs=function(e){var t={};"object"==typeof e[0]&&null!==e[0]?t=e[0]:"string"==typeof e[0]&&!1===function(e){return(e=Number(e))>=0&&e}(e[0])?t.path=e[0]:(t.port=e[0],"string"==typeof e[1]&&(t.host=e[1]));var n=e[e.length-1];return"function"==typeof n?[t,n]:[t]}),"_setUpListenHandle"in d.Server.prototype?r(d.Server.prototype,"_setUpListenHandle",p):r(d.Server.prototype,"_listen2",p),r(d.Socket.prototype,"connect",(function(e){return function(){var t;(t=l&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:c?d._normalizeArgs(arguments):d._normalizeConnectArgs(arguments))[1]&&(t[1]=o(t[1]));var n=e.apply(this,t);return h(this),n}}));var f=n(3685);r(f.Agent.prototype,"addRequest",(function(e){return function(t){var n=t.onSocket;return t.onSocket=o((function(e){return h(e),n.apply(this,arguments)})),e.apply(this,arguments)}}));var m=n(2081);function g(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=o(e._handle.onread),r(e._handle,"close",P))})),e._handle&&(e._handle.onexit=o(e._handle.onexit))}m.ChildProcess?r(m.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return g(this),t}})):i(m,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return g(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var y=[];process._nextDomainTick&&y.push("_nextDomainTick"),process._tickDomainCallback&&y.push("_tickDomainCallback"),i(process,y,O),r(process,"nextTick",P);var v=["setTimeout","setInterval"];global.setImmediate&&v.push("setImmediate");var b=n(9512),S=global.setTimeout===b.setTimeout;i(b,v,P),S&&i(global,v,P);var w=n(9523);i(w,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],O),w.resolveNaptr&&r(w,"resolveNaptr",O);var T,_,E,C=n(7147);i(C,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],O),C.lchown&&r(C,"lchown",O),C.lchmod&&r(C,"lchmod",O),C.ftruncate&&r(C,"ftruncate",O);try{T=n(9796)}catch{}T&&T.Deflate&&T.Deflate.prototype&&((_=Object.getPrototypeOf(T.Deflate.prototype))._transform?r(_,"_transform",O):_.write&&_.flush&&_.end&&i(_,["write","flush","end"],O));try{E=n(6113)}catch{}E&&(R=["pbkdf2","randomBytes"],u||R.push("pseudoRandomBytes"),i(E,R,O));var R,x,I=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();function O(e){var t=function(){var t,n=arguments.length-1;if("function"==typeof arguments[n]){t=Array(arguments.length);for(var r=0;r<arguments.length-1;r++)t[r]=arguments[r];t[n]=o(arguments[n])}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=o(r)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof i&&(i=o(i)),e.call(this,n,r,i))};case 4:return function(n,r,i,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof s&&(s=o(s)),e.call(this,n,r,i,s))};case 5:return function(n,r,i,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof a&&(a=o(a)),e.call(this,n,r,i,s,a))};case 6:return function(n,r,i,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof c&&(c=o(c)),e.call(this,n,r,i,s,a,c))};default:return t}}function P(e){var t=function(){var t;if("function"==typeof arguments[0]){(t=Array(arguments.length))[0]=o(arguments[0]);for(var n=1;n<arguments.length;n++)t[n]=arguments[n]}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i))};case 4:return function(n,r,i,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s))};case 5:return function(n,r,i,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s,a))};case 6:return function(n,r,i,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s,a,c))};default:return t}}I&&(x=process.addAsyncListener({create:function(){I=!1}}),global.Promise.resolve(!0).then((function(){I=!1})),process.removeAsyncListener(x)),I&&function(){var e=global.Promise;function t(r){if(!(this instanceof t))return e(r);if("function"!=typeof r)return new e(r);var i,o,s=new e((function(e,t){i=this,o=[function(t){return n(s,!1),e(t)},function(e){return n(s,!1),t(e)}]}));s.__proto__=t.prototype;try{r.apply(i,o)}catch(e){o[1](e)}return s}function n(e,t){(!e.__asl_wrapper||t)&&(e.__asl_wrapper=o(i))}function i(t,r,o,s){var a;try{return{returnVal:a=r.call(t,o),error:!1}}catch(e){return{errorVal:e,error:!0}}finally{a instanceof e?s.__asl_wrapper=function(){return(a.__asl_wrapper||i).apply(this,arguments)}:n(s,!0)}}function c(e){return function(){var t=this,n=e.apply(t,Array.prototype.map.call(arguments,(function(e){return"function"!=typeof e?e:o((function(r){var o=(t.__asl_wrapper||i)(this,e,r,n);if(o.error)throw o.errorVal;return o.returnVal}))})));return n.__asl_wrapper=function(e,r,o,s){return t.__asl_wrapper?(t.__asl_wrapper(e,(function(){}),null,n),n.__asl_wrapper(e,r,o,s)):i(e,r,o,s)},n}}s.inherits(t,e),r(e.prototype,"then",c),e.prototype.chain&&r(e.prototype,"chain",c),a?global.Promise=_r()(e,n):(["all","race","reject","resolve","accept","defer"].forEach((function(n){"function"==typeof e[n]&&(t[n]=e[n])})),global.Promise=t)}()})),Cr=S(((e,t)=>{"use strict";var r=n(9491),i=ar(),o="cls@contexts",s="error@context";function a(e){this.name=e,this.active=null,this._set=[],this.id=null}function c(e){return process.namespaces[e]}function l(e){var t=c(e);r.ok(t,"can't delete nonexistent namespace!"),r.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function u(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){l(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||Er(),a.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},a.prototype.get=function(e){if(this.active)return this.active[e]},a.prototype.createContext=function(){return Object.create(this.active)},a.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[s]=t),e}finally{this.exit(t)}},a.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},a.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[s]=t),e}finally{n.exit(t)}}},a.prototype.enter=function(e){r.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},a.prototype.exit=function(e){if(r.ok(e,"context must be provided for exiting"),this.active===e)return r.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);r.ok(t>=0,"context not currently entered; can't exit"),r.ok(t,"can't remove top context"),this._set.splice(t,1)},a.prototype.bindEmitter=function(e){r.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,n="context@"+this.name;i(e,(function(e){!e||(e[o]||(e[o]=Object.create(null)),e[o][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[o])return e;var t=e,n=e[o];return Object.keys(n).forEach((function(e){var r=n[e];t=r.namespace.bind(t,r.context)})),t}))},a.prototype.fromException=function(e){return e[s]},process.namespaces||u(),t.exports={getNamespace:c,createNamespace:function(e){r.ok(e,"namespace must be given a name!");var t=new a(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,n){n&&t.enter(n)},after:function(e,n){n&&t.exit(n)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:l,reset:u}})),Rr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorrelationContextManager=void 0;var t=O(),n=an(),r=dn(),i=pn(),o=ir(),s=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,n,r,i,o){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new a(r)}:null},e.spanToContextObject=function(t,n,i){var o=new r;return o.traceId=t.traceId,o.spanId=t.spanId,o.traceFlag=r.formatOpenTelemetryTraceFlags(t.traceFlags)||r.DEFAULT_TRACE_FLAG,o.parentId=n,e.generateContextObject(o.traceId,o.parentId,i,null,o)},e.runWithContext=function(t,n){var r;return e.enabled?e.session.bind(n,((r={})[e.CONTEXT_NAME]=t,r))():n()},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t,n){var r;return e.enabled?e.session.bind(t,n?((r={})[e.CONTEXT_NAME]=n,r):void 0):t},e.enable=function(t){if(!this.enabled){if(!this.isNodeVersionCompatible())return void(this.enabled=!1);e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,typeof this.cls>"u"&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=Sr():this.cls=Cr()),e.session=this.cls.createNamespace("AI-CLS-Session"),n.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0}},e.startOperation=function(n,s){var a=n&&n.traceContext||null,c=n&&n.traceId?n:null,l=n&&n.headers;if(c){var u=new r("00-"+c.traceId+"-"+c.spanId+"-01"),d=new i(c.traceState?c.traceState.serialize():null);return e.generateContextObject(c.traceId,"|"+c.traceId+"."+c.spanId+".","string"==typeof s?s:"",void 0,u,d)}if(a){u=new r(a.traceparent),d=new i(a.tracestate);var p="object"==typeof s?new o(s):null;return e.generateContextObject(u.traceId,u.parentId,"string"==typeof s?s:p.getOperationName({}),p&&p.getCorrelationContextHeader()||void 0,u,d)}return l?(u=new r(l.traceparent?l.traceparent.toString():null),d=new i(l.tracestate?l.tracestate.toString():null),p=new o(n),e.generateContextObject(u.traceId,u.parentId,p.getOperationName({}),p.getCorrelationContextHeader(),u,d)):(t.warn("startOperation was called with invalid arguments",arguments),null)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,r=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&n)&&r},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();e.CorrelationContextManager=s;var a=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t<this.props.length;++t){var n=this.props[t];if(n.key===e)return n.value}},e.prototype.setProperty=function(n,r){if(e.bannedCharacters.test(n)||e.bannedCharacters.test(r))t.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+n+" and value: "+r);else{for(var i=0;i<this.props.length;++i){var o=this.props[i];if(o.key===n)return void(o.value=r)}this.props.push({key:n,value:r})}},e.bannedCharacters=/[,=]/,e}()})),xr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=nr(),n=k(),r=[],i=function(e){var n=e.data.message;r.forEach((function(r){n instanceof Error?r.trackException({exception:n}):(n.lastIndexOf("\n")==n.length-1&&(n=n.substring(0,n.length-1)),r.trackTrace({message:n,severity:e.data.stderr?t.SeverityLevel.Warning:t.SeverityLevel.Information}))}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("console",i),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("console",i)},e.dispose=function(){n.channel.unsubscribe("console",i),r=[]}})),Ir=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=nr(),n=k(),r=[],i={10:t.SeverityLevel.Verbose,20:t.SeverityLevel.Verbose,30:t.SeverityLevel.Information,40:t.SeverityLevel.Warning,50:t.SeverityLevel.Error,60:t.SeverityLevel.Critical},o=function(e){var t=e.data.result;r.forEach((function(n){var r=i[e.data.level];t instanceof Error?n.trackException({exception:t}):n.trackTrace({message:t,severity:r})}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("bunyan",o),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("bunyan",o)},e.dispose=function(){n.channel.unsubscribe("bunyan",o),r=[]}})),Or=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=nr(),n=k(),r=[],i={syslog:function(e){var n={emerg:t.SeverityLevel.Critical,alert:t.SeverityLevel.Critical,crit:t.SeverityLevel.Critical,error:t.SeverityLevel.Error,warning:t.SeverityLevel.Warning,notice:t.SeverityLevel.Information,info:t.SeverityLevel.Information,debug:t.SeverityLevel.Verbose};return void 0===n[e]?t.SeverityLevel.Information:n[e]},npm:function(e){var n={error:t.SeverityLevel.Error,warn:t.SeverityLevel.Warning,info:t.SeverityLevel.Information,verbose:t.SeverityLevel.Verbose,debug:t.SeverityLevel.Verbose,silly:t.SeverityLevel.Verbose};return void 0===n[e]?t.SeverityLevel.Information:n[e]},unknown:function(e){return t.SeverityLevel.Information}},o=function(e){var t=e.data.message;r.forEach((function(n){if(t instanceof Error)n.trackException({exception:t,properties:e.data.meta});else{var r=i[e.data.levelKind](e.data.level);n.trackTrace({message:t,severity:r,properties:e.data.meta})}}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("winston",o),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("winston",o)},e.dispose=function(){n.channel.unsubscribe("winston",o),r=[]}})),Pr=S(((e,t)=>{"use strict";var n=an(),r=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){n.IsInitialized&&(xr().enable(e&&t,this._client),Ir().enable(e,this._client),Or().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();t.exports=r})),Dr=S(((e,t)=>{"use strict";var n=function(){function e(t){if(e.INSTANCE)throw new Error("Exception tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t;var n=process.versions.node.split(".");e._canUseUncaughtExceptionMonitor=parseInt(n[0])>13||13===parseInt(n[0])&&parseInt(n[1])>=7}return e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.enable=function(t){var n=this;if(t){if(this._isInitialized=!0,!this._exceptionListenerHandle){var r=function(t,r,i){void 0===i&&(i=new Error(e._FALLBACK_ERROR_MESSAGE)),n._client.trackException({exception:i}),n._client.flush({isAppCrashing:!0}),t&&r&&1===process.listeners(r).length&&(console.error(i),process.exit(1))};e._canUseUncaughtExceptionMonitor?(this._exceptionListenerHandle=r.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle)):(this._exceptionListenerHandle=r.bind(this,!0,e.UNCAUGHT_EXCEPTION_HANDLER_NAME),this._rejectionListenerHandle=r.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.on(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle))}}else this._exceptionListenerHandle&&(e._canUseUncaughtExceptionMonitor?process.removeListener(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle):(process.removeListener(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.removeListener(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle)),this._exceptionListenerHandle=void 0,this._rejectionListenerHandle=void 0,delete this._exceptionListenerHandle,delete this._rejectionListenerHandle)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.INSTANCE=null,e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME="uncaughtExceptionMonitor",e.UNCAUGHT_EXCEPTION_HANDLER_NAME="uncaughtException",e.UNHANDLED_REJECTION_HANDLER_NAME="unhandledRejection",e._RETHROW_EXIT_MESSAGE="Application Insights Rethrow Exception Handler",e._FALLBACK_ERROR_MESSAGE="A promise was rejected without providing an error. Application Insights generated this error stack for you.",e._canUseUncaughtExceptionMonitor=!1,e}();t.exports=n})),Ar=S((e=>{"use strict";var t,n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HeartBeatMetricName=e.DependencyTypeName=e.SpanAttribute=e.TelemetryTypeStringToQuickPulseDocumentType=e.TelemetryTypeStringToQuickPulseType=e.QuickPulseType=e.QuickPulseDocumentType=e.PerformanceToQuickPulseCounter=e.MetricId=e.PerformanceCounter=e.QuickPulseCounter=e.DEFAULT_LIVEMETRICS_HOST=e.DEFAULT_LIVEMETRICS_ENDPOINT=e.DEFAULT_BREEZE_ENDPOINT=void 0,e.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",(r=n=e.QuickPulseCounter||(e.QuickPulseCounter={})).COMMITTED_BYTES="\\Memory\\Committed Bytes",r.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",r.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",r.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",r.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",r.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",r.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",r.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",r.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec",function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(i=e.PerformanceCounter||(e.PerformanceCounter={})),function(e){e.REQUESTS_DURATION="requests/duration",e.DEPENDENCIES_DURATION="dependencies/duration",e.EXCEPTIONS_COUNT="exceptions/count",e.TRACES_COUNT="traces/count"}(e.MetricId||(e.MetricId={})),e.PerformanceToQuickPulseCounter=((t={})[i.PROCESSOR_TIME]=n.PROCESSOR_TIME,t[i.REQUEST_RATE]=n.REQUEST_RATE,t[i.REQUEST_DURATION]=n.REQUEST_DURATION,t[n.COMMITTED_BYTES]=n.COMMITTED_BYTES,t[n.REQUEST_FAILURE_RATE]=n.REQUEST_FAILURE_RATE,t[n.DEPENDENCY_RATE]=n.DEPENDENCY_RATE,t[n.DEPENDENCY_FAILURE_RATE]=n.DEPENDENCY_FAILURE_RATE,t[n.DEPENDENCY_DURATION]=n.DEPENDENCY_DURATION,t[n.EXCEPTION_RATE]=n.EXCEPTION_RATE,t),e.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"},e.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"},e.TelemetryTypeStringToQuickPulseType={EventData:e.QuickPulseType.Event,ExceptionData:e.QuickPulseType.Exception,MessageData:e.QuickPulseType.Trace,MetricData:e.QuickPulseType.Metric,RequestData:e.QuickPulseType.Request,RemoteDependencyData:e.QuickPulseType.Dependency,AvailabilityData:e.QuickPulseType.Availability,PageViewData:e.QuickPulseType.PageView},e.TelemetryTypeStringToQuickPulseDocumentType={EventData:e.QuickPulseDocumentType.Event,ExceptionData:e.QuickPulseDocumentType.Exception,MessageData:e.QuickPulseDocumentType.Trace,MetricData:e.QuickPulseDocumentType.Metric,RequestData:e.QuickPulseDocumentType.Request,RemoteDependencyData:e.QuickPulseDocumentType.Dependency,AvailabilityData:e.QuickPulseDocumentType.Availability,PageViewData:e.QuickPulseDocumentType.PageView},e.SpanAttribute={HttpHost:"http.host",HttpMethod:"http.method",HttpPort:"http.port",HttpStatusCode:"http.status_code",HttpUrl:"http.url",HttpUserAgent:"http.user_agent",GrpcMethod:"grpc.method",GrpcService:"rpc.service"},e.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc"},e.HeartBeatMetricName="HeartBeat"})),Nr=S(((e,t)=>{"use strict";var r=n(2037),i=Ar(),o=function(){function e(t,n,r){void 0===n&&(n=6e4),void 0===r&&(r=!1),this._lastIntervalRequestExecutionTime=0,this._lastIntervalDependencyExecutionTime=0,e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t,this._collectionInterval=n,this._enableLiveMetricsCounters=r}return e.prototype.enable=function(t,n){var i=this;this._isEnabled=t,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),t?this._handle||(this._lastCpus=r.cpus(),this._lastRequests={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},this._lastDependencies={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},this._lastExceptions={totalExceptionCount:e._totalExceptionCount,time:+new Date},"function"==typeof process.cpuUsage&&(this._lastAppCpuUsage=process.cpuUsage()),this._lastHrtime=process.hrtime(),this._collectionInterval=n||this._collectionInterval,this._handle=setInterval((function(){return i.trackPerformance()}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countRequest=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalRequestExecutionTime+=r,!1===n&&e._totalFailedRequestCount++,e._totalRequestCount++}},e.countException=function(){e._totalExceptionCount++},e.countDependency=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalDependencyExecutionTime+=r,!1===n&&e._totalFailedDependencyCount++,e._totalDependencyCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPerformance=function(){this._trackCpu(),this._trackMemory(),this._trackNetwork(),this._trackDependencyRate(),this._trackExceptionRate()},e.prototype._trackCpu=function(){var e=r.cpus();if(e&&e.length&&this._lastCpus&&e.length===this._lastCpus.length){for(var t=0,n=0,o=0,s=0,a=0,c=0;e&&c<e.length;c++){var l=e[c],u=this._lastCpus[c],d=(l.model,l.speed,l.times),p=u.times;t+=d.user-p.user||0,n+=d.sys-p.sys||0,o+=d.nice-p.nice||0,s+=d.idle-p.idle||0,a+=d.irq-p.irq||0}var h=void 0;if("function"==typeof process.cpuUsage){var f=process.cpuUsage(),m=process.hrtime(),g=f.user-this._lastAppCpuUsage.user+(f.system-this._lastAppCpuUsage.system)||0;typeof this._lastHrtime<"u"&&2===this._lastHrtime.length&&(h=100*g/((1e6*(m[0]-this._lastHrtime[0])+(m[1]-this._lastHrtime[1])/1e3||0)*e.length)),this._lastAppCpuUsage=f,this._lastHrtime=m}var y=t+n+o+s+a||1;this._client.trackMetric({name:i.PerformanceCounter.PROCESSOR_TIME,value:(y-s)/y*100}),this._client.trackMetric({name:i.PerformanceCounter.PROCESS_TIME,value:h||t/y*100})}this._lastCpus=e},e.prototype._trackMemory=function(){var e=r.freemem(),t=process.memoryUsage().rss,n=r.totalmem()-e;this._client.trackMetric({name:i.PerformanceCounter.PRIVATE_BYTES,value:t}),this._client.trackMetric({name:i.PerformanceCounter.AVAILABLE_BYTES,value:e}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.COMMITTED_BYTES,value:n})},e.prototype._trackNetwork=function(){var t=this._lastRequests,n={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},r=n.totalRequestCount-t.totalRequestCount||0,o=n.totalFailedRequestCount-t.totalFailedRequestCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalRequestExecutionTime-this._lastIntervalRequestExecutionTime)/r||0;if(this._lastIntervalRequestExecutionTime=e._intervalRequestExecutionTime,s>0){var l=r/a,u=o/a;this._client.trackMetric({name:i.PerformanceCounter.REQUEST_RATE,value:l}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.PerformanceCounter.REQUEST_DURATION,value:c}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.REQUEST_FAILURE_RATE,value:u})}this._lastRequests=n},e.prototype._trackDependencyRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastDependencies,n={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},r=n.totalDependencyCount-t.totalDependencyCount||0,o=n.totalFailedDependencyCount-t.totalFailedDependencyCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalDependencyExecutionTime-this._lastIntervalDependencyExecutionTime)/r||0;if(this._lastIntervalDependencyExecutionTime=e._intervalDependencyExecutionTime,s>0){var l=r/a,u=o/a;this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_RATE,value:l}),this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_FAILURE_RATE,value:u}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_DURATION,value:c})}this._lastDependencies=n}},e.prototype._trackExceptionRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastExceptions,n={totalExceptionCount:e._totalExceptionCount,time:+new Date},r=n.totalExceptionCount-t.totalExceptionCount||0,o=n.time-t.time;if(o>0){var s=r/(o/1e3);this._client.trackMetric({name:i.QuickPulseCounter.EXCEPTION_RATE,value:s})}this._lastExceptions=n}},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e._totalRequestCount=0,e._totalFailedRequestCount=0,e._totalDependencyCount=0,e._totalFailedDependencyCount=0,e._totalExceptionCount=0,e._intervalDependencyExecutionTime=0,e._intervalRequestExecutionTime=0,e}();t.exports=o})),kr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AggregatedMetricCounter=void 0;e.AggregatedMetricCounter=function(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}})),jr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreaggregatedMetricPropertyNames=void 0,e.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}})),qr=S(((e,t)=>{"use strict";var n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},r=Ar(),i=kr(),o=jr(),s=function(){function e(t,n){void 0===n&&(n=6e4),e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,e._dependencyCountersCollection=[],e._requestCountersCollection=[],e._exceptionCountersCollection=[],e._traceCountersCollection=[],this._client=t,this._collectionInterval=n}return e.prototype.enable=function(e,t){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._collectionInterval=t||this._collectionInterval,this._handle=setInterval((function(){return n.trackPreAggregatedMetrics()}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countException=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._exceptionCountersCollection).totalCount++},e.countTrace=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._traceCountersCollection).totalCount++},e.countRequest=function(t,n){if(e.isEnabled()){var r,i=e._getAggregatedCounter(n,this._requestCountersCollection);if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}i.intervalExecutionTime+=r,i.totalCount++}},e.countDependency=function(t,n){if(e.isEnabled()){var r,i=e._getAggregatedCounter(n,this._dependencyCountersCollection);if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}i.intervalExecutionTime+=r,i.totalCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPreAggregatedMetrics=function(){this._trackRequestMetrics(),this._trackDependencyMetrics(),this._trackExceptionMetrics(),this._trackTraceMetrics()},e._getAggregatedCounter=function(e,t){for(var n=!1,r=0;r<t.length;r++){if(e===t[r].dimensions)return t[r];if(Object.keys(e).length===Object.keys(t[r].dimensions).length){for(var o in e)if(e[o]!=t[r].dimensions[o]){n=!0;break}if(!n)return t[r];n=!1}}var s=new i.AggregatedMetricCounter(e);return t.push(s),s},e.prototype._trackRequestMetrics=function(){for(var t=0;t<e._requestCountersCollection.length;t++){var n=e._requestCountersCollection[t];n.time=+new Date;var i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime,s=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/i||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,o>0&&i>0&&this._trackPreAggregatedMetric({name:"Server response time",dimensions:n.dimensions,value:s,count:i,aggregationInterval:o,metricType:r.MetricId.REQUESTS_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackDependencyMetrics=function(){for(var t=0;t<e._dependencyCountersCollection.length;t++){var n=e._dependencyCountersCollection[t];n.time=+new Date;var i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime,s=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/i||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,o>0&&i>0&&this._trackPreAggregatedMetric({name:"Dependency duration",dimensions:n.dimensions,value:s,count:i,aggregationInterval:o,metricType:r.MetricId.DEPENDENCIES_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackExceptionMetrics=function(){for(var t=0;t<e._exceptionCountersCollection.length;t++){var n=e._exceptionCountersCollection[t],i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime;this._trackPreAggregatedMetric({name:"Exceptions",dimensions:n.dimensions,value:i,count:i,aggregationInterval:o,metricType:r.MetricId.EXCEPTIONS_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackTraceMetrics=function(){for(var t=0;t<e._traceCountersCollection.length;t++){var n=e._traceCountersCollection[t],i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime;this._trackPreAggregatedMetric({name:"Traces",dimensions:n.dimensions,value:i,count:i,aggregationInterval:o,metricType:r.MetricId.TRACES_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackPreAggregatedMetric=function(e){var t={};for(var r in e.dimensions)t[o.PreaggregatedMetricPropertyNames[r]]=e.dimensions[r];t=n(n({},t),{"_MS.MetricId":e.metricType,"_MS.AggregationIntervalMs":String(e.aggregationInterval),"_MS.IsAutocollected":"True"});var i={name:e.name,value:e.value,count:e.count,properties:t,kind:"Aggregation"};this._client.trackMetric(i)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e}();t.exports=s})),Mr=S(((e,t)=>{"use strict";var r=n(2037),i=n(7147),o=n(1017),s=nr(),a=O(),c=function(){function e(e){this.keys=new s.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||o.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.appVersion[t]=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=r&&r.hostname(),this.tags[this.keys.deviceOSVersion]=r&&r.type()+" "+r.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=r&&r.arch(),this.tags["ai.device.osPlatform"]=r&&r.platform()},e.prototype._loadInternalContext=function(){var t=o.resolve(__dirname,"../../package.json");if(!e.sdkVersion){e.sdkVersion="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.sdkVersion=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();t.exports=c})),Lr=S(((e,t)=>{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(7310),s=nr(),a=ln(),c=cn(),l=rr(),u=un(),d=function(e){function t(n,r){var i=e.call(this)||this;return r&&r.method&&n&&(i.method=r.method,i.url=t._getUrlFromRequestOptions(n,r),i.startTime=+new Date),i}return i(t,e),t.prototype.onError=function(e){this._setStatus(void 0,e)},t.prototype.onResponse=function(e){this._setStatus(e.statusCode,void 0),this.correlationId=a.getCorrelationContextTarget(e,c.requestContextTargetKey)},t.prototype.getDependencyTelemetry=function(e,t){var n=o.parse(this.url);n.search=void 0,n.hash=void 0;var r=this.method.toUpperCase()+" "+n.pathname,i=s.RemoteDependencyDataConstants.TYPE_HTTP,a=n.hostname;n.port&&(a+=":"+n.port),this.correlationId?(i=s.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==u.correlationIdPrefix&&(a+=" | "+this.correlationId)):i=s.RemoteDependencyDataConstants.TYPE_HTTP;var c={id:t,name:r,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:i,target:a};if(e&&e.time?c.time=e.time:this.startTime&&(c.time=new Date(this.startTime)),e){for(var l in e)c[l]||(c[l]=e[l]);if(e.properties)for(var l in e.properties)c.properties[l]=e.properties[l]}return c},t._getUrlFromRequestOptions=function(e,t){if("string"==typeof e)if(0===e.indexOf("http://")||0===e.indexOf("https://"))e=o.parse(e);else{var n=o.parse(e);e="443"===n.host?o.parse("https://"+e):o.parse("http://"+e)}else{if(e&&"function"==typeof o.URL&&e instanceof o.URL)return o.format(e);var r=e;e={},r&&Object.keys(r).forEach((function(t){e[t]=r[t]}))}if(e.path){var i=o.parse(e.path);e.pathname=i.pathname,e.search=i.search}return e.host&&e.port&&!o.parse("http://"+e.host).port&&e.port&&(e.hostname=e.host,delete e.host),e.protocol=e.protocol||t.agent&&t.agent.protocol||t.protocol||void 0,e.hostname=e.hostname||"localhost",o.format(e)},t}(l);t.exports=d})),Fr=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.spanToTelemetryContract=void 0;var n=Oe(),r=Ar();function i(e){var n=t({},e);return Object.keys(r.SpanAttribute).forEach((function(e){delete n[e]})),n}e.spanToTelemetryContract=function(e){var o="|"+e.spanContext().traceId+"."+e.spanContext().spanId+".",s=Math.round(1e3*e._duration[0]+e._duration[1]/1e6),a=e.attributes["peer.address"]?e.attributes["peer.address"].toString():"",c=e.attributes.component?e.attributes.component.toString():"",l=c.toUpperCase()===r.DependencyTypeName.Http||!!e.attributes[r.SpanAttribute.HttpUrl],u=c.toLowerCase()===r.DependencyTypeName.Grpc;if(l){var d=e.attributes[r.SpanAttribute.HttpMethod]||"GET",p=new URL(e.attributes[r.SpanAttribute.HttpUrl].toString()),h=e.attributes[r.SpanAttribute.HttpHost]||p.host,f=e.attributes[r.SpanAttribute.HttpPort]||p.port||null,m=d+" "+(p.pathname||"/"),g=r.DependencyTypeName.Http,y=f?(h+":"+f).toString():h.toString(),v=p.toString(),b=e.attributes[r.SpanAttribute.HttpStatusCode]||e.status.code||0;return{id:o,name:m,dependencyTypeName:g,target:y,data:v,success:b<400,duration:s,url:v,resultCode:String(b),properties:i(e.attributes)}}if(u){d=e.attributes[r.SpanAttribute.GrpcMethod]||"rpc";var S=e.attributes[r.SpanAttribute.GrpcService],w=S?d+" "+S:e.name;return{id:o,duration:s,name:w,target:S.toString(),data:S.toString()||w,url:S.toString()||w,dependencyTypeName:r.DependencyTypeName.Grpc,resultCode:String(e.status.code||0),success:0===e.status.code,properties:i(e.attributes)}}var T=e.name,_=e.links&&e.links.map((function(e){return{operation_Id:e.context.traceId,id:e.context.spanId}}));return{id:o,duration:s,name:T,target:a,data:a||T,url:a||T,dependencyTypeName:e.kind===n.SpanKind.INTERNAL?r.DependencyTypeName.InProc:c||e.name,resultCode:String(e.status.code||0),success:0===e.status.code,properties:t(t({},i(e.attributes)),{"_MS.links":_||void 0})}}})),Ur=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=Oe(),n=k(),r=dn(),i=Fr(),o=P(),s=[];e.subscriber=function(e){var n=e.data,a=i.spanToTelemetryContract(n),c=n.spanContext(),l=new r;l.traceId=c.traceId,l.spanId=c.spanId,l.traceFlag=r.formatOpenTelemetryTraceFlags(c.traceFlags),l.parentId=n.parentSpanId?"|"+c.traceId+"."+n.parentSpanId+".":null,o.AsyncScopeManager.with(n,(function(){s.forEach((function(e){n.kind===t.SpanKind.SERVER?e.trackRequest(a):(n.kind===t.SpanKind.CLIENT||n.kind===t.SpanKind.INTERNAL)&&e.trackDependency(a)}))}))},e.enable=function(t,r){t?(0===s.length&&n.channel.subscribe("azure-coretracing",e.subscriber),s.push(r)):0===(s=s.filter((function(e){return e!=r}))).length&&n.channel.unsubscribe("azure-coretracing",e.subscriber)}})),Br=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=k(),n=[];e.subscriber=function(e){"ismaster"!==e.data.event.commandName&&n.forEach((function(t){var n=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:n,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",time:e.data.startedData.time,dependencyTypeName:"mongodb"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("mongodb",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("mongodb",e.subscriber)}})),zr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=k(),n=[];e.subscriber=function(e){n.forEach((function(t){var n=e.data.query||{},r=n.sql||"Unknown query",i=!e.data.err,o=(n._connection||{}).config||{},s=o.socketPath?o.socketPath:(o.host||"localhost")+":"+o.port;t.trackDependency({target:s,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"mysql"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("mysql",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("mysql",e.subscriber)}})),Hr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=k(),n=[];e.subscriber=function(e){n.forEach((function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",time:e.data.time,dependencyTypeName:"redis"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("redis",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("redis",e.subscriber)}})),Gr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=k(),n=[];e.subscriber=function(e){n.forEach((function(t){var n=e.data.query,r=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!e.data.error,o=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:o,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"postgres"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("postgres",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("postgres",e.subscriber)}})),Vr=S(((e,t)=>{"use strict";var r=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},i=n(3685),o=n(5687),s=O(),a=ln(),c=cn(),l=Lr(),u=Rr(),d=un(),p=dn(),h=an(),f=function(){function e(t){if(e.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),h.IsInitialized&&(Ur().enable(!0,this._client),Br().enable(e,this._client),zr().enable(e,this._client),Hr().enable(e,this._client),Gr().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=i.request,s=o.request,a=function(n,r){var i=!r[e.disableCollectionRequestOption]&&!n[e.alreadyAutoCollectedFlag];r.headers&&r.headers["user-agent"]&&-1!==r.headers["user-agent"].toString().indexOf("azsdk-js")&&(i=!1),n[e.alreadyAutoCollectedFlag]=!0,n&&r&&i&&(u.CorrelationContextManager.wrapEmitter(n),e.trackRequest(t._client,{options:r,request:n}))};i.request=function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];var s=n.call.apply(n,r([i,e],t));return a(s,e),s},o.request=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=s.call.apply(s,r([o,e],t));return a(i,e),i},i.get=function(e){for(var t,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var s=(t=i.request).call.apply(t,r([i,e],n));return s.end(),s},o.get=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(t=o.request).call.apply(t,r([o,e],n));return s.end(),s}},e.trackRequest=function(t,n){if(n.options&&n.request&&t){var r,i,o=new l(n.options,n.request),h=u.CorrelationContextManager.getCurrentContext();if(h&&h.operation&&h.operation.traceparent&&p.isValidTraceId(h.operation.traceparent.traceId)?(h.operation.traceparent.updateSpanId(),r=h.operation.traceparent.getBackCompatRequestId()):d.w3cEnabled?(i=(m=new p).toString(),r=m.getBackCompatRequestId()):r=h&&h.operation&&h.operation.parentId+e.requestNumber+++".",a.canIncludeCorrelationHeader(t,o.getUrl())&&n.request.getHeader&&n.request.setHeader&&t.config&&t.config.correlationId){var f=n.request.getHeader(c.requestContextHeader);try{a.safeIncludeCorrelationHeader(t,n.request,f)}catch(e){s.warn("Request-Context header could not be set. Correlation of requests may be lost",e)}if(h&&h.operation)try{if(n.request.setHeader(c.requestIdHeader,r),t.config.ignoreLegacyHeaders||(n.request.setHeader(c.parentIdHeader,h.operation.id),n.request.setHeader(c.rootIdHeader,r)),i||h.operation.traceparent)n.request.setHeader(c.traceparentHeader,i||h.operation.traceparent.toString());else if(d.w3cEnabled){var m=(new p).toString();n.request.setHeader(c.traceparentHeader,m)}if(h.operation.tracestate){var g=h.operation.tracestate.toString();g&&n.request.setHeader(c.traceStateHeader,g)}var y=h.customProperties.serializeToHeader();y&&n.request.setHeader(c.correlationContextHeader,y)}catch(e){s.warn("Correlation headers could not be set. Correlation of requests may be lost.",e)}}n.request.on&&(n.request.on("response",(function(e){o.onResponse(e);var i=o.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects["http.ClientResponse"]=e,t.trackDependency(i)})),n.request.on("error",(function(e){o.onError(e);var i=o.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects.Error=e,t.trackDependency(i)})),n.request.on("abort",(function(){o.onError(new Error);var e=o.getDependencyTelemetry(n,r);e.contextObjects=e.contextObjects||{},e.contextObjects["http.RequestOptions"]=n.options,e.contextObjects["http.ClientRequest"]=n.request,t.trackDependency(e)})))}else s.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!n.options,!n.request,!t)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.disableCollectionRequestOption="disableAppInsightsAutoCollection",e.requestNumber=1,e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=f})),Wr=S(((e,t)=>{"use strict";var r=n(2037),i=Ar(),o=ln(),s=Mr(),a=Vr(),c=function(){function e(t){this._collectionInterval=9e5,this._vmData={},this._azInst_vmId="",this._azInst_subscriptionId="",this._azInst_osType="",e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t}return e.prototype.enable=function(e,t){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._handle=setInterval((function(){return n.trackHeartBeat(t,(function(){}))}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=null)},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackHeartBeat=function(e,t){var n=this,o=!1,a={},c=s.sdkVersion;a.sdk=c,a.osType=r.type(),process.env.WEBSITE_SITE_NAME?(a.appSrv_SiteName=process.env.WEBSITE_SITE_NAME||"",a.appSrv_wsStamp=process.env.WEBSITE_HOME_STAMPNAME||"",a.appSrv_wsHost=process.env.WEBSITE_HOSTNAME||""):process.env.FUNCTIONS_WORKER_RUNTIME?a.azfunction_appId=process.env.WEBSITE_HOSTNAME:e&&(void 0===this._isVM?(o=!0,this._getAzureComputeMetadata(e,(function(){n._isVM&&Object.keys(n._vmData).length>0&&(a.azInst_vmId=n._vmData.vmId||"",a.azInst_subscriptionId=n._vmData.subscriptionId||"",a.azInst_osType=n._vmData.osType||"",n._azInst_vmId=n._vmData.vmId||"",n._azInst_subscriptionId=n._vmData.subscriptionId||"",n._azInst_osType=n._vmData.osType||""),n._client.trackMetric({name:i.HeartBeatMetricName,value:0,properties:a}),t()}))):this._isVM&&(a.azInst_vmId=this._azInst_vmId,a.azInst_subscriptionId=this._azInst_subscriptionId,a.azInst_osType=this._azInst_osType)),o||(this._client.trackMetric({name:i.HeartBeatMetricName,value:0,properties:a}),t())},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.prototype._getAzureComputeMetadata=function(e,t){var n,r=this,i=((n={method:"GET"})[a.disableCollectionRequestOption]=!0,n.headers={Metadata:"True"},n),s=o.makeRequest(e,"http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01&format=json",i,(function(e){if(200===e.statusCode){r._isVM=!0;var n="";e.on("data",(function(e){n+=e})),e.on("end",(function(){r._vmData=r._isJSON(n)?JSON.parse(n):{},t()}))}else t()}));s&&(s.on("error",(function(e){e&&e.message&&e.message.indexOf("ENETUNREACH")>-1&&(r._isVM=!1),t()})),s.end())},e.prototype._isJSON=function(e){try{return JSON.parse(e)&&!!e}catch{return!1}},e}();t.exports=c})),$r=S(((e,t)=>{"use strict";var r=n(3685),i=n(5687),o=O(),s=ln(),a=cn(),c=ir(),l=Rr(),u=Nr(),d=function(){function e(t){if(e.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||u.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},e.prototype.useAutoCorrelation=function(e,t){e&&!this._isAutoCorrelating?l.CorrelationContextManager.enable(t):!e&&this._isAutoCorrelating&&l.CorrelationContextManager.disable(),this._isAutoCorrelating=e},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},e.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return l.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=function(n){if(n){if("function"!=typeof n)throw new Error("onRequest handler must be a function");return function(r,i){l.CorrelationContextManager.wrapEmitter(r),l.CorrelationContextManager.wrapEmitter(i);var o=r&&!r[e.alreadyAutoCollectedFlag];if(r&&o){var s=new c(r),a=t._generateCorrelationContext(s);l.CorrelationContextManager.runWithContext(a,(function(){t._isEnabled&&(r[e.alreadyAutoCollectedFlag]=!0,e.trackRequest(t._client,{request:r,response:i},s)),"function"==typeof n&&n(r,i)}))}else"function"==typeof n&&n(r,i)}}},o=function(e){var t=e.addListener.bind(e);e.addListener=function(e,r){switch(e){case"request":case"checkContinue":return t(e,n(r));default:return t(e,r)}},e.on=e.addListener},s=r.createServer;r.createServer=function(e,t){if(t&&"function"==typeof t){var r=s(e,n(t));return o(r),r}return r=s(n(e)),o(r),r};var a=i.createServer;i.createServer=function(e,t){var r=a(e,n(t));return o(r),r}},e.trackRequestSync=function(t,n){if(n.request&&n.response&&t){e.addResponseCorrelationIdHeader(t,n.response);var r=l.CorrelationContextManager.getCurrentContext(),i=new c(n.request,r&&r.operation.parentId);r&&(r.operation.id=i.getOperationId(t.context.tags)||r.operation.id,r.operation.name=i.getOperationName(t.context.tags)||r.operation.name,r.operation.parentId=i.getRequestId()||r.operation.parentId,r.customProperties.addHeaderData(i.getCorrelationContextHeader())),e.endRequest(t,i,n,n.duration,n.error)}else o.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!n.request,!n.response,!t)},e.trackRequest=function(t,n,r){if(n.request&&n.response&&t){var i=l.CorrelationContextManager.getCurrentContext(),a=r||new c(n.request,i&&i.operation.parentId);s.canIncludeCorrelationHeader(t,a.getUrl())&&e.addResponseCorrelationIdHeader(t,n.response),i&&!r&&(i.operation.id=a.getOperationId(t.context.tags)||i.operation.id,i.operation.name=a.getOperationName(t.context.tags)||i.operation.name,i.operation.parentId=a.getOperationParentId(t.context.tags)||i.operation.parentId,i.customProperties.addHeaderData(a.getCorrelationContextHeader())),n.response.once&&n.response.once("finish",(function(){e.endRequest(t,a,n,null,null)})),n.request.on&&n.request.on("error",(function(r){e.endRequest(t,a,n,null,r)})),n.request.on&&n.request.on("aborted",(function(){e.endRequest(t,a,n,null,"The request has been aborted and the network socket has closed.")}))}else o.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!n.request,!n.response,!t)},e.addResponseCorrelationIdHeader=function(e,t){if(e.config&&e.config.correlationId&&t.getHeader&&t.setHeader&&!t.headersSent){var n=t.getHeader(a.requestContextHeader);s.safeIncludeCorrelationHeader(e,t,n)}},e.endRequest=function(e,t,n,r,i){i?t.onError(i,r):t.onResponse(n.response,r);var o=t.getRequestTelemetry(n);if(o.tagOverrides=t.getRequestTags(e.context.tags),n.tagOverrides)for(var s in n.tagOverrides)o.tagOverrides[s]=n.tagOverrides[s];var a=t.getLegacyRootId();a&&(o.properties.ai_legacyRootId=a),o.contextObjects=o.contextObjects||{},o.contextObjects["http.ServerRequest"]=n.request,o.contextObjects["http.ServerResponse"]=n.response,e.trackRequest(o)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1,l.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=d})),Kr=S(((e,t)=>{"use strict";var r=e&&e.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=n(2037),o=nr(),s=Ar(),a=ln(),c=O(),l=a.w3cTraceId(),u=function(){function e(){}return e.createQuickPulseEnvelope=function(e,t,n,r){var o=i&&"function"==typeof i.hostname&&i.hostname()||"Unknown",s=r.tags&&r.keys&&r.keys.cloudRoleInstance&&r.tags[r.keys.cloudRoleInstance]||o,a=r.tags&&r.keys&&r.keys.cloudRole&&r.tags[r.keys.cloudRole]||null;return{Documents:t.length>0?t:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:r.tags[r.keys.internalSdkVersion],StreamId:l,MachineName:o,Instance:s,RoleName:a}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case o.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case o.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case o.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case o.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case o.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.name;return r(r({},n),{Name:i})},e.createQuickPulseTraceDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.severityLevel||0;return r(r({},n),{Message:t.data.baseData.message,SeverityLevel:o.SeverityLevel[i]})},e.createQuickPulseExceptionDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.exceptions,o="",s="",a="";return i&&i.length>0&&(i[0].parsedStack&&i[0].parsedStack.length>0?i[0].parsedStack.forEach((function(e){o+=e.assembly+"\n"})):i[0].stack&&i[0].stack.length>0&&(o=i[0].stack),s=i[0].message,a=i[0].typeName),r(r({},n),{Exception:o,ExceptionMessage:s,ExceptionType:a})},e.createQuickPulseRequestDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Success:i.success,Duration:i.duration,ResponseCode:i.responseCode,OperationName:i.name})},e.createQuickPulseDependencyDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Target:i.target,Success:i.success,Duration:i.duration,ResultCode:i.resultCode,CommandName:i.data,OperationName:n.OperationId,DependencyTypeName:i.type})},e.createQuickPulseDocument=function(t){var n,r;return t.data.baseType?(r=s.TelemetryTypeStringToQuickPulseType[t.data.baseType],n=s.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):c.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:n,__type:r,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],n=e.data.baseData.measurements||{};for(var r in n)if(n.hasOwnProperty(r)){var i={key:r,value:n[r]};t.push(i)}var o=e.data.baseData.properties||{};for(var r in o)o.hasOwnProperty(r)&&(i={key:r,value:o[r]},t.push(i));return t},e.keys=new o.ContextTagKeys,e}();t.exports=u})),Qr=S(((e,t)=>{"use strict";t.exports={getTransmissionTime:function(){return 1e4*(Date.now()+621355968e5)}}})),Jr=S(((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=n(5687),s=Vr(),a=O(),c=Qr(),l=ln(),u="x-ms-qps-service-polling-interval-hint",d="x-ms-qps-service-endpoint-redirect",p=function(){function e(e){this._config=e,this._consecutiveErrors=0}return e.prototype.ping=function(e,t,n){var r=[{name:"x-ms-qps-stream-id",value:e.StreamId},{name:"x-ms-qps-machine-name",value:e.MachineName},{name:"x-ms-qps-role-name",value:e.RoleName},{name:"x-ms-qps-instance-name",value:e.Instance},{name:"x-ms-qps-invariant-version",value:e.InvariantVersion.toString()}];this._submitData(e,t,n,"ping",r)},e.prototype.post=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this._submitData([e],t,n,"post")];case 1:return r.sent(),[2]}}))}))},e.prototype._submitData=function(e,t,n,a,p){return r(this,void 0,void 0,(function(){var r,h,f,m,g,y=this;return i(this,(function(i){return r=JSON.stringify(e),(m={})[s.disableCollectionRequestOption]=!0,m.host=t&&t.length>0?t:this._config.quickPulseHost,m.method="POST",m.path="/QuickPulseService.svc/"+a+"?ikey="+this._config.instrumentationKey,m.headers=((g={Expect:"100-continue"})["x-ms-qps-transmission-time"]=c.getTransmissionTime(),g["Content-Type"]="application/json",g["Content-Length"]=Buffer.byteLength(r),g),h=m,p&&p.length>0&&p.forEach((function(e){return h.headers[e.name]=e.value})),this._config.httpsAgent?h.agent=this._config.httpsAgent:h.agent=l.tlsRestrictedAgent,(f=o.request(h,(function(e){if(200==e.statusCode){var t="true"===e.headers["x-ms-qps-subscribed"],r=e.headers[d]?e.headers[d].toString():null,i=e.headers[u]?parseInt(e.headers[u].toString()):null;y._consecutiveErrors=0,n(t,e,r,i)}else y._onError("StatusCode:"+e.statusCode+" StatusMessage:"+e.statusMessage),n()}))).on("error",(function(e){y._onError(e),n()})),f.write(r),f.end(),[2]}))}))},e.prototype._onError=function(t){this._consecutiveErrors++;var n="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN==0?(n="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",a.warn(e.TAG,n,t)):a.info(e.TAG,n,t)},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();t.exports=p})),Xr=S(((e,t)=>{"use strict";var n=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},r=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=O(),o=Kr(),s=Jr(),a=Ar(),c=Mr(),l=function(){function e(e,t){this._isCollectingData=!1,this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0,this._metrics={},this._documents=[],this._collectors=[],this._redirectedHost=null,this._pollingIntervalHint=-1,this.config=e,this.context=t||new c,this._sender=new s(this.config),this._isEnabled=!1}return e.prototype.addCollector=function(e){this._collectors.push(e)},e.prototype.trackMetric=function(e){this._addMetric(e)},e.prototype.addDocument=function(e){var t=o.telemetryEnvelopeToQuickPulseDocument(e);t&&this._documents.push(t)},e.prototype.enable=function(e){e&&!this._isEnabled?(this._isEnabled=!0,this._goQuickPulse()):!e&&this._isEnabled&&(this._isEnabled=!1,clearTimeout(this._handle),this._handle=void 0)},e.prototype.enableCollectors=function(e){this._collectors.forEach((function(t){t.enable(e)}))},e.prototype._addMetric=function(e){var t=e.value,n=e.count||1,r=a.PerformanceToQuickPulseCounter[e.name];r&&(this._metrics[r]?(this._metrics[r].Value=(this._metrics[r].Value*this._metrics[r].Weight+t*n)/(this._metrics[r].Weight+n),this._metrics[r].Weight+=n):(this._metrics[r]=o.createQuickPulseMetric(e),this._metrics[r].Name=r,this._metrics[r].Weight=1))},e.prototype._resetQuickPulseBuffer=function(){delete this._metrics,this._metrics={},this._documents.length=0},e.prototype._goQuickPulse=function(){return n(this,void 0,void 0,(function(){var t,n,i,s,a=this;return r(this,(function(r){switch(r.label){case 0:return t=Object.keys(this._metrics).map((function(e){return a._metrics[e]})),n=o.createQuickPulseEnvelope(t,this._documents.slice(),this.config,this.context),this._resetQuickPulseBuffer(),this._isCollectingData?[4,this._post(n)]:[3,2];case 1:return r.sent(),[3,3];case 2:this._ping(n),r.label=3;case 3:return i=this._pollingIntervalHint>0?this._pollingIntervalHint:e.PING_INTERVAL,s=this._isCollectingData?e.POST_INTERVAL:i,this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,s=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(s=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),s),this._handle.unref(),[2]}}))}))},e.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},e.prototype._post=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return t.sent(),[2]}}))}))},e.prototype._quickPulseDone=function(e,t,n,r){null!=e?(this._isCollectingData!==e&&(i.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,n&&n.length>0&&(this._redirectedHost=n,i.info("Redirecting endpoint to: ",n)),r&&r>0&&(this._pollingIntervalHint=r),t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();t.exports=l})),Yr=S(((e,t)=>{"use strict";var n=Ar(),r=function(){function e(){}return e.parse=function(t){if(!t)return{};var r=t.split(e._FIELDS_SEPARATOR).reduce((function(t,n){var r=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===r.length){var i=r[0].toLowerCase(),o=r[1];t[i]=o}return t}),{});if(Object.keys(r).length>0){if(r.endpointsuffix){var i=r.location?r.location+".":"";r.ingestionendpoint=r.ingestionendpoint||"https://"+i+"dc."+r.endpointsuffix,r.liveendpoint=r.liveendpoint||"https://"+i+"live."+r.endpointsuffix}r.ingestionendpoint=r.ingestionendpoint||n.DEFAULT_BREEZE_ENDPOINT,r.liveendpoint=r.liveendpoint||n.DEFAULT_LIVEMETRICS_ENDPOINT}return r},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();t.exports=r})),Zr=S(((e,t)=>{"use strict";var r=un(),i=Yr(),o=(O(),Ar()),s=n(7310),a=function(){function e(t){var n=this;this.endpointBase=o.DEFAULT_BREEZE_ENDPOINT;var r=process.env[e.ENV_connectionString],a=i.parse(t),c=i.parse(r),l=!a.instrumentationkey&&Object.keys(a).length>0?null:t;this.instrumentationKey=a.instrumentationkey||l||c.instrumentationkey||e._getInstrumentationKey(),e._validateInstrumentationKey(this.instrumentationKey),this.endpointUrl=(a.ingestionendpoint||c.ingestionendpoint||this.endpointBase)+"/v2.1/track",this.maxBatchSize=250,this.maxBatchIntervalMs=15e3,this.disableAppInsights=!1,this.samplingPercentage=100,this.correlationIdRetryIntervalMs=3e4,this.correlationHeaderExcludedDomains=["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.setCorrelationId=function(e){return n.correlationId=e},this.proxyHttpUrl=process.env[e.ENV_http_proxy]||void 0,this.proxyHttpsUrl=process.env[e.ENV_https_proxy]||void 0,this.httpAgent=void 0,this.httpsAgent=void 0,this.profileQueryEndpoint=a.ingestionendpoint||c.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this.endpointBase,this._quickPulseHost=a.liveendpoint||c.liveendpoint||process.env[e.ENV_quickPulseHost]||o.DEFAULT_LIVEMETRICS_HOST,this._quickPulseHost.match(/^https?:\/\//)&&(this._quickPulseHost=s.parse(this._quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){r.cancelCorrelationIdQuery(this,this.setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=r.correlationIdPrefix,r.queryCorrelationId(this,this.setCorrelationId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickPulseHost",{get:function(){return this._quickPulseHost},set:function(e){this._quickPulseHost=e},enumerable:!1,configurable:!0}),e._getInstrumentationKey=function(){var t=process.env[e.ENV_iKey]||process.env[e.ENV_azurePrefix+e.ENV_iKey]||process.env[e.legacy_ENV_iKey]||process.env[e.ENV_azurePrefix+e.legacy_ENV_iKey];if(!t||""==t)throw new Error("Instrumentation key not found, pass the key in the config to this method or set the key in the environment variable APPINSIGHTS_INSTRUMENTATIONKEY before starting the server");return t},e._validateInstrumentationKey=function(e){return new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e.ENV_connectionString="APPLICATIONINSIGHTS_CONNECTION_STRING",e.ENV_nativeMetricsDisablers="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",e.ENV_nativeMetricsDisableAll="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",e.ENV_http_proxy="http_proxy",e.ENV_https_proxy="https_proxy",e}();t.exports=a})),ei=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCollectNativePerformance=void 0;var r=Zr(),i=Mr(),o=O(),s=function(){function e(t){this._disabledMetrics={},e.INSTANCE&&e.INSTANCE.dispose(),e.INSTANCE=this,this._client=t}return e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>=6},e.prototype.enable=function(t,r,i){var s=this;if(void 0===r&&(r={}),void 0===i&&(i=6e4),e.isNodeVersionCompatible()){if(null==e._metricsAvailable&&t&&!this._isInitialized)try{var a=n(9166);e._emitter=new a,e._metricsAvailable=!0,o.info("Native metrics module successfully loaded!")}catch{return void(e._metricsAvailable=!1)}this._isEnabled=t,this._disabledMetrics=r,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),this._isEnabled&&e._emitter?(e._emitter.enable(!0,i),this._handle||(this._handle=setInterval((function(){return s._trackNativeMetrics()}),i),this._handle.unref())):e._emitter&&(e._emitter.enable(!1),this._handle&&(clearInterval(this._handle),this._handle=void 0))}},e.prototype.dispose=function(){this.enable(!1)},e.parseEnabled=function(e){var n=process.env[r.ENV_nativeMetricsDisableAll],i=process.env[r.ENV_nativeMetricsDisablers];if(n)return{isEnabled:!1,disabledMetrics:{}};if(i){var o=i.split(","),s={};if(o.length>0)for(var a=0,c=o;a<c.length;a++)s[c[a]]=!0;return"object"==typeof e?{isEnabled:!0,disabledMetrics:t(t({},e),s)}:{isEnabled:e,disabledMetrics:s}}return"boolean"==typeof e?{isEnabled:e,disabledMetrics:{}}:{isEnabled:!0,disabledMetrics:e}},e.prototype._trackNativeMetrics=function(){var e=!0;"object"!=typeof this._isEnabled&&(e=this._isEnabled),e&&(this._trackGarbageCollection(),this._trackEventLoop(),this._trackHeapUsage())},e.prototype._trackGarbageCollection=function(){var t;if(!this._disabledMetrics.gc){var n=e._emitter.getGCData();for(var r in n){var o=n[r].metrics,s=r+" Garbage Collection Duration",a=Math.sqrt(o.sumSquares/o.count-Math.pow(o.total/o.count,2))||0;this._client.trackMetric({name:s,value:o.total,count:o.count,max:o.max,min:o.min,stdDev:a,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)})}}},e.prototype._trackEventLoop=function(){var t;if(!this._disabledMetrics.loop){var n=e._emitter.getLoopData().loopUsage;if(0!=n.count){var r=Math.sqrt(n.sumSquares/n.count-Math.pow(n.total/n.count,2))||0;this._client.trackMetric({name:"Event Loop CPU Time",value:n.total,count:n.count,min:n.min,max:n.max,stdDev:r,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)})}}},e.prototype._trackHeapUsage=function(){var e,t,n;if(!this._disabledMetrics.heap){var r=process.memoryUsage(),o=r.heapUsed,s=r.heapTotal,a=r.rss;this._client.trackMetric({name:"Memory Usage (Heap)",value:o,count:1,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,e)}),this._client.trackMetric({name:"Memory Total (Heap)",value:s,count:1,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)}),this._client.trackMetric({name:"Memory Usage (Non-Heap)",value:a-s,count:1,tagOverrides:(n={},n[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,n)})}},e}();e.AutoCollectNativePerformance=s})),ti=S(((e,t)=>{"use strict";var n=O(),r=function(){function e(e,t,n,r){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=n,this._sender=r}return e.prototype.setUseDiskRetryCaching=function(e,t,n){this._sender.setDiskRetryMode(e,t,n)},e.prototype.send=function(e){var t=this;if(!this._isDisabled()){if(!e)return void n.warn("Cannot send null/undefined telemetry");if(this._buffer.push(e),this._buffer.length>=this._getBatchSize())return void this.triggerSend(!1);!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout((function(){t._timeoutHandle=null,t.triggerSend(!1)}),this._getBatchIntervalMs()))}},e.prototype.triggerSend=function(e,t){var n=this._buffer.length<1;n||(e?(this._sender.saveOnCrash(this._buffer),"function"==typeof t&&t("data saved on crash")):this._sender.send(this._buffer,t)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&"function"==typeof t&&t("no data to send")},e}();t.exports=r})),ni=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.azureRoleEnvironmentTelemetryProcessor=void 0,e.azureRoleEnvironmentTelemetryProcessor=function(e,t){process.env.WEBSITE_SITE_NAME&&(e.tags[t.keys.cloudRole]=process.env.WEBSITE_SITE_NAME)}})),ri=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSamplingHashCode=e.samplingTelemetryProcessor=void 0;var t=nr();function n(e){var t=2147483647,n=5381;if(!e)return 0;for(;e.length<8;)e+=e;for(var r=0;r<e.length;r++)n=((n<<5)+n|0)+e.charCodeAt(r)|0;return(n=n<=-2147483648?t:Math.abs(n))/t*100}e.samplingTelemetryProcessor=function(e,r){var i=e.sampleRate;return!!(null==i||i>=100||e.data&&t.TelemetryType.Metric===t.baseTypeToTelemetryType(e.data.baseType))||(r.correlationContext&&r.correlationContext.operation?n(r.correlationContext.operation.id)<i:100*Math.random()<i)},e.getSamplingHashCode=n})),ii=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.performanceMetricsTelemetryProcessor=void 0;var t=Nr(),n=nr();e.performanceMetricsTelemetryProcessor=function(e,r){switch(r&&r.addDocument(e),e.data.baseType){case n.TelemetryTypeString.Exception:t.countException();break;case n.TelemetryTypeString.Request:var i=e.data.baseData;t.countRequest(i.duration,i.success);break;case n.TelemetryTypeString.Dependency:var o=e.data.baseData;t.countDependency(o.duration,o.success)}return!0}})),oi=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.preAggregatedMetricsTelemetryProcessor=void 0;var n=nr(),r=qr(),i=nr();e.preAggregatedMetricsTelemetryProcessor=function(e,o){if(r.isEnabled())switch(e.data.baseType){case i.TelemetryTypeString.Exception:var s=e.data.baseData;s.properties=t(t({},s.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Exceptions', Ver:'1.1')"});var a={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole]};r.countException(a);break;case i.TelemetryTypeString.Trace:var c=e.data.baseData;c.properties=t(t({},c.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Traces', Ver:'1.1')"});var l={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],traceSeverityLevel:n.SeverityLevel[c.severity]};r.countTrace(l);break;case i.TelemetryTypeString.Request:var u=e.data.baseData;u.properties=t(t({},u.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"});var d={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],operationSynthetic:e.tags[o.keys.operationSyntheticSource],requestSuccess:u.success,requestResultCode:u.responseCode};r.countRequest(u.duration,d);break;case i.TelemetryTypeString.Dependency:var p=e.data.baseData;p.properties=t(t({},p.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Dependencies', Ver:'1.1')"});var h={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],operationSynthetic:e.tags[o.keys.operationSyntheticSource],dependencySuccess:p.success,dependencyType:p.type,dependencyTarget:p.target,dependencyResultCode:p.resultCode};r.countDependency(p.duration,h)}return!0}})),si=S((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ni(),e),n(ri(),e),n(ii(),e),n(oi(),e)})),ai=S(((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=n(7147),s=n(2037),a=n(1017),c=n(9796),l=n(2081),u=O(),d=Vr(),p=ln(),h=function(){function e(t,n,r){if(this._redirectedHost=null,this._config=t,this._onSuccess=n,this._onError=r,this._enableDiskRetryMode=!1,this._resendInterval=e.WAIT_BETWEEN_RESEND,this._maxBytesOnDisk=e.MAX_BYTES_ON_DISK,this._numConsecutiveFailures=0,this._numConsecutiveRedirects=0,this._resendTimer=null,this._fileCleanupTimer=null,this._tempDir=a.join(s.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey),!e.OS_PROVIDES_FILE_PROTECTION)if(e.USE_ICACLS){try{e.OS_PROVIDES_FILE_PROTECTION=o.existsSync(e.ICACLS_PATH)}catch{}e.OS_PROVIDES_FILE_PROTECTION||u.warn(e.TAG,"Could not find ICACLS in expected location! This is necessary to use disk retry mode on Windows.")}else e.OS_PROVIDES_FILE_PROTECTION=!0}return e.prototype.setDiskRetryMode=function(t,n,r){var i=this;this._enableDiskRetryMode=e.OS_PROVIDES_FILE_PROTECTION&&t,"number"==typeof n&&n>=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,u.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref()):this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer)},e.prototype.send=function(t,n){return r(this,void 0,void 0,(function(){var r,o,s,a,l=this;return i(this,(function(i){return t&&(r=this._redirectedHost||this._config.endpointUrl,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},s="",t.forEach((function(e){var t=l._stringify(e);"string"==typeof t&&(s+=t+"\n")})),s.length>0&&(s=s.substring(0,s.length-1)),a=Buffer.from?Buffer.from(s):new Buffer(s),c.gzip(a,(function(i,s){var c=s;i?(u.warn(i),c=a,o.headers["Content-Length"]=a.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=s.length.toString()),u.info(e.TAG,o),o[d.disableCollectionRequestOption]=!0;var h=p.makeRequest(l._config,r,o,(function(r){r.setEncoding("utf-8");var i="";r.on("data",(function(e){i+=e})),r.on("end",(function(){if(l._numConsecutiveFailures=0,l._enableDiskRetryMode)if(200===r.statusCode)l._resendTimer||(l._resendTimer=setTimeout((function(){l._resendTimer=null,l._sendFirstFileOnDisk()}),l._resendInterval),l._resendTimer.unref());else if(l._isRetriable(r.statusCode))try{var o=JSON.parse(i),s=[];o.errors.forEach((function(e){l._isRetriable(e.statusCode)&&s.push(t[e.index])})),s.length>0&&l._storeToDisk(s)}catch{l._storeToDisk(t)}if(307===r.statusCode||308===r.statusCode)if(l._numConsecutiveRedirects++,l._numConsecutiveRedirects<10){var a=r.headers.location?r.headers.location.toString():null;a&&(l._redirectedHost=a,l.send(t,n))}else"function"==typeof n&&n("Error sending telemetry because of circular redirects.");else l._numConsecutiveRedirects=0,"function"==typeof n&&n(i),u.info(e.TAG,i),"function"==typeof l._onSuccess&&l._onSuccess(i)}))}));h.on("error",(function(r){if(l._numConsecutiveFailures++,!l._enableDiskRetryMode||l._numConsecutiveFailures>0&&l._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var i="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";l._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+l._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),u.warn(e.TAG,i,p.dumpObj(r))}else i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",u.info(e.TAG,i,p.dumpObj(r));l._onErrorHelper(r),"function"==typeof n&&(r&&n(p.dumpObj(r)),n("Error sending telemetry")),l._enableDiskRetryMode&&l._storeToDisk(t)})),h.write(c),h.end()}))),[2]}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(this._stringify(e))},e.prototype._isRetriable=function(e){return 206===e||408===e||429===e||439===e||500===e||503===e},e.prototype._runICACLS=function(t,n){var r=l.spawn(e.ICACLS_PATH,t,{windowsHide:!0});r.on("error",(function(e){return n(e)})),r.on("close",(function(e,t){return n(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))}))},e.prototype._runICACLSSync=function(t){if(!l.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var n=l.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(n.error)throw n.error;if(0!==n.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var n=l.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),r="";n.stdout.on("data",(function(e){return r+=e})),n.on("error",(function(e){return t(e,null)})),n.on("close",(function(n,i){return e.ACL_IDENTITY=r&&r.trim(),t(0===n?null:new Error("Getting ACL identity did not succeed (PS returned code "+n+")"),e.ACL_IDENTITY)}))},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(l.spawnSync){var t=l.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,n){var r=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?n(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity((function(i,o){if(i)return e.ACLED_DIRECTORIES[t]=!1,n(i);r._runICACLS(r._getACLArguments(t,o),(function(r){return e.ACLED_DIRECTORIES[t]=!r,n(r)}))}))):n(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var n=this;o.lstat(e,(function(r,i){r&&"ENOENT"===r.code?o.mkdir(e,(function(r){r&&"EEXIST"!==r.code?t(r):n._applyACLRules(e,t)})):!r&&i.isDirectory()?n._applyACLRules(e,t):t(r||new Error("Path existed but was not a directory"))}))},e.prototype._getShallowDirectorySize=function(e,t){o.readdir(e,(function(n,r){if(n)return t(n,-1);var i=null,s=0,c=0;if(0!==r.length)for(var l=0;l<r.length;l++)o.stat(a.join(e,r[l]),(function(e,n){c++,e?i=e:n.isFile()&&(s+=n.size),c===r.length&&t(i,i?-1:s)}));else t(null,0)}))},e.prototype._getShallowDirectorySizeSync=function(e){for(var t=o.readdirSync(e),n=0,r=0;r<t.length;r++)n+=o.statSync(a.join(e,t[r])).size;return n},e.prototype._storeToDisk=function(t){var n=this;u.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),this._confirmDirExists(this._tempDir,(function(r){if(r)return u.warn(e.TAG,"Error while checking/creating directory: "+(r&&r.message)),void n._onErrorHelper(r);n._getShallowDirectorySize(n._tempDir,(function(r,i){if(r||i<0)return u.warn(e.TAG,"Error while checking directory size: "+(r&&r.message)),void n._onErrorHelper(r);if(i>n._maxBytesOnDisk)u.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+i);else{var s=(new Date).getTime()+".ai.json",c=a.join(n._tempDir,s);u.info(e.TAG,"saving data to disk at: "+c),o.writeFile(c,n._stringify(t),{mode:384},(function(e){return n._onErrorHelper(e)}))}}))}))},e.prototype._storeToDiskSync=function(t){try{u.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),o.existsSync(this._tempDir)||o.mkdirSync(this._tempDir),this._applyACLRulesSync(this._tempDir);var n=this._getShallowDirectorySizeSync(this._tempDir);if(n>this._maxBytesOnDisk)return void u.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+n);var r=(new Date).getTime()+".ai.json",i=a.join(this._tempDir,r);u.info(e.TAG,"saving data before crash to disk at: "+i),o.writeFileSync(i,t,{mode:384})}catch(t){u.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var e=this;o.exists(this._tempDir,(function(t){t&&o.readdir(e._tempDir,(function(t,n){if(t)e._onErrorHelper(t);else if((n=n.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0){var r=n[0],i=a.join(e._tempDir,r);o.readFile(i,(function(t,n){t?e._onErrorHelper(t):o.unlink(i,(function(t){if(t)e._onErrorHelper(t);else try{var r=JSON.parse(n.toString());e.send(r)}catch(e){u.warn("Failed to read persisted file",e)}}))}))}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){u.warn("Failed to serialize payload",t,e)}},e.prototype._fileCleanupTask=function(){var t=this;o.exists(this._tempDir,(function(n){n&&o.readdir(t._tempDir,(function(n,r){n?t._onErrorHelper(n):(r=r.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0&&r.forEach((function(n){var r=new Date(parseInt(n.split(".ai.json")[0]));if(new Date(+new Date-e.FILE_RETEMPTION_PERIOD)>r){var i=a.join(t._tempDir,n);o.unlink(i,(function(e){e&&t._onErrorHelper(e)}))}}))}))}))},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===s.type(),e}();t.exports=h})),ci=S(((e,t)=>{"use strict";var n=nr(),r=ln(),i=Rr(),o=function(){function e(){}return e.createEnvelope=function(t,i,o,s,a){var c=null;switch(i){case n.TelemetryType.Trace:c=e.createTraceData(t);break;case n.TelemetryType.Dependency:c=e.createDependencyData(t);break;case n.TelemetryType.Event:c=e.createEventData(t);break;case n.TelemetryType.Exception:c=e.createExceptionData(t);break;case n.TelemetryType.Request:c=e.createRequestData(t);break;case n.TelemetryType.Metric:c=e.createMetricData(t);break;case n.TelemetryType.Availability:c=e.createAvailabilityData(t);break;case n.TelemetryType.PageView:c=e.createPageViewData(t)}if(o&&n.domainSupportsProperties(c.baseData)){if(c&&c.baseData)if(c.baseData.properties)for(var l in o)c.baseData.properties[l]||(c.baseData.properties[l]=o[l]);else c.baseData.properties=o;c.baseData.properties=r.validateStringMap(c.baseData.properties)}var u=a&&a.instrumentationKey||"",d=new n.Envelope;return d.data=c,d.iKey=u,d.name="Microsoft.ApplicationInsights."+u.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(s,t.tagOverrides),d.time=(new Date).toISOString(),d.ver=1,d.sampleRate=a?a.samplingPercentage:100,i===n.TelemetryType.Metric&&(d.sampleRate=100),d},e.createTraceData=function(e){var t=new n.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Information:t.severityLevel=e.severity;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Trace),r.baseData=t,r},e.createDependencyData=function(e){var t=new n.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=r.w3cTraceId();var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Dependency),i.baseData=t,i},e.createEventData=function(e){var t=new n.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Event),r.baseData=t,r},e.createExceptionData=function(e){var t=new n.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var i=e.exception.stack,o=new n.ExceptionDetails;o.message=e.exception.message,o.typeName=e.exception.name,o.parsedStack=this.parseStack(i),o.hasFullStack=r.isArray(o.parsedStack)&&o.parsedStack.length>0,t.exceptions.push(o);var s=new n.Data;return s.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Exception),s.baseData=t,s},e.createRequestData=function(e){var t=new n.RequestData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=r.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Request),i.baseData=t,i},e.createMetricData=function(e){var t=new n.MetricData;t.metrics=[];var r=new n.DataPoint;r.count=isNaN(e.count)?1:e.count,r.kind=n.DataPointType.Aggregation,r.max=isNaN(e.max)?e.value:e.max,r.min=isNaN(e.min)?e.value:e.min,r.name=e.name,r.stdDev=isNaN(e.stdDev)?0:e.stdDev,r.value=e.value,t.metrics.push(r),t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new n.AvailabilityData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Availability),i.baseData=t,i},e.createPageViewData=function(e){var t=new n.PageViewData;t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.PageView),i.baseData=t,i},e.getTags=function(e,t){var n=i.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var o in e.tags)r[o]=e.tags[o];if(t)for(var o in t)r[o]=t[o];return n&&(r[e.keys.operationId]=r[e.keys.operationId]||n.operation.id,r[e.keys.operationName]=r[e.keys.operationName]||n.operation.name,r[e.keys.operationParentId]=r[e.keys.operationParentId]||n.operation.parentId),r},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,o=0;o<=n.length;o++){var a=n[o];if(s.regex.test(a)){var c=new s(n[o],r++);i+=c.sizeInBytes,t.push(c)}}if(i>32768)for(var l=0,u=t.length-1,d=0,p=l,h=u;l<u;){if((d+=t[l].sizeInBytes+t[u].sizeInBytes)>32768){var f=h-p+1;t.splice(p,f);break}p=l,h=u,l++,u--}}return t},e}(),s=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="<no_method>",this.assembly=r.trim(t);var i=t.match(e.regex);i&&i.length>=5&&(this.method=r.trim(i[2])||this.method,this.fileName=r.trim(i[4])||"<no_filename>",this.line=parseInt(i[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();t.exports=o})),li=S(((e,t)=>{"use strict";var r=n(7310),i=Zr(),o=Mr(),s=nr(),a=ti(),c=si(),l=Rr(),u=ai(),d=ln(),p=O(),h=ci(),f=function(){function e(e){this._telemetryProcessors=[],this._enableAzureProperties=!1;var t=new i(e);this.config=t,this.context=new o,this.commonProperties={};var n=new u(this.config);this.channel=new a((function(){return t.disableAppInsights}),(function(){return t.maxBatchSize}),(function(){return t.maxBatchIntervalMs}),n)}return e.prototype.trackAvailability=function(e){this.track(e,s.TelemetryType.Availability)},e.prototype.trackPageView=function(e){this.track(e,s.TelemetryType.PageView)},e.prototype.trackTrace=function(e){this.track(e,s.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,s.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!d.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,s.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,s.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,s.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=r.parse(e.data).host),this.track(e,s.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&s.telemetryTypeToBaseType(t)){var n=h.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString()),this._enableAzureProperties&&c.azureRoleEnvironmentTelemetryProcessor(n,this.context);var r=this.runTelemetryProcessors(n,e.contextObjects);r=r&&c.samplingTelemetryProcessor(n,{correlationContext:l.CorrelationContextManager.getCurrentContext()}),c.preAggregatedMetricsTelemetryProcessor(n,this.context),r&&(c.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),this.channel.send(n))}else p.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.setAutoPopulateAzureProperties=function(e){this._enableAzureProperties=e},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var n=!0,r=this._telemetryProcessors.length;if(0===r)return n;(t=t||{}).correlationContext=l.CorrelationContextManager.getCurrentContext();for(var i=0;i<r;++i)try{var o=this._telemetryProcessors[i];if(o&&!1===o.apply(null,[e,t])){n=!1;break}}catch(t){n=!0,p.warn("One of telemetry processors failed, telemetry item will be sent.",t,e)}return n&&(e&&e.tags&&(e.tags=d.validateStringMap(e.tags)),e&&e.data&&e.data.baseData&&e.data.baseData.properties&&(e.data.baseData.properties=d.validateStringMap(e.data.baseData.properties))),n},e}();t.exports=f})),ui=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=li(),o=$r(),s=Vr(),a=O(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?o.trackRequestSync(this,e):a.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&a.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?o.trackRequest(this,e):a.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?s.trackRequest(this,e):a.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(i);t.exports=c})),di=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),pi=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.Configuration=e.wrapWithCorrelationContext=e.startOperation=e.getCorrelationContext=e.start=e.setup=e.liveMetricsClient=e.defaultClient=e.DistributedTracingModes=void 0;var t,n,r=Rr(),i=Pr(),o=Dr(),s=Nr(),a=qr(),c=Wr(),l=Vr(),u=$r(),d=un(),p=O(),h=Xr(),f=ei();e.TelemetryClient=ui(),e.Contracts=nr(),e.azureFunctionsTypes=di(),(n=t=e.DistributedTracingModes||(e.DistributedTracingModes={}))[n.AI=0]="AI",n[n.AI_AND_W3C=1]="AI_AND_W3C";var m,g,y,v,b,S,w,T,_,E,C,R=!0,x=!1,I=!0,P=!0,D=!0,A=!1,N=!0,k=!0,j=!0,q=!0,M=!1,L=!0,F=void 0,U=void 0,B=!1;function z(){return e.defaultClient?(B=!0,y.enable(R,x),v.enable(I),b.enable(P),S.enable(D),w.enable(A,e.defaultClient.config),T.enable(L,g),_.useAutoCorrelation(q,m),_.enable(N),E.enable(k),e.liveMetricsClient&&M&&e.liveMetricsClient.enable(M)):p.warn("Start cannot be called before setup"),H}e.setup=function(t){return e.defaultClient?p.info("The default client is already setup"):(e.defaultClient=new e.TelemetryClient(t),y=new i(e.defaultClient),v=new o(e.defaultClient),b=new s(e.defaultClient),S=new a(e.defaultClient),w=new c(e.defaultClient),_=new u(e.defaultClient),E=new l(e.defaultClient),T||(T=new f.AutoCollectNativePerformance(e.defaultClient))),e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(j,F,U),H},e.start=z,e.getCorrelationContext=function(){return q?r.CorrelationContextManager.getCurrentContext():null},e.startOperation=function(e,t){return r.CorrelationContextManager.startOperation(e,t)},e.wrapWithCorrelationContext=function(e,t){return r.CorrelationContextManager.wrapCallback(e,t)};var H=function(){function n(){}return n.setDistributedTracingMode=function(e){return d.w3cEnabled=e===t.AI_AND_W3C,n},n.setAutoCollectConsole=function(e,t){return void 0===t&&(t=!1),R=e,x=t,B&&y.enable(e,t),n},n.setAutoCollectExceptions=function(e){return I=e,B&&v.enable(e),n},n.setAutoCollectPerformance=function(e,t){void 0===t&&(t=!0),P=e;var r=f.AutoCollectNativePerformance.parseEnabled(t);return L=r.isEnabled,g=r.disabledMetrics,B&&(b.enable(e),T.enable(r.isEnabled,r.disabledMetrics)),n},n.setAutoCollectPreAggregatedMetrics=function(e){return D=e,B&&S.enable(e),n},n.setAutoCollectHeartbeat=function(t){return A=t,B&&w.enable(t,e.defaultClient.config),n},n.setAutoCollectRequests=function(e){return N=e,B&&_.enable(e),n},n.setAutoCollectDependencies=function(e){return k=e,B&&E.enable(e),n},n.setAutoDependencyCorrelation=function(e,t){return q=e,m=t,B&&_.useAutoCorrelation(e,t),n},n.setUseDiskRetryCaching=function(t,r,i){return j=t,F=r,U=i,e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(t,r,i),n},n.setInternalLogging=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!0),p.enableDebug=e,p.disableWarnings=!t,n},n.setSendLiveMetrics=function(t){return void 0===t&&(t=!1),e.defaultClient?(!e.liveMetricsClient&&t?(e.liveMetricsClient=new h(e.defaultClient.config,null),C=new s(e.liveMetricsClient,1e3,!0),e.liveMetricsClient.addCollector(C),e.defaultClient.quickPulseClient=e.liveMetricsClient):e.liveMetricsClient&&e.liveMetricsClient.enable(t),M=t,n):(p.warn("Live metrics client cannot be setup without the default client"),n)},n.start=z,n}();e.Configuration=H,e.dispose=function(){d.w3cEnabled=!0,e.defaultClient=null,B=!1,y&&y.dispose(),v&&v.dispose(),b&&b.dispose(),S&&S.dispose(),w&&w.dispose(),T&&T.dispose(),_&&_.dispose(),E&&E.dispose(),e.liveMetricsClient&&(e.liveMetricsClient.enable(!1),M=!1,e.liveMetricsClient=void 0)}})),hi={};((e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})})(hi,{default:()=>bi}),e.exports=(s=hi,w(c({},"__esModule",{value:!0}),s));var fi=T(n(2037)),mi=T(n(9496)),gi=T(n(5687)),yi=class{constructor(e){this.vscodeAPI=e}getTelemetryLevel(){try{let e=this.vscodeAPI.env.telemetryConfiguration;return e.isUsageEnabled&&e.isErrorsEnabled&&e.isCrashEnabled?"on":e.isErrorsEnabled&&e.isCrashEnabled?"error":"off"}catch{return void 0!==this.vscodeAPI.env.isTelemetryEnabled?this.vscodeAPI.env.isTelemetryEnabled?"on":"off":this.vscodeAPI.workspace.getConfiguration("telemetry").get("enableTelemetry")?"on":"off"}}static applyReplacements(e,t){for(let n of Object.keys(e))for(let r of t)r.lookup.test(n)&&(void 0!==r.replacementString?e[n]=r.replacementString:delete e[n])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getInstance(e){return yi._instance||(yi._instance=new yi(e)),yi._instance}},vi=class{constructor(e,t,n,r,i,o){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=n,this.osShim=r,this.vscodeAPI=i,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!o,this.updateUserOptStatus(),void 0!==i.env.onDidChangeTelemetryEnabled?(this.disposables.push(i.env.onDidChangeTelemetryEnabled((()=>this.updateUserOptStatus()))),this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))):this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))}updateUserOptStatus(){let e=yi.getInstance(this.vscodeAPI).getTelemetryLevel();this.userOptIn="on"===e,this.errorOptIn="error"===e||this.userOptIn,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach((n=>{0===e.indexOf(`${n}`)&&(t=n)})),t}get extension(){return void 0===this._extension&&(this._extension=this.vscodeAPI.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let n={};for(let r in e)n[r]=t(r,e[r]);return n}shouldSendErrorTelemetry(){return!(!1===this.errorOptIn||this.firstParty&&this.vscodeAPI.env.remoteName&&"other"===this.cleanRemoteName(this.vscodeAPI.env.remoteName))}getCommonProperties(){let e={};if(e["common.os"]=this.osShim.platform,e["common.nodeArch"]=this.osShim.architecture,e["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,this.vscodeAPI&&this.vscodeAPI.env){switch(e["common.vscodemachineid"]=this.vscodeAPI.env.machineId,e["common.vscodesessionid"]=this.vscodeAPI.env.sessionId,e["common.vscodeversion"]=this.vscodeAPI.version,e["common.isnewappinstall"]=this.vscodeAPI.env.isNewAppInstall?this.vscodeAPI.env.isNewAppInstall.toString():"false",e["common.product"]=this.vscodeAPI.env.appHost,this.vscodeAPI.env.uiKind){case this.vscodeAPI.UIKind.Web:e["common.uikind"]="web";break;case this.vscodeAPI.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(this.vscodeAPI.env.remoteName)}return e}anonymizeFilePaths(e,t){let n;if(null==e)return"";let r=[];""!==this.vscodeAPI.env.appRoot&&r.push(new RegExp(this.vscodeAPI.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let i=e;if(t){let t=[];for(let i of r)for(;(n=i.exec(e))&&n;)t.push([n.index,i.lastIndex]);let o=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,a=0;for(i="";(n=s.exec(e))&&n;)n[0]&&!o.test(n[0])&&t.every((([e,t])=>n.index<e||n.index>=t))&&(i+=e.substring(a,n.index)+"<REDACTED: user-file-path>",a=s.lastIndex);a<e.length&&(i+=e.substr(a))}for(let e of r)i=i.replace(e,"");return i}removePropertiesWithPossibleUserInfo(e){if("object"!=typeof e)return;let t={};for(let n of Object.keys(e)){let r=e[n];if(!r)continue;let i=/@[a-zA-Z0-9-.]+/,o=/xox[pbaors]-[a-zA-Z0-9]+-[a-zA-Z0-9-]+?/;/(key|token|sig|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/.test(r.toLowerCase())?t[n]="<REDACTED: secret>":i.test(r)?t[n]="<REDACTED: email>":o.test(r)?t[n]="<REDACTED: token>":t[n]=r}return t}get telemetryLevel(){switch(yi.getInstance(this.vscodeAPI).getTelemetryLevel()){case"on":return"all";case"error":return"error";case"off":return"off"}}internalSendTelemetryEvent(e,t,n,r,i){if((this.userOptIn||i)&&""!==e){if(t=v(v({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!0,!1)}sendRawTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!1,!1)}sendDangerousTelemetryEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryEvent(e,t,n,r,!0)}internalSendTelemetryErrorEvent(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&""!==e){if(t=v(v({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryErrorEvent(e,t,n){this.internalSendTelemetryErrorEvent(e,t,n,!0,!1)}sendDangerousTelemetryErrorEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryErrorEvent(e,t,n,r,!0)}internalSendTelemetryException(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&e){if(t=v(v({},t),this.getCommonProperties()),r){let n=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));e.stack&&(e.stack=this.anonymizeFilePaths(e.stack,this.firstParty)),t=this.removePropertiesWithPossibleUserInfo(n)}t=t??{},n=n??{},this.telemetryAppender.logException(e,{properties:t,measurements:n})}}sendTelemetryException(e,t,n){this.internalSendTelemetryException(e,t,n,!0,!1)}sendDangerousTelemetryException(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryException(e,t,n,r,!0)}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map((e=>e.dispose())))}},bi=class extends vi{constructor(e,t,n,r,i){let o=e=>(async(e,t)=>{let n;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";let t=await Promise.resolve().then((()=>T(pi())));t.defaultClient?(n=new t.TelemetryClient(e),n.channel.setUseDiskRetryCaching(!0)):(t.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),n=t.defaultClient),mi&&mi.env&&(n.context.tags[n.context.keys.userId]=mi.env.machineId,n.context.tags[n.context.keys.sessionId]=mi.env.sessionId,n.context.tags[n.context.keys.cloudRole]=mi.env.appName,n.context.tags[n.context.keys.cloudRoleInstance]=mi.env.appName),e&&0===e.indexOf("AIF-")&&(n.config.endpointUrl="https://mobile.events.data.microsoft.com/collect/v1")}catch(e){return Promise.reject("Failed to initialize app insights!\n"+e.message)}return null!=t&&t.length&&function(e,t){e.addTelemetryProcessor((e=>(Array.isArray(e.tags)?e.tags.forEach((e=>yi.applyReplacements(e,t))):e.tags&&yi.applyReplacements(e.tags,t),e.data.baseData&&yi.applyReplacements(e.data.baseData,t),!0)))}(n,t),{logEvent:(e,t)=>{try{null==n||n.trackEvent({name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{try{null==n||n.trackException({exception:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log exception to app insights!\n"+e.message)}},flush:async()=>{try{null==n||n.flush()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,i);yi.shouldUseOneDataSystemSDK(n)&&(o=e=>(async(e,t,n)=>{let r=await(async(e,t,n)=>{let r=await Promise.resolve().then((()=>T(R()))),i=await Promise.resolve().then((()=>T(I()))),o=new r.AppInsightsCore,s=new i.PostChannel,a={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[s]]};if(n){a.extensionConfig={};let e={alwaysUseXhrOverride:!0,httpXHROverride:n};a.extensionConfig[s.identifier]=e}let c=t.workspace.getConfiguration("telemetry").get("internalTesting");return o.initialize(a,[]),o.addTelemetryInitializer((e=>{!c||(e.ext=e.ext??{},e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)})),o})(e,t,n);return{logEvent:(e,t)=>{try{null==r||r.track({name:e,baseData:{name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{throw new Error("1DS SDK does not support logging exceptions, please use logEvent for exception tracking")},flush:async()=>{try{null==r||r.unload()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,mi,{sendPOST:(e,t)=>{let n={method:"POST",headers:b(v({},e.headers),{"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)})};try{let r=gi.request(e.urlString,n,(e=>{e.on("data",(function(n){t(e.statusCode??200,e.headers,n.toString())})),e.on("error",(function(){t(0,{})}))}));r.write(e.data),r.end()}catch{t(0,{})}}}));let s=new class{constructor(e,t){this._instantiationStatus=0,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):2!==this._instantiationStatus&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):2!==this._instantiationStatus&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await this._telemetryClient.flush(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach((({eventName:e,data:t})=>this.logEvent(e,t))),this._eventQueue=[],this._exceptionQueue.forEach((({exception:e,data:t})=>this.logException(e,t))),this._exceptionQueue=[]}instantiateAppender(){0===this._instantiationStatus&&(this._instantiationStatus=1,this._clientFactory(this._key).then((e=>{this._telemetryClient=e,this._instantiationStatus=2,this._flushQueues()})).catch((e=>{console.error(e),this._instantiationStatus=2})))}}(n,o);n&&(0===n.indexOf("AIF-")||yi.shouldUseOneDataSystemSDK(n))&&(r=!0),super(e,t,s,{release:fi.release(),platform:fi.platform(),architecture:fi.arch()},mi,r)}}},5029:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=5029,e.exports=t},3437:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=3437,e.exports=t},8054:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(2361),o=r(n(5158)),s=r(n(6304)),a=o.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function l(e,t){return new l.Agent(e,t)}!function(e){class t extends i.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,i=null;const o=n.timeout||this.timeout,l=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},u=()=>{i=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",l(e)},d=e=>{r||(null!==i&&(clearTimeout(i),i=null),l(e))},p=t=>{if(r)return;if(null!=i&&(clearTimeout(i),i=null),o=t,Boolean(o)&&"function"==typeof o.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var o;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);l(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(i=setTimeout(u,o)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(p,d)}catch(e){Promise.reject(e).catch(d)}}else l(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(l||(l={})),e.exports=l},6304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,i)=>{e.call(this,t,n,((e,t)=>{e?i(e):r(t)}))}))}}},2047:(e,t,n)=>{var r=n(9353);e.exports=function(e,t){return new Promise((function(n,i){var o=t||{};"randomize"in o||(o.randomize=!0);var s=r.operation(o);function a(e){i(e||new Error("Aborted"))}function c(e,t){e.bail?a(e):s.retry(e)?o.onRetry&&o.onRetry(e,t):i(s.mainError())}s.attempt((function(t){var r;try{r=e(a,t)}catch(e){return void c(e,t)}Promise.resolve(r).then(n).catch((function(e){c(e,t)}))}))}))}},5623:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,s,a,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){for(r=[],o=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),l]:((i=r.pop())<o&&(o=i,s=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[o,s])}return a}e.exports=t,t.range=r},3644:(e,t,n)=>{var r=n(1048),i=n(5623);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),y(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(l)}(e),!0).map(d)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function d(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(l).join(".")}function p(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,s=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var c=p(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function h(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function g(e,t){return e>=t}function y(e,t){var n=[],o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),d=c||l,v=o.body.indexOf(",")>=0;if(!d&&!v)return o.post.match(/,.*\}/)?y(e=o.pre+"{"+o.body+a+o.post):[e];if(d)s=o.body.split(/\.\./);else if(1===(s=p(o.body)).length&&1===(s=y(s[0],!1).map(h)).length)return(w=o.post.length?y(o.post,!1):[""]).map((function(e){return o.pre+s[0]+e}));var b,S=o.pre,w=o.post.length?y(o.post,!1):[""];if(d){var T=u(s[0]),_=u(s[1]),E=Math.max(s[0].length,s[1].length),C=3==s.length?Math.abs(u(s[2])):1,R=m;_<T&&(C*=-1,R=g);var x=s.some(f);b=[];for(var I=T;R(I,_);I+=C){var O;if(l)"\\"===(O=String.fromCharCode(I))&&(O="");else if(O=String(I),x){var P=E-O.length;if(P>0){var D=new Array(P+1).join("0");O=I<0?"-"+D+O.slice(1):D+O}}b.push(O)}}else b=r(s,(function(e){return y(e,!1)}));for(var A=0;A<b.length;A++)for(var N=0;N<w.length;N++){var k=S+b[A]+w[N];(!t||d||k)&&n.push(k)}return n}},2779:(e,t,n)=>{var r=n(4300).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function o(e){if(r.isBuffer(e))return e;var t="function"==typeof r.alloc&&"function"==typeof r.from;if("number"==typeof e)return t?r.alloc(e):new r(e);if("string"==typeof e)return t?r.from(e):new r(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function s(e,t){e=o(e),r.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=-1^~~t,s=0;s<e.length;s++)n=i[255&(n^e[s])]^n>>>8;return-1^n}function a(){return e=s.apply(null,arguments),(t=o(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),a.signed=function(){return s.apply(null,arguments)},a.unsigned=function(){return s.apply(null,arguments)>>>0},e.exports=a},9019:(e,t,n)=>{"use strict";const r=n(7147),i=n(1017),o=r.lchown?"lchown":"chown",s=r.lchownSync?"lchownSync":"chownSync",a=r.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),c=(e,t,n)=>{try{return r[s](e,t,n)}catch(e){if("ENOENT"!==e.code)throw e}},l=a?(e,t,n,i)=>o=>{o&&"EISDIR"===o.code?r.chown(e,t,n,i):i(o)}:(e,t,n,r)=>r,u=a?(e,t,n)=>{try{return c(e,t,n)}catch(i){if("EISDIR"!==i.code)throw i;((e,t,n)=>{try{return r.chownSync(e,t,n)}catch(e){if("ENOENT"!==e.code)throw e}})(e,t,n)}}:(e,t,n)=>c(e,t,n),d=process.version;let p=(e,t,n)=>r.readdir(e,t,n);/^v4\./.test(d)&&(p=(e,t,n)=>r.readdir(e,n));const h=(e,t,n,i)=>{r[o](e,t,n,l(e,t,n,(e=>{i(e&&"ENOENT"!==e.code?e:null)})))},f=(e,t,n,o,s)=>{if("string"==typeof t)return r.lstat(i.resolve(e,t),((r,i)=>{if(r)return s("ENOENT"!==r.code?r:null);i.name=t,f(e,i,n,o,s)}));if(t.isDirectory())m(i.resolve(e,t.name),n,o,(r=>{if(r)return s(r);const a=i.resolve(e,t.name);h(a,n,o,s)}));else{const r=i.resolve(e,t.name);h(r,n,o,s)}},m=(e,t,n,r)=>{p(e,{withFileTypes:!0},((i,o)=>{if(i){if("ENOENT"===i.code)return r();if("ENOTDIR"!==i.code&&"ENOTSUP"!==i.code)return r(i)}if(i||!o.length)return h(e,t,n,r);let s=o.length,a=null;const c=i=>{if(!a)return i?r(a=i):0==--s?h(e,t,n,r):void 0};o.forEach((r=>f(e,r,t,n,c)))}))},g=(e,t,n)=>{let o;try{o=((e,t)=>r.readdirSync(e,{withFileTypes:!0}))(e)}catch(r){if("ENOENT"===r.code)return;if("ENOTDIR"===r.code||"ENOTSUP"===r.code)return u(e,t,n);throw r}return o&&o.length&&o.forEach((o=>((e,t,n,o)=>{if("string"==typeof t)try{const n=r.lstatSync(i.resolve(e,t));n.name=t,t=n}catch(e){if("ENOENT"===e.code)return;throw e}t.isDirectory()&&g(i.resolve(e,t.name),n,o),u(i.resolve(e,t.name),n,o)})(e,o,t,n))),u(e,t,n)};e.exports=m,m.sync=g},1048:e=>{e.exports=function(e,n){for(var r=[],i=0;i<e.length;i++){var o=n(e[i],i);t(o)?r.push.apply(r,o):r.push(o)}return r};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},9293:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.c2p=void 0;const r=n(9072);t.c2p={asConnectionParams:function(e,t){return{ownerUri:e,connection:{options:t.options}}},asExecutionPlanOptions:function(e){return{includeEstimatedExecutionPlanXml:e?e.displayEstimatedQueryPlan:void 0,includeActualExecutionPlanXml:e?e.displayActualQueryPlan:void 0}},asScriptingParams:function(e,t,n,i){let o={type:n.metadataTypeName,schema:n.schema,name:n.name,parentName:n.parentName,parentTypeName:n.parentTypeName},s=i.targetDatabaseEngineEdition,a=i.targetDatabaseEngineType,c=i.scriptCompatibilityOption,l={scriptCreateDrop:t===r.ScriptOperation.Delete?"ScriptDrop":t===r.ScriptOperation.Select?"ScriptSelect":"ScriptCreate",typeOfDataToScript:"SchemaOnly",scriptStatistics:"ScriptStatsNone",targetDatabaseEngineEdition:s||"SqlServerEnterpriseEdition",targetDatabaseEngineType:a||"SingleInstance",scriptCompatibilityOption:c||"Script140Compat"};return{connectionString:null,filePath:i.filePath,scriptingObjects:[o],scriptDestination:"ToEditor",includeObjectCriteria:null,excludeObjectCriteria:null,includeSchemas:null,excludeSchemas:null,includeTypes:null,excludeTypes:null,scriptOptions:l,connectionDetails:null,selectScript:null,ownerURI:e,operation:t}}}},5868:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=t.SqlOpsDataClient=t.FileBrowserFeature=t.TaskServicesFeature=t.ScriptingFeature=t.ObjectExplorerFeature=t.RestoreFeature=t.BackupFeature=t.AdminServicesFeature=t.MetadataFeature=t.QueryFeature=t.ConnectionFeature=t.CapabilitiesFeature=t.SqlOpsFeature=void 0;const r=n(3056),i=n(2097),o=n(4489),s=n(9072),a=n(9496),c=n(9293),l=n(632),u=n(4003);function d(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class p{constructor(e,t){this._client=e,this._message=t,this._providers=new Map,this._disposables=[]}get messages(){return this._message}register(e,t){if(i.array(this.messages)&&i.array(e)){let t=e.every((e=>!!this.messages.find((t=>t.method===e.method))));if(!t)throw new Error("Register called on wrong feature.")}else if(i.array(this.messages)&&!i.array(e)){if(!this.messages.find((t=>t.method===e.method)))throw new Error("Register called on wrong feature.")}else if(!i.array(this.messages)&&!i.array(e)&&this.messages.method!==e.method)throw new Error(`Register called on wrong feature. Requested ${e.method} but reached feature ${this.messages.method}`);let n=this.registerProvider(t.registerOptions);n&&this._providers.set(t.id,n)}unregister(e){let t=this._providers.get(e);t&&t.dispose()}dispose(){this._providers.forEach((e=>{e.dispose()})),this._disposables.forEach((e=>e.dispose())),this._providers.clear(),this._disposables=[]}registerNotificationEmitter(e){const t=new a.EventEmitter;return this._disposables.push(t),this._client.onNotification(e,(e=>{t.fire(e)})),t}}t.SqlOpsFeature=p;class h extends p{constructor(e){super(e,h.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"capabilities").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerCapabilitiesServiceProvider({providerId:t.providerId,getServerCapabilities:e=>t.sendRequest(l.CapabiltiesDiscoveryRequest.type,e).then(t.sqlp2c.asServerCapabilities,(e=>(t.logFailedRequest(l.CapabiltiesDiscoveryRequest.type,e),Promise.resolve(void 0))))})}}t.CapabilitiesFeature=h,h.messagesTypes=[l.CapabiltiesDiscoveryRequest.type];class f extends p{constructor(e){super(e,f.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"connection").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.ConnectionCompleteNotification.type),r=this.registerNotificationEmitter(l.IntelliSenseReadyNotification.type),i=this.registerNotificationEmitter(l.ConnectionChangedNotification.type);return s.dataprotocol.onDidChangeLanguageFlavor((e=>{t.sendNotification(l.LanguageFlavorChangedNotification.type,e)})),s.dataprotocol.registerConnectionProvider({providerId:t.providerId,connect:(e,n)=>t.sendRequest(l.ConnectionRequest.type,t.sqlc2p.asConnectionParams(e,n)).then((e=>e),(e=>(t.logFailedRequest(l.ConnectionRequest.type,e),Promise.resolve(!1)))),disconnect:e=>{let n={ownerUri:e};return t.sendRequest(l.DisconnectRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.DisconnectRequest.type,e),Promise.resolve(!1))))},cancelConnect:e=>{let n={ownerUri:e};return t.sendRequest(l.CancelConnectRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.CancelConnectRequest.type,e),Promise.resolve(!1))))},changeDatabase:(e,n)=>{let r={ownerUri:e,newDatabase:n};return t.sendRequest(l.ChangeDatabaseRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.ChangeDatabaseRequest.type,e),Promise.resolve(!1))))},changePassword:(e,n,r)=>{let i={ownerUri:e,connection:{options:n.options},newPassword:r};return t.sendRequest(l.ChangePasswordRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.ChangePasswordRequest.type,e),Promise.resolve(!1))))},listDatabases:e=>{let n={ownerUri:e};return t.sendRequest(l.ListDatabasesRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.ListDatabasesRequest.type,e),Promise.resolve(void 0))))},getConnectionString:(e,n)=>{let r={ownerUri:e,includePassword:n};return t.sendRequest(l.GetConnectionStringRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.GetConnectionStringRequest.type,e),Promise.resolve(void 0))))},buildConnectionInfo:e=>t.sendRequest(l.BuildConnectionInfoRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.BuildConnectionInfoRequest.type,e),Promise.resolve(e)))),rebuildIntelliSenseCache:e=>{let n={ownerUri:e};return t.sendNotification(l.RebuildIntelliSenseNotification.type,n),Promise.resolve()},registerOnConnectionChanged:e=>i.event((t=>e({connectionUri:t.ownerUri,connection:t.connection}))),registerOnIntelliSenseCacheComplete:e=>r.event((t=>e(t.ownerUri))),registerOnConnectionComplete:e=>n.event(e)})}}t.ConnectionFeature=f,f.messagesTypes=[l.ConnectionRequest.type,l.ConnectionCompleteNotification.type,l.ConnectionChangedNotification.type,l.DisconnectRequest.type,l.CancelConnectRequest.type,l.ChangeDatabaseRequest.type,l.ListDatabasesRequest.type,l.GetConnectionStringRequest.type,l.LanguageFlavorChangedNotification.type,l.ChangePasswordRequest.type];class m extends p{constructor(e){super(e,m.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"query").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.QueryExecuteCompleteNotification.type),r=this.registerNotificationEmitter(l.QueryExecuteBatchStartNotification.type),i=this.registerNotificationEmitter(l.QueryExecuteBatchCompleteNotification.type),o=this.registerNotificationEmitter(l.QueryExecuteResultSetAvailableNotification.type),a=this.registerNotificationEmitter(l.QueryExecuteResultSetUpdatedNotification.type),c=this.registerNotificationEmitter(l.QueryExecuteMessageNotification.type),u=this.registerNotificationEmitter(l.EditSessionReadyNotification.type);return s.dataprotocol.registerQueryProvider({providerId:t.providerId,cancelQuery:e=>{let n={ownerUri:e};return t.sendRequest(l.QueryCancelRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.QueryCancelRequest.type,e),Promise.reject(e))))},commitEdit:e=>{let n={ownerUri:e};return t.sendRequest(l.EditCommitRequest.type,n).then((e=>{}),(e=>(t.logFailedRequest(l.EditCommitRequest.type,e),Promise.reject(e))))},createRow:e=>{let n={ownerUri:e};return t.sendRequest(l.EditCreateRowRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.EditCreateRowRequest.type,e),Promise.reject(e))))},deleteRow:(e,n)=>{let r={ownerUri:e,rowId:n};return t.sendRequest(l.EditDeleteRowRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.EditDeleteRowRequest.type,e),Promise.reject(e))))},disposeEdit:e=>{let n={ownerUri:e};return t.sendRequest(l.EditDisposeRequest.type,n).then((e=>{}),(e=>(t.logFailedRequest(l.EditDisposeRequest.type,e),Promise.reject(e))))},disposeQuery:e=>{let n={ownerUri:e};return t.sendRequest(l.QueryDisposeRequest.type,n).then((e=>{}),(e=>(t.logFailedRequest(l.QueryDisposeRequest.type,e),Promise.reject(e))))},connectionUriChanged:(e,n)=>{let r={newOwnerUri:e,originalOwnerUri:n};return t.sendNotification(l.ConnectionUriChangedNotification.type,r),Promise.resolve()},getEditRows:e=>t.sendRequest(l.EditSubsetRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.EditSubsetRequest.type,e),Promise.reject(e)))),getQueryRows:e=>t.sendRequest(l.QueryExecuteSubsetRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.QueryExecuteSubsetRequest.type,e),Promise.reject(e)))),setQueryExecutionOptions:(e,n)=>{let r={ownerUri:e,options:n};return t.sendRequest(l.QueryExecutionOptionsRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecutionOptionsRequest.type,e),Promise.reject(e))))},initializeEdit:(e,n,r,i,o,s)=>{let a={ownerUri:e,schemaName:n,objectName:r,objectType:i,filters:{LimitResults:o},queryString:s};return t.sendRequest(l.EditInitializeRequest.type,a).then((e=>{}),(e=>(t.logFailedRequest(l.EditInitializeRequest.type,e),Promise.reject(e))))},registerOnBatchComplete:e=>i.event(e),registerOnBatchStart:e=>r.event(e),registerOnEditSessionReady:e=>u.event((t=>e(t.ownerUri,t.success,t.message))),registerOnMessage:e=>c.event(e),registerOnQueryComplete:e=>n.event(e),registerOnResultSetAvailable:e=>o.event(e),registerOnResultSetUpdated:e=>a.event(e),revertCell:(e,n,r)=>{let i={ownerUri:e,rowId:n,columnId:r};return t.sendRequest(l.EditRevertCellRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.EditRevertCellRequest.type,e),Promise.reject(e))))},revertRow:(e,n)=>{let r={ownerUri:e,rowId:n};return t.sendRequest(l.EditRevertRowRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.EditRevertRowRequest.type,e),Promise.reject(e))))},runQuery:(e,n,r)=>{let i={ownerUri:e,querySelection:n,executionPlanOptions:t.sqlc2p.asExecutionPlanOptions(r)};return t.sendRequest(l.QueryExecuteRequest.type,i).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecuteRequest.type,e),Promise.reject(e))))},runQueryAndReturn:(e,n)=>{let r={ownerUri:e,queryString:n};return t.sendRequest(l.SimpleExecuteRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.SimpleExecuteRequest.type,e),Promise.reject(e))))},parseSyntax:(e,n)=>{let r={ownerUri:e,query:n};return t.sendRequest(l.SyntaxParseRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.SyntaxParseRequest.type,e),Promise.reject(e))))},runQueryStatement:(e,n,r)=>{let i={ownerUri:e,line:n,column:r};return t.sendRequest(l.QueryExecuteStatementRequest.type,i).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecuteStatementRequest.type,e),Promise.reject(e))))},runQueryString:(e,n)=>{let r={ownerUri:e,query:n};return t.sendRequest(l.QueryExecuteStringRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecuteStringRequest.type,e),Promise.reject(e))))},saveResults:e=>{switch(e.resultFormat){case"csv":return t.sendRequest(l.SaveResultsAsCsvRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsCsvRequest.type,e),Promise.reject(e))));case"json":return t.sendRequest(l.SaveResultsAsJsonRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsJsonRequest.type,e),Promise.reject(e))));case"markdown":return t.sendRequest(l.SaveResultsAsMarkdownRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsMarkdownRequest.type,e),Promise.reject(e))));case"excel":return t.sendRequest(l.SaveResultsAsExcelRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsExcelRequest.type,e),Promise.reject(e))));case"xml":return t.sendRequest(l.SaveResultsAsXmlRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsXmlRequest.type,e),Promise.reject(e))));default:return Promise.reject("unsupported format")}},updateCell:(e,n,r,i)=>{let o={ownerUri:e,rowId:n,columnId:r,newValue:i};return t.sendRequest(l.EditUpdateCellRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(l.EditUpdateCellRequest.type,e),Promise.reject(e))))},copyResults:e=>t.sendRequest(l.CopyResultsRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.CopyResultsRequest.type,e),Promise.reject(e))))})}}t.QueryFeature=m,m.messagesTypes=[l.QueryExecuteRequest.type,l.QueryCancelRequest.type,l.QueryExecuteStatementRequest.type,l.QueryExecuteStringRequest.type,l.SimpleExecuteRequest.type,l.QueryExecuteSubsetRequest.type,l.QueryDisposeRequest.type,l.ConnectionUriChangedNotification.type,l.QueryExecuteCompleteNotification.type,l.QueryExecuteBatchStartNotification.type,l.QueryExecuteBatchCompleteNotification.type,l.QueryExecuteResultSetAvailableNotification.type,l.QueryExecuteResultSetUpdatedNotification.type,l.QueryExecuteMessageNotification.type,l.QueryExecutionOptionsRequest.type,l.SaveResultsAsCsvRequest.type,l.SaveResultsAsJsonRequest.type,l.SaveResultsAsMarkdownRequest.type,l.SaveResultsAsExcelRequest.type,l.SaveResultsAsXmlRequest.type,l.CopyResultsRequest.type,l.EditCommitRequest.type,l.EditCreateRowRequest.type,l.EditDeleteRowRequest.type,l.EditDisposeRequest.type,l.EditInitializeRequest.type,l.EditRevertCellRequest.type,l.EditRevertRowRequest.type,l.EditUpdateCellRequest.type,l.EditSubsetRequest.type,l.EditSessionReadyNotification.type];class g extends p{constructor(e){super(e,g.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"metadata").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerMetadataProvider({providerId:t.providerId,getDatabases:e=>{let n={ownerUri:e,includeDetails:!0};return t.sendRequest(l.ListDatabasesRequest.type,n).then((e=>e.databaseNames?e.databaseNames:e.databases),(e=>(t.logFailedRequest(l.ListDatabasesRequest.type,e),Promise.resolve(void 0))))},getMetadata:e=>{let n={ownerUri:e};return t.sendRequest(l.MetadataQueryRequest.type,n).then(t.sqlp2c.asProviderMetadata,(e=>(t.logFailedRequest(l.MetadataQueryRequest.type,e),Promise.resolve(void 0))))},getTableInfo:(e,n)=>{let r={objectName:n.name,ownerUri:e,schema:n.schema};return t.sendRequest(l.TableMetadataRequest.type,r).then((e=>e.columns),(e=>(t.logFailedRequest(l.TableMetadataRequest.type,e),Promise.resolve(void 0))))},getViewInfo:(e,n)=>{let r={objectName:n.name,ownerUri:e,schema:n.schema};return t.sendRequest(l.ViewMetadataRequest.type,r).then((e=>e.columns),(e=>(t.logFailedRequest(l.ViewMetadataRequest.type,e),Promise.resolve(void 0))))}})}}t.MetadataFeature=g,g.messagesTypes=[l.MetadataQueryRequest.type,l.ListDatabasesRequest.type,l.TableMetadataRequest.type,l.ViewMetadataRequest.type];class y extends p{constructor(e){super(e,y.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"adminServices").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerAdminServicesProvider({providerId:t.providerId,createDatabase:(e,n)=>{let r={ownerUri:e,databaseInfo:n};return t.sendRequest(l.CreateDatabaseRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.CreateDatabaseRequest.type,e),Promise.resolve(void 0))))},createLogin:(e,n)=>{let r={ownerUri:e,loginInfo:n};return t.sendRequest(l.CreateLoginRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.CreateLoginRequest.type,e),Promise.resolve(void 0))))},getDatabaseInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.GetDatabaseInfoRequest.type,n).then((e=>e.databaseInfo),(e=>(t.logFailedRequest(l.GetDatabaseInfoRequest.type,e),Promise.reject(e))))},getDefaultDatabaseInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.DefaultDatabaseInfoRequest.type,n).then((e=>e.defaultDatabaseInfo),(e=>(t.logFailedRequest(l.DefaultDatabaseInfoRequest.type,e),Promise.resolve(void 0))))}})}}t.AdminServicesFeature=y,y.messagesTypes=[l.CreateDatabaseRequest.type,l.DefaultDatabaseInfoRequest.type,l.GetDatabaseInfoRequest.type,l.CreateLoginRequest.type];class v extends p{constructor(e){super(e,v.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"backup").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerBackupProvider({providerId:t.providerId,backup:(e,n,r)=>{let i={ownerUri:e,backupInfo:n,taskExecutionMode:r};return t.sendRequest(l.BackupRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.BackupRequest.type,e),Promise.resolve(void 0))))},getBackupConfigInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.BackupConfigInfoRequest.type,n).then((e=>e.backupConfigInfo),(e=>(t.logFailedRequest(l.BackupConfigInfoRequest.type,e),Promise.resolve(void 0))))}})}}t.BackupFeature=v,v.messagesTypes=[l.BackupRequest.type,l.BackupConfigInfoRequest.type];class b extends p{constructor(e){super(e,b.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"restore").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerRestoreProvider({providerId:t.providerId,cancelRestorePlan:(e,n)=>{let r={options:n.options,ownerUri:e,taskExecutionMode:n.taskExecutionMode};return t.sendRequest(l.CancelRestorePlanRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.CancelRestorePlanRequest.type,e),Promise.resolve(void 0))))},getRestoreConfigInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.RestoreConfigInfoRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.RestoreConfigInfoRequest.type,e),Promise.resolve(void 0))))},getRestorePlan:(e,n)=>{let r={options:n.options,ownerUri:e,taskExecutionMode:n.taskExecutionMode};return t.sendRequest(l.RestorePlanRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.RestorePlanRequest.type,e),Promise.resolve(void 0))))},restore:(e,n)=>{let r={options:n.options,ownerUri:e,taskExecutionMode:n.taskExecutionMode};return t.sendRequest(l.RestoreRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.RestoreRequest.type,e),Promise.resolve(void 0))))}})}}t.RestoreFeature=b,b.messagesTypes=[l.RestorePlanRequest.type,l.RestoreRequest.type,l.RestoreConfigInfoRequest.type,l.CancelRestorePlanRequest.type];class S extends p{constructor(e){super(e,S.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"objectExplorer").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.ObjectExplorerCreateSessionCompleteNotification.type),r=this.registerNotificationEmitter(l.ObjectExplorerSessionDisconnectedNotification.type),i=this.registerNotificationEmitter(l.ObjectExplorerExpandCompleteNotification.type);return s.dataprotocol.registerObjectExplorerProvider({providerId:t.providerId,closeSession:e=>t.sendRequest(l.ObjectExplorerCloseSessionRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerCloseSessionRequest.type,e),Promise.resolve(void 0)))),createNewSession:e=>t.sendRequest(l.ObjectExplorerCreateSessionRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerCreateSessionRequest.type,e),Promise.resolve(void 0)))),expandNode:e=>t.sendRequest(l.ObjectExplorerExpandRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerExpandRequest.type,e),Promise.resolve(void 0)))),refreshNode:e=>t.sendRequest(l.ObjectExplorerRefreshRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerRefreshRequest.type,e),Promise.resolve(void 0)))),findNodes:e=>t.sendRequest(l.ObjectExplorerFindNodesRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerFindNodesRequest.type,e),Promise.resolve(void 0)))),registerOnExpandCompleted:e=>i.event(e),registerOnSessionCreated:e=>n.event(e),registerOnSessionDisconnected:e=>r.event(e)})}}t.ObjectExplorerFeature=S,S.messagesTypes=[l.ObjectExplorerCreateSessionRequest.type,l.ObjectExplorerExpandRequest.type,l.ObjectExplorerRefreshRequest.type,l.ObjectExplorerCloseSessionRequest.type,l.ObjectExplorerCreateSessionCompleteNotification.type,l.ObjectExplorerExpandCompleteNotification.type,l.ObjectExplorerFindNodesRequest.type];class w extends p{constructor(e){super(e,w.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"scripting").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.ScriptingCompleteNotification.type);return s.dataprotocol.registerScriptingProvider({providerId:t.providerId,registerOnScriptingComplete:e=>n.event(e),scriptAsOperation:(e,n,r,i)=>t.sendRequest(l.ScriptingRequest.type,t.sqlc2p.asScriptingParams(e,n,r,i)).then((e=>e),(e=>(t.logFailedRequest(l.ScriptingRequest.type,e),Promise.reject(e))))})}}t.ScriptingFeature=w,w.messagesTypes=[l.ScriptingRequest.type,l.ScriptingCompleteNotification.type];class T extends p{constructor(e){super(e,T.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"taskServices").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.TaskCreatedNotification.type),r=this.registerNotificationEmitter(l.TaskStatusChangedNotification.type);return s.dataprotocol.registerTaskServicesProvider({providerId:t.providerId,cancelTask:e=>t.sendRequest(l.CancelTaskRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.CancelTaskRequest.type,e),Promise.resolve(void 0)))),getAllTasks:e=>t.sendRequest(l.ListTasksRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ListTasksRequest.type,e),Promise.resolve(void 0)))),registerOnTaskCreated:e=>n.event(e),registerOnTaskStatusChanged:e=>r.event(e)})}}t.TaskServicesFeature=T,T.messagesTypes=[l.ListTasksRequest.type,l.CancelTaskRequest.type,l.TaskCreatedNotification.type,l.TaskStatusChangedNotification.type];class _ extends p{constructor(e){super(e,_.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"fileBrowser").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.FileBrowserOpenedNotification.type),r=this.registerNotificationEmitter(l.FileBrowserExpandedNotification.type),i=this.registerNotificationEmitter(l.FileBrowserValidatedNotification.type);return s.dataprotocol.registerFileBrowserProvider({providerId:t.providerId,closeFileBrowser:e=>{let n={ownerUri:e};return t.sendRequest(l.FileBrowserCloseRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserCloseRequest.type,e),Promise.resolve(void 0))))},expandFolderNode:(e,n)=>{let r={ownerUri:e,expandPath:n};return t.sendRequest(l.FileBrowserExpandRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserExpandRequest.type,e),Promise.resolve(void 0))))},openFileBrowser:(e,n,r,i,o)=>{let s={ownerUri:e,expandPath:n,fileFilters:r,changeFilter:i,showFoldersOnly:o};return t.sendRequest(l.FileBrowserOpenRequest.type,s).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserOpenRequest.type,e),Promise.resolve(void 0))))},registerOnFileBrowserOpened:e=>n.event(e),registerOnFilePathsValidated:e=>i.event(e),registerOnFolderNodeExpanded:e=>r.event(e),validateFilePaths:(e,n,r)=>{let i={ownerUri:e,serviceType:n,selectedFiles:r};return t.sendRequest(l.FileBrowserValidateRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserValidateRequest.type,e),Promise.resolve(void 0))))}})}}t.FileBrowserFeature=_,_.messagesTypes=[l.FileBrowserOpenRequest.type,l.FileBrowserOpenedNotification.type,l.FileBrowserExpandRequest.type,l.FileBrowserExpandedNotification.type,l.FileBrowserValidateRequest.type,l.FileBrowserValidatedNotification.type,l.FileBrowserCloseRequest.type];class E extends r.LanguageClient{constructor(e,t,n,r,o){let s;i.string(t)?(super(e,t,n,r,o),this._providerId=r.providerId,s=r.features):(super(e,t,n,r),this._providerId=n.providerId,s=n.features),this._sqlc2p=c.c2p,this._sqlp2c=u.p2c,this.registerSqlopsFeatures(s||E.defaultFeatures)}get sqlc2p(){return this._sqlc2p}get sqlp2c(){return this._sqlp2c}get providerId(){return this._providerId}registerSqlopsFeatures(e){e.map((e=>{this.registerFeature(new e(this))}))}}t.SqlOpsDataClient=E,E.defaultFeatures=[f,h,m,g,y,v,b,S,w,T,_],t.BaseService=class{constructor(e){this.client=e}runWithErrorHandling(e,t){return this.client.sendRequest(e,t).then((e=>e),(t=>(this.client.logFailedRequest(e,t),Promise.reject(t))))}}},632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataQueryRequest=t.QueryExecutionOptionsRequest=t.QueryExecuteStringRequest=t.SimpleExecuteRequest=t.SyntaxParseRequest=t.CopyResultsRequest=t.SaveResultsAsXmlRequest=t.SaveResultsAsExcelRequest=t.SaveResultsAsMarkdownRequest=t.SaveResultsAsJsonRequest=t.SaveResultsAsCsvRequest=t.QueryExecuteStatementRequest=t.QueryExecuteSubsetRequest=t.QueryExecuteRequest=t.QueryExecuteMessageNotification=t.QueryExecuteResultSetUpdatedNotification=t.QueryExecuteResultSetAvailableNotification=t.QueryExecuteBatchCompleteNotification=t.QueryExecuteBatchStartNotification=t.QueryExecuteCompleteNotification=t.ConnectionUriChangedParams=t.ConnectionUriChangedNotification=t.QueryDisposeRequest=t.QueryCancelRequest=t.CapabiltiesDiscoveryRequest=t.CapabiltiesDiscoveryParams=t.IntelliSenseReadyNotification=t.ViewMetadataRequest=t.TableMetadataRequest=t.TableMetadataResult=t.TableMetadataParams=t.LanguageFlavorChangedNotification=t.BuildConnectionInfoRequest=t.GetConnectionStringRequest=t.GetConnectionStringParams=t.ListDatabasesRequest=t.ListDatabasesParams=t.ChangeDatabaseRequest=t.ChangeDatabaseParams=t.CancelConnectRequest=t.CancelConnectParams=t.DisconnectRequest=t.DisconnectParams=t.ChangePasswordRequest=t.ConnectionChangedNotification=t.ConnectionChangedParams=t.ConnectionCompleteNotification=t.ConnectionRequest=t.RebuildIntelliSenseParams=t.RebuildIntelliSenseNotification=void 0,t.FileBrowserCloseRequest=t.FileBrowserValidatedNotification=t.FileBrowserValidateRequest=t.FileBrowserExpandedNotification=t.FileBrowserExpandRequest=t.FileBrowserOpenedNotification=t.FileBrowserOpenRequest=t.RestoreConfigInfoRequest=t.CancelRestorePlanRequest=t.RestorePlanRequest=t.RestoreRequest=t.BackupConfigInfoRequest=t.BackupRequest=t.GetDatabaseInfoRequest=t.CreateLoginRequest=t.DefaultDatabaseInfoRequest=t.CreateDatabaseRequest=t.TaskCreatedNotification=t.TaskStatusChangedNotification=t.CancelTaskRequest=t.ListTasksRequest=t.ObjectExplorerExpandCompleteNotification=t.ObjectExplorerSessionDisconnectedNotification=t.ObjectExplorerCreateSessionCompleteNotification=t.ObjectExplorerFindNodesRequest=t.ObjectExplorerCloseSessionRequest=t.ObjectExplorerRefreshRequest=t.ObjectExplorerExpandRequest=t.ObjectExplorerCreateSessionRequest=t.EditSubsetRequest=t.EditUpdateCellRequest=t.EditSessionReadyNotification=t.EditRevertRowRequest=t.EditRevertCellRequest=t.EditInitializeRequest=t.EditDisposeRequest=t.EditDeleteRowRequest=t.EditCreateRowRequest=t.EditCommitRequest=t.ScriptingCompleteNotification=t.ScriptingRequest=void 0;const r=n(3056);(t.RebuildIntelliSenseNotification||(t.RebuildIntelliSenseNotification={})).type=new r.NotificationType("textDocument/rebuildIntelliSense"),t.RebuildIntelliSenseParams=class{},(t.ConnectionRequest||(t.ConnectionRequest={})).type=new r.RequestType("connection/connect"),(t.ConnectionCompleteNotification||(t.ConnectionCompleteNotification={})).type=new r.NotificationType("connection/complete"),t.ConnectionChangedParams=class{},(t.ConnectionChangedNotification||(t.ConnectionChangedNotification={})).type=new r.NotificationType("connection/connectionchanged"),(t.ChangePasswordRequest||(t.ChangePasswordRequest={})).type=new r.RequestType("connection/changepassword"),t.DisconnectParams=class{},(t.DisconnectRequest||(t.DisconnectRequest={})).type=new r.RequestType("connection/disconnect"),t.CancelConnectParams=class{},(t.CancelConnectRequest||(t.CancelConnectRequest={})).type=new r.RequestType("connection/cancelconnect"),t.ChangeDatabaseParams=class{},(t.ChangeDatabaseRequest||(t.ChangeDatabaseRequest={})).type=new r.RequestType("connection/changedatabase"),t.ListDatabasesParams=class{},(t.ListDatabasesRequest||(t.ListDatabasesRequest={})).type=new r.RequestType("connection/listdatabases"),t.GetConnectionStringParams=class{},(t.GetConnectionStringRequest||(t.GetConnectionStringRequest={})).type=new r.RequestType("connection/getconnectionstring"),(t.BuildConnectionInfoRequest||(t.BuildConnectionInfoRequest={})).type=new r.RequestType("connection/buildconnectioninfo"),(t.LanguageFlavorChangedNotification||(t.LanguageFlavorChangedNotification={})).type=new r.NotificationType("connection/languageflavorchanged"),t.TableMetadataParams=class{},t.TableMetadataResult=class{},(t.TableMetadataRequest||(t.TableMetadataRequest={})).type=new r.RequestType("metadata/table"),(t.ViewMetadataRequest||(t.ViewMetadataRequest={})).type=new r.RequestType("metadata/view"),(t.IntelliSenseReadyNotification||(t.IntelliSenseReadyNotification={})).type=new r.NotificationType("textDocument/intelliSenseReady"),t.CapabiltiesDiscoveryParams=class{},(t.CapabiltiesDiscoveryRequest||(t.CapabiltiesDiscoveryRequest={})).type=new r.RequestType("capabilities/list"),(t.QueryCancelRequest||(t.QueryCancelRequest={})).type=new r.RequestType("query/cancel"),(t.QueryDisposeRequest||(t.QueryDisposeRequest={})).type=new r.RequestType("query/dispose"),(t.ConnectionUriChangedNotification||(t.ConnectionUriChangedNotification={})).type=new r.NotificationType("query/connectionUriChanged"),t.ConnectionUriChangedParams=class{},(t.QueryExecuteCompleteNotification||(t.QueryExecuteCompleteNotification={})).type=new r.NotificationType("query/complete"),(t.QueryExecuteBatchStartNotification||(t.QueryExecuteBatchStartNotification={})).type=new r.NotificationType("query/batchStart"),(t.QueryExecuteBatchCompleteNotification||(t.QueryExecuteBatchCompleteNotification={})).type=new r.NotificationType("query/batchComplete"),(t.QueryExecuteResultSetAvailableNotification||(t.QueryExecuteResultSetAvailableNotification={})).type=new r.NotificationType("query/resultSetAvailable"),(t.QueryExecuteResultSetUpdatedNotification||(t.QueryExecuteResultSetUpdatedNotification={})).type=new r.NotificationType("query/resultSetUpdated"),(t.QueryExecuteMessageNotification||(t.QueryExecuteMessageNotification={})).type=new r.NotificationType("query/message"),(t.QueryExecuteRequest||(t.QueryExecuteRequest={})).type=new r.RequestType("query/executeDocumentSelection"),(t.QueryExecuteSubsetRequest||(t.QueryExecuteSubsetRequest={})).type=new r.RequestType("query/subset"),(t.QueryExecuteStatementRequest||(t.QueryExecuteStatementRequest={})).type=new r.RequestType("query/executedocumentstatement"),(t.SaveResultsAsCsvRequest||(t.SaveResultsAsCsvRequest={})).type=new r.RequestType("query/saveCsv"),(t.SaveResultsAsJsonRequest||(t.SaveResultsAsJsonRequest={})).type=new r.RequestType("query/saveJson"),(t.SaveResultsAsMarkdownRequest||(t.SaveResultsAsMarkdownRequest={})).type=new r.RequestType("query/saveMarkdown"),(t.SaveResultsAsExcelRequest||(t.SaveResultsAsExcelRequest={})).type=new r.RequestType("query/saveExcel"),(t.SaveResultsAsXmlRequest||(t.SaveResultsAsXmlRequest={})).type=new r.RequestType("query/saveXml"),(t.CopyResultsRequest||(t.CopyResultsRequest={})).type=new r.RequestType("query/copy"),(t.SyntaxParseRequest||(t.SyntaxParseRequest={})).type=new r.RequestType("query/syntaxparse"),(t.SimpleExecuteRequest||(t.SimpleExecuteRequest={})).type=new r.RequestType("query/simpleexecute"),(t.QueryExecuteStringRequest||(t.QueryExecuteStringRequest={})).type=new r.RequestType("query/executeString"),(t.QueryExecutionOptionsRequest||(t.QueryExecutionOptionsRequest={})).type=new r.RequestType("query/setexecutionoptions"),(t.MetadataQueryRequest||(t.MetadataQueryRequest={})).type=new r.RequestType("metadata/list"),(t.ScriptingRequest||(t.ScriptingRequest={})).type=new r.RequestType("scripting/script"),(t.ScriptingCompleteNotification||(t.ScriptingCompleteNotification={})).type=new r.NotificationType("scripting/scriptComplete"),(t.EditCommitRequest||(t.EditCommitRequest={})).type=new r.RequestType("edit/commit"),(t.EditCreateRowRequest||(t.EditCreateRowRequest={})).type=new r.RequestType("edit/createRow"),(t.EditDeleteRowRequest||(t.EditDeleteRowRequest={})).type=new r.RequestType("edit/deleteRow"),(t.EditDisposeRequest||(t.EditDisposeRequest={})).type=new r.RequestType("edit/dispose"),(t.EditInitializeRequest||(t.EditInitializeRequest={})).type=new r.RequestType("edit/initialize"),(t.EditRevertCellRequest||(t.EditRevertCellRequest={})).type=new r.RequestType("edit/revertCell"),(t.EditRevertRowRequest||(t.EditRevertRowRequest={})).type=new r.RequestType("edit/revertRow"),(t.EditSessionReadyNotification||(t.EditSessionReadyNotification={})).type=new r.NotificationType("edit/sessionReady"),(t.EditUpdateCellRequest||(t.EditUpdateCellRequest={})).type=new r.RequestType("edit/updateCell"),(t.EditSubsetRequest||(t.EditSubsetRequest={})).type=new r.RequestType("edit/subset"),(t.ObjectExplorerCreateSessionRequest||(t.ObjectExplorerCreateSessionRequest={})).type=new r.RequestType("objectexplorer/createsession"),(t.ObjectExplorerExpandRequest||(t.ObjectExplorerExpandRequest={})).type=new r.RequestType("objectexplorer/expand"),(t.ObjectExplorerRefreshRequest||(t.ObjectExplorerRefreshRequest={})).type=new r.RequestType("objectexplorer/refresh"),(t.ObjectExplorerCloseSessionRequest||(t.ObjectExplorerCloseSessionRequest={})).type=new r.RequestType("objectexplorer/closesession"),(t.ObjectExplorerFindNodesRequest||(t.ObjectExplorerFindNodesRequest={})).type=new r.RequestType("objectexplorer/findnodes"),(t.ObjectExplorerCreateSessionCompleteNotification||(t.ObjectExplorerCreateSessionCompleteNotification={})).type=new r.NotificationType("objectexplorer/sessioncreated"),(t.ObjectExplorerSessionDisconnectedNotification||(t.ObjectExplorerSessionDisconnectedNotification={})).type=new r.NotificationType("objectexplorer/sessiondisconnected"),(t.ObjectExplorerExpandCompleteNotification||(t.ObjectExplorerExpandCompleteNotification={})).type=new r.NotificationType("objectexplorer/expandCompleted"),(t.ListTasksRequest||(t.ListTasksRequest={})).type=new r.RequestType("tasks/listtasks"),(t.CancelTaskRequest||(t.CancelTaskRequest={})).type=new r.RequestType("tasks/canceltask"),(t.TaskStatusChangedNotification||(t.TaskStatusChangedNotification={})).type=new r.NotificationType("tasks/statuschanged"),(t.TaskCreatedNotification||(t.TaskCreatedNotification={})).type=new r.NotificationType("tasks/newtaskcreated"),(t.CreateDatabaseRequest||(t.CreateDatabaseRequest={})).type=new r.RequestType("admin/createdatabase"),(t.DefaultDatabaseInfoRequest||(t.DefaultDatabaseInfoRequest={})).type=new r.RequestType("admin/defaultdatabaseinfo"),(t.CreateLoginRequest||(t.CreateLoginRequest={})).type=new r.RequestType("admin/createlogin"),(t.GetDatabaseInfoRequest||(t.GetDatabaseInfoRequest={})).type=new r.RequestType("admin/getdatabaseinfo"),(t.BackupRequest||(t.BackupRequest={})).type=new r.RequestType("backup/backup"),(t.BackupConfigInfoRequest||(t.BackupConfigInfoRequest={})).type=new r.RequestType("backup/backupconfiginfo"),(t.RestoreRequest||(t.RestoreRequest={})).type=new r.RequestType("restore/restore"),(t.RestorePlanRequest||(t.RestorePlanRequest={})).type=new r.RequestType("restore/restoreplan"),(t.CancelRestorePlanRequest||(t.CancelRestorePlanRequest={})).type=new r.RequestType("restore/cancelrestoreplan"),(t.RestoreConfigInfoRequest||(t.RestoreConfigInfoRequest={})).type=new r.RequestType("restore/restoreconfiginfo"),(t.FileBrowserOpenRequest||(t.FileBrowserOpenRequest={})).type=new r.RequestType("filebrowser/open"),(t.FileBrowserOpenedNotification||(t.FileBrowserOpenedNotification={})).type=new r.NotificationType("filebrowser/opencomplete"),(t.FileBrowserExpandRequest||(t.FileBrowserExpandRequest={})).type=new r.RequestType("filebrowser/expand"),(t.FileBrowserExpandedNotification||(t.FileBrowserExpandedNotification={})).type=new r.NotificationType("filebrowser/expandcomplete"),(t.FileBrowserValidateRequest||(t.FileBrowserValidateRequest={})).type=new r.RequestType("filebrowser/validate"),(t.FileBrowserValidatedNotification||(t.FileBrowserValidatedNotification={})).type=new r.NotificationType("filebrowser/validatecomplete"),(t.FileBrowserCloseRequest||(t.FileBrowserCloseRequest={})).type=new r.RequestType("filebrowser/close")},4003:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.p2c=void 0;const r=n(9072);function i(e){return"string"===e?r.ServiceOptionType.string:"multistring"===e?r.ServiceOptionType.multistring:"password"===e?r.ServiceOptionType.password:"number"===e?r.ServiceOptionType.number:"boolean"===e?r.ServiceOptionType.boolean:"category"===e?r.ServiceOptionType.category:"object"===e?r.ServiceOptionType.object:r.ServiceOptionType.string}function o(e){return{name:e.name,displayName:e.displayName?e.displayName:e.name,description:e.description,groupName:e.groupName,defaultValue:e.defaultValue,categoryValues:e.categoryValues,isRequired:e.isRequired,isArray:e.isArray,objectType:e.objectType,valueType:i(e.valueType)}}t.p2c={asProviderMetadata:function(e){let t=[];if(!e.metadata||!e.metadata.length)return{objectMetadata:t};for(let n=0;n<e.metadata.length;++n){let i,o=e.metadata[n];i=o.metadataTypeName?o.metadataTypeName:o.metadataType===r.MetadataType.View?"View":o.metadataType===r.MetadataType.SProc?"StoredProcedure":o.metadataType===r.MetadataType.Function?"Function":"Table",t.push({metadataTypeName:i,metadataType:o.metadataType,name:o.name,schema:o.schema,urn:o.urn})}return{objectMetadata:t}},asServerCapabilities:function(e){let t={protocolVersion:e.capabilities.protocolVersion,providerName:e.capabilities.providerName,providerDisplayName:e.capabilities.providerDisplayName,connectionProvider:void 0,adminServicesProvider:void 0,features:[]};if(e.capabilities.adminServicesProvider){if(t.adminServicesProvider={databaseInfoOptions:new Array,databaseFileInfoOptions:new Array,fileGroupInfoOptions:new Array},e.capabilities.adminServicesProvider.databaseInfoOptions&&e.capabilities.adminServicesProvider.databaseInfoOptions.length>0)for(let n=0;n<e.capabilities.adminServicesProvider.databaseInfoOptions.length;++n){let r=o(e.capabilities.adminServicesProvider.databaseInfoOptions[n]);t.adminServicesProvider.databaseInfoOptions.push(r)}if(e.capabilities.adminServicesProvider.databaseFileInfoOptions&&e.capabilities.adminServicesProvider.databaseFileInfoOptions.length>0)for(let n=0;n<e.capabilities.adminServicesProvider.databaseFileInfoOptions.length;++n){let r=o(e.capabilities.adminServicesProvider.databaseFileInfoOptions[n]);t.adminServicesProvider.databaseFileInfoOptions.push(r)}if(e.capabilities.adminServicesProvider.fileGroupInfoOptions&&e.capabilities.adminServicesProvider.fileGroupInfoOptions.length>0)for(let n=0;n<e.capabilities.adminServicesProvider.fileGroupInfoOptions.length;++n){let r=o(e.capabilities.adminServicesProvider.fileGroupInfoOptions[n]);t.adminServicesProvider.fileGroupInfoOptions.push(r)}}if(e.capabilities.connectionProvider&&e.capabilities.connectionProvider.options&&e.capabilities.connectionProvider.options.length>0){t.connectionProvider={options:new Array};for(let n=0;n<e.capabilities.connectionProvider.options.length;++n){let o=e.capabilities.connectionProvider.options[n],s={name:o.name,displayName:o.displayName?o.displayName:o.name,description:o.description,groupName:o.groupName,defaultValue:o.defaultValue,categoryValues:o.categoryValues,isIdentity:o.isIdentity,isRequired:o.isRequired,valueType:i(o.valueType),specialValueType:void 0};"serverName"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.serverName:"databaseName"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.databaseName:"authType"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.authType:"userName"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.userName:"password"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.password:"appName"===o.specialValueType&&(s.specialValueType=r.ConnectionOptionSpecialType.appName),t.connectionProvider.options.push(s)}}return e.capabilities.features&&e.capabilities.features.length>0&&e.capabilities.features.forEach((e=>{let n={enabled:e.enabled,featureName:e.featureName,optionsMetadata:[]};t.features.push(n),e.optionsMetadata&&e.optionsMetadata.forEach((e=>{n.optionsMetadata.push(o(e))}))})),t}}},1227:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2447)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,o,s=null;function a(...e){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];n=o.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(7824),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},5158:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(1227):e.exports=n(39)},39:(e,t,n)=>{const r=n(6224),i=n(3837);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=`  ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(2130);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(2447)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},6387:(e,t,n)=>{var r;!function(i){var o=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=10;function a(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=e.maxListeners!==i?e.maxListeners:s,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=s}function l(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),"undefined"!=typeof process&&process.emitWarning){var r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,process.emitWarning(r)}else console.error(n),console.trace&&console.trace()}function u(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}function d(e,t,n,r){if(!n)return[];var i,o,s,a,c,l,u,p=[],h=t.length,f=t[r],m=t[r+1];if(r===h&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(i=0,o=n._listeners.length;i<o;i++)e&&e.push(n._listeners[i]);return[n]}if("*"===f||"**"===f||n[f]){if("*"===f){for(s in n)"_listeners"!==s&&n.hasOwnProperty(s)&&(p=p.concat(d(e,t,n[s],r+1)));return p}if("**"===f){for(s in(u=r+1===h||r+2===h&&"*"===m)&&n._listeners&&(p=p.concat(d(e,t,n,h))),n)"_listeners"!==s&&n.hasOwnProperty(s)&&("*"===s||"**"===s?(n[s]._listeners&&!u&&(p=p.concat(d(e,t,n[s],h))),p=p.concat(d(e,t,n[s],r))):p=s===m?p.concat(d(e,t,n[s],r+2)):p.concat(d(e,t,n[s],r)));return p}p=p.concat(d(e,t,n[f],r+1))}if((a=n["*"])&&d(e,t,a,r+1),c=n["**"])if(r<h)for(s in c._listeners&&d(e,t,c,h),c)"_listeners"!==s&&c.hasOwnProperty(s)&&(s===m?d(e,t,c[s],r+2):s===f?d(e,t,c[s],r+1):((l={})[s]=c[s],d(e,t,{"**":l},r+1)));else c._listeners?d(e,t,c,h):c["*"]&&c["*"]._listeners&&d(e,t,c["*"],h);return p}function p(e,t){for(var n=0,r=(e="string"==typeof e?e.split(this.delimiter):e.slice()).length;n+1<r;n++)if("**"===e[n]&&"**"===e[n+1])return;for(var o=this.listenerTree,s=e.shift();s!==i;){if(o[s]||(o[s]={}),o=o[s],0===e.length)return o._listeners?("function"==typeof o._listeners&&(o._listeners=[o._listeners]),o._listeners.push(t),!o._listeners.warned&&this._maxListeners>0&&o._listeners.length>this._maxListeners&&(o._listeners.warned=!0,l.call(this,o._listeners.length,s))):o._listeners=t,!0;s=e.shift()}return!0}u.EventEmitter2=u,u.prototype.delimiter=".",u.prototype.setMaxListeners=function(e){e!==i&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},u.prototype.event="",u.prototype.once=function(e,t){return this._once(e,t,!1)},u.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},u.prototype._once=function(e,t,n){return this._many(e,1,t,n),this},u.prototype.many=function(e,t,n){return this._many(e,t,n,!1)},u.prototype.prependMany=function(e,t,n){return this._many(e,t,n,!0)},u.prototype._many=function(e,t,n,r){var i=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function o(){return 0==--t&&i.off(e,o),n.apply(this,arguments)}return o._origin=n,this._on(e,o,r),i},u.prototype.emit=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this._newListener&&!this._events.newListener)return!1;var t,n,r,i,o,s=arguments.length;if(this._all&&this._all.length){if(o=this._all.slice(),s>3)for(t=new Array(s),i=0;i<s;i++)t[i]=arguments[i];for(r=0,n=o.length;r<n;r++)switch(this.event=e,s){case 1:o[r].call(this,e);break;case 2:o[r].call(this,e,arguments[1]);break;case 3:o[r].call(this,e,arguments[1],arguments[2]);break;default:o[r].apply(this,t)}}if(this.wildcard){o=[];var c="string"==typeof e?e.split(this.delimiter):e.slice();d.call(this,o,c,this.listenerTree,0)}else{if("function"==typeof(o=this._events[e])){switch(this.event=e,s){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(s-1),i=1;i<s;i++)t[i-1]=arguments[i];o.apply(this,t)}return!0}o&&(o=o.slice())}if(o&&o.length){if(s>3)for(t=new Array(s-1),i=1;i<s;i++)t[i-1]=arguments[i];for(r=0,n=o.length;r<n;r++)switch(this.event=e,s){case 1:o[r].call(this);break;case 2:o[r].call(this,arguments[1]);break;case 3:o[r].call(this,arguments[1],arguments[2]);break;default:o[r].apply(this,t)}return!0}if(!this._all&&"error"===e)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},u.prototype.emitAsync=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);var t,n,r,i,o,s=[],c=arguments.length;if(this._all){if(c>3)for(t=new Array(c),i=1;i<c;i++)t[i]=arguments[i];for(r=0,n=this._all.length;r<n;r++)switch(this.event=e,c){case 1:s.push(this._all[r].call(this,e));break;case 2:s.push(this._all[r].call(this,e,arguments[1]));break;case 3:s.push(this._all[r].call(this,e,arguments[1],arguments[2]));break;default:s.push(this._all[r].apply(this,t))}}if(this.wildcard){o=[];var l="string"==typeof e?e.split(this.delimiter):e.slice();d.call(this,o,l,this.listenerTree,0)}else o=this._events[e];if("function"==typeof o)switch(this.event=e,c){case 1:s.push(o.call(this));break;case 2:s.push(o.call(this,arguments[1]));break;case 3:s.push(o.call(this,arguments[1],arguments[2]));break;default:for(t=new Array(c-1),i=1;i<c;i++)t[i-1]=arguments[i];s.push(o.apply(this,t))}else if(o&&o.length){if(o=o.slice(),c>3)for(t=new Array(c-1),i=1;i<c;i++)t[i-1]=arguments[i];for(r=0,n=o.length;r<n;r++)switch(this.event=e,c){case 1:s.push(o[r].call(this));break;case 2:s.push(o[r].call(this,arguments[1]));break;case 3:s.push(o[r].call(this,arguments[1],arguments[2]));break;default:s.push(o[r].apply(this,t))}}else if(!this._all&&"error"===e)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(s)},u.prototype.on=function(e,t){return this._on(e,t,!1)},u.prototype.prependListener=function(e,t){return this._on(e,t,!0)},u.prototype.onAny=function(e){return this._onAny(e,!1)},u.prototype.prependAny=function(e){return this._onAny(e,!0)},u.prototype.addListener=u.prototype.on,u.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},u.prototype._on=function(e,t,n){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");return this._events||a.call(this),this._newListener&&this.emit("newListener",e,t),this.wildcard?(p.call(this,e,t),this):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),n?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,l.call(this,this._events[e].length,e))):this._events[e]=t,this)},u.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var s="string"==typeof e?e.split(this.delimiter):e.slice();r=d.call(this,null,s,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],r.push({_listeners:n})}for(var a=0;a<r.length;a++){var c=r[a];if(n=c._listeners,o(n)){for(var l=-1,u=0,p=n.length;u<p;u++)if(n[u]===t||n[u].listener&&n[u].listener===t||n[u]._origin&&n[u]._origin===t){l=u;break}if(l<0)continue;return this.wildcard?c._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete c._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete c._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return function e(t){if(t!==i){var n=Object.keys(t);for(var r in n){var o=n[r],s=t[o];s instanceof Function||"object"!=typeof s||null===s||(Object.keys(s).length>0&&e(t[o]),0===Object.keys(s).length&&delete t[o])}}}(this.listenerTree),this},u.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(n=0,r=(t=this._all).length;n<r;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,r=t.length;n<r;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},u.prototype.removeListener=u.prototype.off,u.prototype.removeAllListeners=function(e){if(e===i)return!this._events||a.call(this),this;if(this.wildcard)for(var t="string"==typeof e?e.split(this.delimiter):e.slice(),n=d.call(this,null,t,this.listenerTree,0),r=0;r<n.length;r++)n[r]._listeners=null;else this._events&&(this._events[e]=null);return this},u.prototype.listeners=function(e){if(this.wildcard){var t=[],n="string"==typeof e?e.split(this.delimiter):e.slice();return d.call(this,t,n,this.listenerTree,0),t}return this._events||a.call(this),this._events[e]||(this._events[e]=[]),o(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},u.prototype.eventNames=function(){return Object.keys(this._events)},u.prototype.listenerCount=function(e){return this.listeners(e).length},u.prototype.listenersAny=function(){return this._all?this._all:[]},(r=function(){return u}.call(t,n,t,e))===i||(e.exports=r)}()},8913:(e,t,n)=>{var r=n(7147),i=n(3837),o=n(2781),s=o.Readable,a=o.Writable,c=o.PassThrough,l=n(9916),u=n(2361).EventEmitter;function d(e,t){t=t||{},u.call(this),this.fd=e,this.pend=new l,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}function p(e,t){t=t||{},s.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}function h(e,t){t=t||{},a.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=null==t.end?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}function f(e,t){u.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}t.createFromBuffer=function(e,t){return new f(e,t)},t.createFromFd=function(e,t){return new d(e,t)},t.BufferSlicer=f,t.FdSlicer=d,i.inherits(d,u),d.prototype.read=function(e,t,n,i,o){var s=this;s.pend.go((function(a){r.read(s.fd,e,t,n,i,(function(e,t,n){a(),o(e,t,n)}))}))},d.prototype.write=function(e,t,n,i,o){var s=this;s.pend.go((function(a){r.write(s.fd,e,t,n,i,(function(e,t,n){a(),o(e,t,n)}))}))},d.prototype.createReadStream=function(e){return new p(this,e)},d.prototype.createWriteStream=function(e){return new h(this,e)},d.prototype.ref=function(){this.refCount+=1},d.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&r.close(e.fd,(function(t){t?e.emit("error",t):e.emit("close")}))}},i.inherits(p,s),p.prototype._read=function(e){var t=this;if(!t.destroyed){var n=Math.min(t._readableState.highWaterMark,e);if(null!=t.endOffset&&(n=Math.min(n,t.endOffset-t.pos)),n<=0)return t.destroyed=!0,t.push(null),void t.context.unref();t.context.pend.go((function(e){if(t.destroyed)return e();var i=new Buffer(n);r.read(t.context.fd,i,0,n,t.pos,(function(n,r){n?t.destroy(n):0===r?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=r,t.push(i.slice(0,r))),e()}))}))}},p.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())},i.inherits(h,a),h.prototype._write=function(e,t,n){var i=this;if(!i.destroyed){if(i.pos+e.length>i.endOffset){var o=new Error("maximum file length exceeded");return o.code="ETOOBIG",i.destroy(),void n(o)}i.context.pend.go((function(t){if(i.destroyed)return t();r.write(i.context.fd,e,0,e.length,i.pos,(function(e,r){e?(i.destroy(),t(),n(e)):(i.bytesWritten+=r,i.pos+=r,i.emit("progress"),t(),n())}))}))}},h.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())},i.inherits(f,u),f.prototype.read=function(e,t,n,r,i){var o=r+n,s=o-this.buffer.length,a=s>0?s:n;this.buffer.copy(e,t,r,o),setImmediate((function(){i(null,a)}))},f.prototype.write=function(e,t,n,r,i){e.copy(this.buffer,r,t,t+n),setImmediate((function(){i(null,n,e)}))},f.prototype.createReadStream=function(e){var t=new c(e=e||{});t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var n=this.buffer.slice(t.start,t.pos),r=0;;){var i=r+this.maxChunkSize;if(i>=n.length){r<n.length&&t.write(n.slice(r,n.length));break}t.write(n.slice(r,i)),r=i}return t.end(),t.destroy=function(){t.destroyed=!0},t},f.prototype.createWriteStream=function(e){var t=this,n=new a(e=e||{});return n.start=e.start||0,n.endOffset=null==e.end?this.buffer.length:+e.end,n.bytesWritten=0,n.pos=n.start,n.destroyed=!1,n._write=function(e,r,i){if(!n.destroyed){var o=n.pos+e.length;if(o>n.endOffset){var s=new Error("maximum file length exceeded");return s.code="ETOOBIG",n.destroyed=!0,void i(s)}e.copy(t.buffer,n.pos,0,e.length),n.bytesWritten+=e.length,n.pos=o,n.emit("progress"),i()}},n.destroy=function(){n.destroyed=!0},n},f.prototype.ref=function(){this.refCount+=1},f.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")}},5763:(e,t,n)=>{var r,i,o=n(7147),s=n(1017),a=n(9458),c=n(3837),l=n(8284);function u(e,t){var n=o.statSync(e).mtime.getTime();return r>n+1e3*t}function d(e){return e&&e.hasOwnProperty("limit")}function p(e){return e&&e.hasOwnProperty("totalRemoved")}function h(e){return p(e)?e.totalRemoved:-2}function f(e){return h(e)>=function(e){return d(e)?e.limit:-1}(e)}function m(e){return e&&e.hasOwnProperty("maxLevel")}function g(e){return m(e)?e.maxLevel:-1}function y(e){return e&&e.age&&e.age.seconds?e.age.seconds:null}var v=e.exports=function(e,t,n){var b={};if(!f(t)&&o.existsSync(e)){var S=g(t),w=!1;if(d(t)&&(t.totalRemoved=p(t)?h(t):0),void 0===n?n=0:n++,n<1?(r=(new Date).getTime(),i=function(e){return!(!e||!e.hasOwnProperty("test"))&&e.test}(t)):w=function(e,t,n){var r=!1,i=t&&t.dir;if(i){var o=y(t),a=s.basename(e);c.isArray(i)?r=1!==i.indexOf("*")||-1!==i.indexOf(a):a!==i&&"*"!==i||(r=!0),r&&d(t)&&(r=!f(t)),r&&m(t)&&n>0&&(r=n<=g(t)),o&&r&&(r=u(e,o))}return r}(e,t,n),(-1===S||n<S)&&o.readdirSync(e).forEach((function(r){var l,h=s.join(e,r),m=!1;try{l=o.statSync(h)}catch(e){m=!0}if(m);else if(l.isDirectory()){var g=v(h,t,n);b=a(b,g),p(t)&&(t.totalRemoved+=Object.keys(g).length)}else if(function(e,t){var n=!1,r=t&&t.extensions?t.extensions:null,i=t&&t.files?t.files:null,o=t&&t.prefix?t.prefix:null,a=(t&&t.dir&&t.dir,t&&t.ignore?t.ignore:null),l=s.basename(e);if(i&&(n=c.isArray(i)?-1!==i.indexOf("*.*")||-1!==i.indexOf(l):"*.*"===i||l===i),!n&&r){var p=s.extname(e);n=c.isArray(r)?-1!==r.indexOf(p):p===r}if(!n&&o&&(n=0===l.indexOf(o)),n&&d(t)&&(n=!f(t)),n&&a&&(n=c.isArray(a)?!(-1!==a.indexOf(l)):!(l===a)),n){var h=y(t);h&&(n=u(e,h))}return n}(h,t)){var S;if(i)S=!0;else try{o.unlinkSync(h),S=!0}catch(e){}S&&(b[h]=!0,p(t)&&t.totalRemoved++)}})),w)try{i||l.sync(e),p(t)||(b[e]=!0)}catch(e){throw e}}return b}},8284:(e,t,n)=>{e.exports=p,p.sync=y;var r=n(9491),i=n(1017),o=n(7147),s=n(2884),a=parseInt("666",8),c={nosort:!0,silent:!0},l=0,u="win32"===process.platform;function d(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((function(t){e[t]=e[t]||o[t],e[t+="Sync"]=e[t]||o[t]})),e.maxBusyTries=e.maxBusyTries||3,e.emfileWait=e.emfileWait||1e3,!1===e.glob&&(e.disableGlob=!0),e.disableGlob=e.disableGlob||!1,e.glob=e.glob||c}function p(e,t,n){"function"==typeof t&&(n=t,t={}),r(e,"rimraf: missing path"),r.equal(typeof e,"string","rimraf: path should be a string"),r.equal(typeof n,"function","rimraf: callback function required"),r(t,"rimraf: invalid options argument provided"),r.equal(typeof t,"object","rimraf: options should be object"),d(t);var i=0,o=null,a=0;if(t.disableGlob||!s.hasMagic(e))return c(null,[e]);function c(e,r){return e?n(e):0===(a=r.length)?n():void r.forEach((function(e){h(e,t,(function r(s){if(s){if(("EBUSY"===s.code||"ENOTEMPTY"===s.code||"EPERM"===s.code)&&i<t.maxBusyTries)return i++,setTimeout((function(){h(e,t,r)}),100*i);if("EMFILE"===s.code&&l<t.emfileWait)return setTimeout((function(){h(e,t,r)}),l++);"ENOENT"===s.code&&(s=null)}l=0,function(e){o=o||e,0==--a&&n(o)}(s)}))}))}t.lstat(e,(function(n,r){if(!n)return c(null,[e]);s(e,t.glob,c)}))}function h(e,t,n){r(e),r(t),r("function"==typeof n),t.lstat(e,(function(r,i){return r&&"ENOENT"===r.code?n(null):(r&&"EPERM"===r.code&&u&&f(e,t,r,n),i&&i.isDirectory()?g(e,t,r,n):void t.unlink(e,(function(r){if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return u?f(e,t,r,n):g(e,t,r,n);if("EISDIR"===r.code)return g(e,t,r,n)}return n(r)})))}))}function f(e,t,n,i){r(e),r(t),r("function"==typeof i),n&&r(n instanceof Error),t.chmod(e,a,(function(r){r?i("ENOENT"===r.code?null:n):t.stat(e,(function(r,o){r?i("ENOENT"===r.code?null:n):o.isDirectory()?g(e,t,n,i):t.unlink(e,i)}))}))}function m(e,t,n){r(e),r(t),n&&r(n instanceof Error);try{t.chmodSync(e,a)}catch(e){if("ENOENT"===e.code)return;throw n}try{var i=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}i.isDirectory()?v(e,t,n):t.unlinkSync(e)}function g(e,t,n,o){r(e),r(t),n&&r(n instanceof Error),r("function"==typeof o),t.rmdir(e,(function(s){!s||"ENOTEMPTY"!==s.code&&"EEXIST"!==s.code&&"EPERM"!==s.code?s&&"ENOTDIR"===s.code?o(n):o(s):function(e,t,n){r(e),r(t),r("function"==typeof n),t.readdir(e,(function(r,o){if(r)return n(r);var s,a=o.length;if(0===a)return t.rmdir(e,n);o.forEach((function(r){p(i.join(e,r),t,(function(r){if(!s)return r?n(s=r):void(0==--a&&t.rmdir(e,n))}))}))}))}(e,t,o)}))}function y(e,t){var n;if(d(t=t||{}),r(e,"rimraf: missing path"),r.equal(typeof e,"string","rimraf: path should be a string"),r(t,"rimraf: missing options"),r.equal(typeof t,"object","rimraf: options should be object"),t.disableGlob||!s.hasMagic(e))n=[e];else try{t.lstatSync(e),n=[e]}catch(r){n=s.sync(e,t.glob)}if(n.length)for(var i=0;i<n.length;i++){e=n[i];try{var o=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&u&&m(e,t,n)}try{o&&o.isDirectory()?v(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return u?m(e,t,n):v(e,t,n);if("EISDIR"!==n.code)throw n;v(e,t,n)}}}function v(e,t,n){r(e),r(t),n&&r(n instanceof Error);try{t.rmdirSync(e)}catch(o){if("ENOENT"===o.code)return;if("ENOTDIR"===o.code)throw n;"ENOTEMPTY"!==o.code&&"EEXIST"!==o.code&&"EPERM"!==o.code||function(e,t){r(e),r(t),t.readdirSync(e).forEach((function(n){y(i.join(e,n),t)}));for(var n=u?100:1,o=0;;){var s=!0;try{var a=t.rmdirSync(e,t);return s=!1,a}finally{if(++o<n&&s)continue}}}(e,t)}}},9458:function(e){!function(t){function n(e,t){var i=Array.prototype.slice.call(arguments,2),o={};return Object.keys(e||{}).forEach((function(t){o[t]=r(e[t])})),Object.keys(t||{}).forEach((function(i){var s=t[i];s=s&&"object"==typeof s&&!Array.isArray(s)&&e&&e[i]&&"object"==typeof e[i]?n(e[i],s):r(s),o[i]=s})),i.length&&(i.unshift(o),o=n.apply(null,i)),o}function r(e){return Array.isArray(e)?e.map(r):e&&"object"==typeof e?n(e):e}e.exports=n}()},292:(e,t,n)=>{"use strict";const r=n(5736),i=n(2361).EventEmitter,o=n(7147);let s=o.writev;if(!s){const e=process.binding("fs"),t=e.FSReqWrap||e.FSReqCallback;s=(n,r,i,o)=>{const s=new t;s.oncomplete=(e,t)=>o(e,t,r),e.writeBuffers(n,r,i,s)}}const a=Symbol("_autoClose"),c=Symbol("_close"),l=Symbol("_ended"),u=Symbol("_fd"),d=Symbol("_finished"),p=Symbol("_flags"),h=Symbol("_flush"),f=Symbol("_handleChunk"),m=Symbol("_makeBuf"),g=Symbol("_mode"),y=Symbol("_needDrain"),v=Symbol("_onerror"),b=Symbol("_onopen"),S=Symbol("_onread"),w=Symbol("_onwrite"),T=Symbol("_open"),_=Symbol("_path"),E=Symbol("_pos"),C=Symbol("_queue"),R=Symbol("_read"),x=Symbol("_readSize"),I=Symbol("_reading"),O=Symbol("_remain"),P=Symbol("_size"),D=Symbol("_write"),A=Symbol("_writing"),N=Symbol("_defaultFlag"),k=Symbol("_errored");class j extends r{constructor(e,t){if(super(t=t||{}),this.readable=!0,this.writable=!1,"string"!=typeof e)throw new TypeError("path must be a string");this[k]=!1,this[u]="number"==typeof t.fd?t.fd:null,this[_]=e,this[x]=t.readSize||16777216,this[I]=!1,this[P]="number"==typeof t.size?t.size:1/0,this[O]=this[P],this[a]="boolean"!=typeof t.autoClose||t.autoClose,"number"==typeof this[u]?this[R]():this[T]()}get fd(){return this[u]}get path(){return this[_]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[T](){o.open(this[_],"r",((e,t)=>this[b](e,t)))}[b](e,t){e?this[v](e):(this[u]=t,this.emit("open",t),this[R]())}[m](){return Buffer.allocUnsafe(Math.min(this[x],this[O]))}[R](){if(!this[I]){this[I]=!0;const e=this[m]();if(0===e.length)return process.nextTick((()=>this[S](null,0,e)));o.read(this[u],e,0,e.length,null,((e,t,n)=>this[S](e,t,n)))}}[S](e,t,n){this[I]=!1,e?this[v](e):this[f](t,n)&&this[R]()}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}[v](e){this[I]=!0,this[c](),this.emit("error",e)}[f](e,t){let n=!1;return this[O]-=e,e>0&&(n=super.write(e<t.length?t.slice(0,e):t)),(0===e||this[O]<=0)&&(n=!1,this[c](),super.end()),n}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":"number"==typeof this[u]&&this[R]();break;case"error":if(this[k])return;return this[k]=!0,super.emit(e,t);default:return super.emit(e,t)}}}class q extends i{constructor(e,t){super(t=t||{}),this.readable=!1,this.writable=!0,this[k]=!1,this[A]=!1,this[l]=!1,this[y]=!1,this[C]=[],this[_]=e,this[u]="number"==typeof t.fd?t.fd:null,this[g]=void 0===t.mode?438:t.mode,this[E]="number"==typeof t.start?t.start:null,this[a]="boolean"!=typeof t.autoClose||t.autoClose;const n=null!==this[E]?"r+":"w";this[N]=void 0===t.flags,this[p]=this[N]?n:t.flags,null===this[u]&&this[T]()}emit(e,t){if("error"===e){if(this[k])return;this[k]=!0}return super.emit(e,t)}get fd(){return this[u]}get path(){return this[_]}[v](e){this[c](),this[A]=!0,this.emit("error",e)}[T](){o.open(this[_],this[p],this[g],((e,t)=>this[b](e,t)))}[b](e,t){this[N]&&"r+"===this[p]&&e&&"ENOENT"===e.code?(this[p]="w",this[T]()):e?this[v](e):(this[u]=t,this.emit("open",t),this[h]())}end(e,t){return e&&this.write(e,t),this[l]=!0,this[A]||this[C].length||"number"!=typeof this[u]||this[w](null,0),this}write(e,t){return"string"==typeof e&&(e=Buffer.from(e,t)),this[l]?(this.emit("error",new Error("write() after end()")),!1):null===this[u]||this[A]||this[C].length?(this[C].push(e),this[y]=!0,!1):(this[A]=!0,this[D](e),!0)}[D](e){o.write(this[u],e,0,e.length,this[E],((e,t)=>this[w](e,t)))}[w](e,t){e?this[v](e):(null!==this[E]&&(this[E]+=t),this[C].length?this[h]():(this[A]=!1,this[l]&&!this[d]?(this[d]=!0,this[c](),this.emit("finish")):this[y]&&(this[y]=!1,this.emit("drain"))))}[h](){if(0===this[C].length)this[l]&&this[w](null,0);else if(1===this[C].length)this[D](this[C].pop());else{const e=this[C];this[C]=[],s(this[u],e,this[E],((e,t)=>this[w](e,t)))}}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}}t.ReadStream=j,t.ReadStreamSync=class extends j{[T](){let e=!0;try{this[b](null,o.openSync(this[_],"r")),e=!1}finally{e&&this[c]()}}[R](){let e=!0;try{if(!this[I]){for(this[I]=!0;;){const e=this[m](),t=0===e.length?0:o.readSync(this[u],e,0,e.length,null);if(!this[f](t,e))break}this[I]=!1}e=!1}finally{e&&this[c]()}}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.closeSync(e),this.emit("close")}}},t.WriteStream=q,t.WriteStreamSync=class extends q{[T](){let e;if(this[N]&&"r+"===this[p])try{e=o.openSync(this[_],this[p],this[g])}catch(e){if("ENOENT"===e.code)return this[p]="w",this[T]();throw e}else e=o.openSync(this[_],this[p],this[g]);this[b](null,e)}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.closeSync(e),this.emit("close")}}[D](e){let t=!0;try{this[w](null,o.writeSync(this[u],e,0,e.length,this[E])),t=!1}finally{if(t)try{this[c]()}catch(e){}}}}},7334:(e,t,n)=>{e.exports=u,u.realpath=u,u.sync=d,u.realpathSync=d,u.monkeypatch=function(){r.realpath=u,r.realpathSync=d},u.unmonkeypatch=function(){r.realpath=i,r.realpathSync=o};var r=n(7147),i=r.realpath,o=r.realpathSync,s=process.version,a=/^v[0-5]\./.test(s),c=n(7059);function l(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function u(e,t,n){if(a)return i(e,t,n);"function"==typeof t&&(n=t,t=null),i(e,t,(function(r,i){l(r)?c.realpath(e,t,n):n(r,i)}))}function d(e,t){if(a)return o(e,t);try{return o(e,t)}catch(n){if(l(n))return c.realpathSync(e,t);throw n}}},7059:(e,t,n)=>{var r=n(1017),i="win32"===process.platform,o=n(7147),s=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);if(r.normalize,i)var a=/(.*?)(?:[\/\\]+|$)/g;else a=/(.*?)(?:[\/]+|$)/g;if(i)var c=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else c=/^[\/]*/;t.realpathSync=function(e,t){if(e=r.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var n,s,l,u,d=e,p={},h={};function f(){var t=c.exec(e);n=t[0].length,s=t[0],l=t[0],u="",i&&!h[l]&&(o.lstatSync(l),h[l]=!0)}for(f();n<e.length;){a.lastIndex=n;var m=a.exec(e);if(u=s,s+=m[0],l=u+m[1],n=a.lastIndex,!(h[l]||t&&t[l]===l)){var g;if(t&&Object.prototype.hasOwnProperty.call(t,l))g=t[l];else{var y=o.lstatSync(l);if(!y.isSymbolicLink()){h[l]=!0,t&&(t[l]=l);continue}var v=null;if(!i){var b=y.dev.toString(32)+":"+y.ino.toString(32);p.hasOwnProperty(b)&&(v=p[b])}null===v&&(o.statSync(l),v=o.readlinkSync(l)),g=r.resolve(u,v),t&&(t[l]=g),i||(p[b]=v)}e=r.resolve(g,e.slice(n)),f()}}return t&&(t[d]=e),e},t.realpath=function(e,t,n){if("function"!=typeof n&&(n=function(e){return"function"==typeof e?e:function(){var e;if(s){var t=new Error;e=function(e){e&&(t.message=e.message,n(e=t))}}else e=n;return e;function n(e){if(e){if(process.throwDeprecation)throw e;if(!process.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);process.traceDeprecation?console.trace(t):console.error(t)}}}}()}(t),t=null),e=r.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return process.nextTick(n.bind(null,null,t[e]));var l,u,d,p,h=e,f={},m={};function g(){var t=c.exec(e);l=t[0].length,u=t[0],d=t[0],p="",i&&!m[d]?o.lstat(d,(function(e){if(e)return n(e);m[d]=!0,y()})):process.nextTick(y)}function y(){if(l>=e.length)return t&&(t[h]=e),n(null,e);a.lastIndex=l;var r=a.exec(e);return p=u,u+=r[0],d=p+r[1],l=a.lastIndex,m[d]||t&&t[d]===d?process.nextTick(y):t&&Object.prototype.hasOwnProperty.call(t,d)?S(t[d]):o.lstat(d,v)}function v(e,r){if(e)return n(e);if(!r.isSymbolicLink())return m[d]=!0,t&&(t[d]=d),process.nextTick(y);if(!i){var s=r.dev.toString(32)+":"+r.ino.toString(32);if(f.hasOwnProperty(s))return b(null,f[s],d)}o.stat(d,(function(e){if(e)return n(e);o.readlink(d,(function(e,t){i||(f[s]=t),b(e,t)}))}))}function b(e,i,o){if(e)return n(e);var s=r.resolve(p,i);t&&(t[o]=s),S(s)}function S(t){e=r.resolve(t,e.slice(l)),g()}g()}},6772:(e,t,n)=>{function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.alphasort=l,t.alphasorti=c,t.setopts=function(e,t,n){if(n||(n={}),n.matchBase&&-1===t.indexOf("/")){if(n.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!n.silent,e.pattern=t,e.strict=!1!==n.strict,e.realpath=!!n.realpath,e.realpathCache=n.realpathCache||Object.create(null),e.follow=!!n.follow,e.dot=!!n.dot,e.mark=!!n.mark,e.nodir=!!n.nodir,e.nodir&&(e.mark=!0),e.sync=!!n.sync,e.nounique=!!n.nounique,e.nonull=!!n.nonull,e.nosort=!!n.nosort,e.nocase=!!n.nocase,e.stat=!!n.stat,e.noprocess=!!n.noprocess,e.absolute=!!n.absolute,e.maxLength=n.maxLength||1/0,e.cache=n.cache||Object.create(null),e.statCache=n.statCache||Object.create(null),e.symlinks=n.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(u))}(e,n),e.changedCwd=!1;var o=process.cwd();r(n,"cwd")?(e.cwd=i.resolve(n.cwd),e.changedCwd=e.cwd!==o):e.cwd=o,e.root=n.root||i.resolve(e.cwd,"/"),e.root=i.resolve(e.root),"win32"===process.platform&&(e.root=e.root.replace(/\\/g,"/")),e.cwdAbs=s(e.cwd)?e.cwd:d(e,e.cwd),"win32"===process.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),e.nomount=!!n.nomount,n.nonegate=!0,n.nocomment=!0,e.minimatch=new a(t,n),e.options=e.minimatch.options},t.ownProp=r,t.makeAbs=d,t.finish=function(e){for(var t=e.nounique,n=t?[]:Object.create(null),r=0,i=e.matches.length;r<i;r++){var o=e.matches[r];if(o&&0!==Object.keys(o).length){var s=Object.keys(o);t?n.push.apply(n,s):s.forEach((function(e){n[e]=!0}))}else if(e.nonull){var a=e.minimatch.globSet[r];t?n.push(a):n[a]=!0}}if(t||(n=Object.keys(n)),e.nosort||(n=n.sort(e.nocase?c:l)),e.mark){for(r=0;r<n.length;r++)n[r]=e._mark(n[r]);e.nodir&&(n=n.filter((function(t){var n=!/\/$/.test(t),r=e.cache[t]||e.cache[d(e,t)];return n&&r&&(n="DIR"!==r&&!Array.isArray(r)),n})))}e.ignore.length&&(n=n.filter((function(t){return!p(e,t)}))),e.found=n},t.mark=function(e,t){var n=d(e,t),r=e.cache[n],i=t;if(r){var o="DIR"===r||Array.isArray(r),s="/"===t.slice(-1);if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==t){var a=d(e,i);e.statCache[a]=e.statCache[n],e.cache[a]=e.cache[n]}}return i},t.isIgnored=p,t.childrenIgnored=function(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return!(!e.gmatcher||!e.gmatcher.match(t))}))};var i=n(1017),o=n(1171),s=n(4095),a=o.Minimatch;function c(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}function l(e,t){return e.localeCompare(t)}function u(e){var t=null;if("/**"===e.slice(-3)){var n=e.replace(/(\/\*\*)+$/,"");t=new a(n,{dot:!0})}return{matcher:new a(e,{dot:!0}),gmatcher:t}}function d(e,t){var n=t;return n="/"===t.charAt(0)?i.join(e.root,t):s(t)||""===t?t:e.changedCwd?i.resolve(e.cwd,t):i.resolve(t),"win32"===process.platform&&(n=n.replace(/\\/g,"/")),n}function p(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return e.matcher.match(t)||!(!e.gmatcher||!e.gmatcher.match(t))}))}},2884:(e,t,n)=>{e.exports=b;var r=n(7147),i=n(7334),o=n(1171),s=(o.Minimatch,n(4378)),a=n(2361).EventEmitter,c=n(1017),l=n(9491),u=n(4095),d=n(4751),p=n(6772),h=(p.alphasort,p.alphasorti,p.setopts),f=p.ownProp,m=n(7844),g=(n(3837),p.childrenIgnored),y=p.isIgnored,v=n(778);function b(e,t,n){if("function"==typeof t&&(n=t,t={}),t||(t={}),t.sync){if(n)throw new TypeError("callback provided to sync glob");return d(e,t)}return new w(e,t,n)}b.sync=d;var S=b.GlobSync=d.GlobSync;function w(e,t,n){if("function"==typeof t&&(n=t,t=null),t&&t.sync){if(n)throw new TypeError("callback provided to sync glob");return new S(e,t)}if(!(this instanceof w))return new w(e,t,n);h(this,e,t),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=new Array(r),"function"==typeof n&&(n=v(n),this.on("error",n),this.on("end",(function(e){n(null,e)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===r)return a();for(var o=!0,s=0;s<r;s++)this._process(this.minimatch.set[s],s,!1,a);function a(){--i._processing,i._processing<=0&&(o?process.nextTick((function(){i._finish()})):i._finish())}o=!1}b.glob=b,b.hasMagic=function(e,t){var n=function(e,t){if(null===t||"object"!=typeof t)return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}({},t);n.noprocess=!0;var r=new w(e,n).minimatch.set;if(!e)return!1;if(r.length>1)return!0;for(var i=0;i<r[0].length;i++)if("string"!=typeof r[0][i])return!0;return!1},b.Glob=w,s(w,a),w.prototype._finish=function(){if(l(this instanceof w),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();p.finish(this),this.emit("end",this.found)}},w.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var e=this.matches.length;if(0===e)return this._finish();for(var t=this,n=0;n<this.matches.length;n++)this._realpathSet(n,r)}function r(){0==--e&&t._finish()}},w.prototype._realpathSet=function(e,t){var n=this.matches[e];if(!n)return t();var r=Object.keys(n),o=this,s=r.length;if(0===s)return t();var a=this.matches[e]=Object.create(null);r.forEach((function(n,r){n=o._makeAbs(n),i.realpath(n,o.realpathCache,(function(r,i){r?"stat"===r.syscall?a[n]=!0:o.emit("error",r):a[i]=!0,0==--s&&(o.matches[e]=a,t())}))}))},w.prototype._mark=function(e){return p.mark(this,e)},w.prototype._makeAbs=function(e){return p.makeAbs(this,e)},w.prototype.abort=function(){this.aborted=!0,this.emit("abort")},w.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},w.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var n=e[t];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var r=this._processQueue.slice(0);for(this._processQueue.length=0,t=0;t<r.length;t++){var i=r[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},w.prototype._process=function(e,t,n,r){if(l(this instanceof w),l("function"==typeof r),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([e,t,n,r]);else{for(var i,s=0;"string"==typeof e[s];)s++;switch(s){case e.length:return void this._processSimple(e.join("/"),t,r);case 0:i=null;break;default:i=e.slice(0,s).join("/")}var a,c=e.slice(s);null===i?a=".":u(i)||u(e.join("/"))?(i&&u(i)||(i="/"+i),a=i):a=i;var d=this._makeAbs(a);if(g(this,a))return r();c[0]===o.GLOBSTAR?this._processGlobStar(i,a,d,c,t,n,r):this._processReaddir(i,a,d,c,t,n,r)}},w.prototype._processReaddir=function(e,t,n,r,i,o,s){var a=this;this._readdir(n,o,(function(c,l){return a._processReaddir2(e,t,n,r,i,o,l,s)}))},w.prototype._processReaddir2=function(e,t,n,r,i,o,s,a){if(!s)return a();for(var l=r[0],u=!!this.minimatch.negate,d=l._glob,p=this.dot||"."===d.charAt(0),h=[],f=0;f<s.length;f++)("."!==(g=s[f]).charAt(0)||p)&&(u&&!e?!g.match(l):g.match(l))&&h.push(g);var m=h.length;if(0===m)return a();if(1===r.length&&!this.mark&&!this.stat){for(this.matches[i]||(this.matches[i]=Object.create(null)),f=0;f<m;f++){var g=h[f];e&&(g="/"!==e?e+"/"+g:e+g),"/"!==g.charAt(0)||this.nomount||(g=c.join(this.root,g)),this._emitMatch(i,g)}return a()}for(r.shift(),f=0;f<m;f++)g=h[f],e&&(g="/"!==e?e+"/"+g:e+g),this._process([g].concat(r),i,o,a);a()},w.prototype._emitMatch=function(e,t){if(!this.aborted&&!y(this,t))if(this.paused)this._emitQueue.push([e,t]);else{var n=u(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if("DIR"===r||Array.isArray(r))return}this.matches[e][t]=!0;var i=this.statCache[n];i&&this.emit("stat",t,i),this.emit("match",t)}}},w.prototype._readdirInGlobStar=function(e,t){if(!this.aborted){if(this.follow)return this._readdir(e,!1,t);var n=this,i=m("lstat\0"+e,(function(r,i){if(r&&"ENOENT"===r.code)return t();var o=i&&i.isSymbolicLink();n.symlinks[e]=o,o||!i||i.isDirectory()?n._readdir(e,!1,t):(n.cache[e]="FILE",t())}));i&&r.lstat(e,i)}},w.prototype._readdir=function(e,t,n){if(!this.aborted&&(n=m("readdir\0"+e+"\0"+t,n))){if(t&&!f(this.symlinks,e))return this._readdirInGlobStar(e,n);if(f(this.cache,e)){var i=this.cache[e];if(!i||"FILE"===i)return n();if(Array.isArray(i))return n(null,i)}r.readdir(e,function(e,t,n){return function(r,i){r?e._readdirError(t,r,n):e._readdirEntries(t,i,n)}}(this,e,n))}},w.prototype._readdirEntries=function(e,t,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];i="/"===e?e+i:e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,n(null,t)}},w.prototype._readdirError=function(e,t,n){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t)}return n()}},w.prototype._processGlobStar=function(e,t,n,r,i,o,s){var a=this;this._readdir(n,o,(function(c,l){a._processGlobStar2(e,t,n,r,i,o,l,s)}))},w.prototype._processGlobStar2=function(e,t,n,r,i,o,s,a){if(!s)return a();var c=r.slice(1),l=e?[e]:[],u=l.concat(c);this._process(u,i,!1,a);var d=this.symlinks[n],p=s.length;if(d&&o)return a();for(var h=0;h<p;h++)if("."!==s[h].charAt(0)||this.dot){var f=l.concat(s[h],c);this._process(f,i,!0,a);var m=l.concat(s[h],r);this._process(m,i,!0,a)}a()},w.prototype._processSimple=function(e,t,n){var r=this;this._stat(e,(function(i,o){r._processSimple2(e,t,i,o,n)}))},w.prototype._processSimple2=function(e,t,n,r,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!r)return i();if(e&&u(e)&&!this.nomount){var o=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=c.join(this.root,e):(e=c.resolve(this.root,e),o&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()},w.prototype._stat=function(e,t){var n=this._makeAbs(e),i="/"===e.slice(-1);if(e.length>this.maxLength)return t();if(!this.stat&&f(this.cache,n)){var o=this.cache[n];if(Array.isArray(o)&&(o="DIR"),!i||"DIR"===o)return t(null,o);if(i&&"FILE"===o)return t()}var s=this.statCache[n];if(void 0!==s){if(!1===s)return t(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&"FILE"===a?t():t(null,a,s)}var c=this,l=m("stat\0"+n,(function(i,o){if(o&&o.isSymbolicLink())return r.stat(n,(function(r,i){r?c._stat2(e,n,null,o,t):c._stat2(e,n,r,i,t)}));c._stat2(e,n,i,o,t)}));l&&r.lstat(n,l)},w.prototype._stat2=function(e,t,n,r,i){if(n&&("ENOENT"===n.code||"ENOTDIR"===n.code))return this.statCache[t]=!1,i();var o="/"===e.slice(-1);if(this.statCache[t]=r,"/"===t.slice(-1)&&r&&!r.isDirectory())return i(null,!1,r);var s=!0;return r&&(s=r.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||s,o&&"FILE"===s?i():i(null,s,r)}},4751:(e,t,n)=>{e.exports=f,f.GlobSync=m;var r=n(7147),i=n(7334),o=n(1171),s=(o.Minimatch,n(2884).Glob,n(3837),n(1017)),a=n(9491),c=n(4095),l=n(6772),u=(l.alphasort,l.alphasorti,l.setopts),d=l.ownProp,p=l.childrenIgnored,h=l.isIgnored;function f(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new m(e,t).found}function m(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof m))return new m(e,t);if(u(this,e,t),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var r=0;r<n;r++)this._process(this.minimatch.set[r],r,!1);this._finish()}m.prototype._finish=function(){if(a(this instanceof m),this.realpath){var e=this;this.matches.forEach((function(t,n){var r=e.matches[n]=Object.create(null);for(var o in t)try{o=e._makeAbs(o),r[i.realpathSync(o,e.realpathCache)]=!0}catch(t){if("stat"!==t.syscall)throw t;r[e._makeAbs(o)]=!0}}))}l.finish(this)},m.prototype._process=function(e,t,n){a(this instanceof m);for(var r,i=0;"string"==typeof e[i];)i++;switch(i){case e.length:return void this._processSimple(e.join("/"),t);case 0:r=null;break;default:r=e.slice(0,i).join("/")}var s,l=e.slice(i);null===r?s=".":c(r)||c(e.join("/"))?(r&&c(r)||(r="/"+r),s=r):s=r;var u=this._makeAbs(s);p(this,s)||(l[0]===o.GLOBSTAR?this._processGlobStar(r,s,u,l,t,n):this._processReaddir(r,s,u,l,t,n))},m.prototype._processReaddir=function(e,t,n,r,i,o){var a=this._readdir(n,o);if(a){for(var c=r[0],l=!!this.minimatch.negate,u=c._glob,d=this.dot||"."===u.charAt(0),p=[],h=0;h<a.length;h++)("."!==(g=a[h]).charAt(0)||d)&&(l&&!e?!g.match(c):g.match(c))&&p.push(g);var f=p.length;if(0!==f)if(1!==r.length||this.mark||this.stat)for(r.shift(),h=0;h<f;h++){var m;g=p[h],m=e?[e,g]:[g],this._process(m.concat(r),i,o)}else{this.matches[i]||(this.matches[i]=Object.create(null));for(h=0;h<f;h++){var g=p[h];e&&(g="/"!==e.slice(-1)?e+"/"+g:e+g),"/"!==g.charAt(0)||this.nomount||(g=s.join(this.root,g)),this._emitMatch(i,g)}}}},m.prototype._emitMatch=function(e,t){if(!h(this,t)){var n=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if("DIR"===r||Array.isArray(r))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}},m.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,n;try{n=r.lstatSync(e)}catch(e){if("ENOENT"===e.code)return null}var i=n&&n.isSymbolicLink();return this.symlinks[e]=i,i||!n||n.isDirectory()?t=this._readdir(e,!1):this.cache[e]="FILE",t},m.prototype._readdir=function(e,t){if(t&&!d(this.symlinks,e))return this._readdirInGlobStar(e);if(d(this.cache,e)){var n=this.cache[e];if(!n||"FILE"===n)return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,r.readdirSync(e))}catch(t){return this._readdirError(e,t),null}},m.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var r=t[n];r="/"===e?e+r:e+"/"+r,this.cache[r]=!0}return this.cache[e]=t,t},m.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var r=new Error(t.code+" invalid cwd "+this.cwd);throw r.path=this.cwd,r.code=t.code,r}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t)}},m.prototype._processGlobStar=function(e,t,n,r,i,o){var s=this._readdir(n,o);if(s){var a=r.slice(1),c=e?[e]:[],l=c.concat(a);this._process(l,i,!1);var u=s.length;if(!this.symlinks[n]||!o)for(var d=0;d<u;d++)if("."!==s[d].charAt(0)||this.dot){var p=c.concat(s[d],a);this._process(p,i,!0);var h=c.concat(s[d],r);this._process(h,i,!0)}}},m.prototype._processSimple=function(e,t){var n=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),n){if(e&&c(e)&&!this.nomount){var r=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=s.join(this.root,e):(e=s.resolve(this.root,e),r&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}},m.prototype._stat=function(e){var t=this._makeAbs(e),n="/"===e.slice(-1);if(e.length>this.maxLength)return!1;if(!this.stat&&d(this.cache,t)){var i=this.cache[t];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return i;if(n&&"FILE"===i)return!1}var o=this.statCache[t];if(!o){var s;try{s=r.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{o=r.statSync(t)}catch(e){o=s}else o=s}return this.statCache[t]=o,i=!0,o&&(i=o.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||i,(!n||"FILE"!==i)&&i},m.prototype._mark=function(e){return l.mark(this,e)},m.prototype._makeAbs=function(e){return l.makeAbs(this,e)}},8370:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(1808)),s=i(n(4404)),a=i(n(7310)),c=i(n(5158)),l=i(n(2046)),u=n(8054),d=(0,c.default)("http-proxy-agent");class p extends u.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("Creating new HttpProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this,i=a.default.parse(e.path);let c;if(i.protocol||(i.protocol="http:"),i.hostname||(i.hostname=t.hostname||t.host||null),null==i.port&&(t.port,1)&&(i.port=String(t.port)),"80"===i.port&&(i.port=""),e.path=a.default.format(i),n.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`),r?(d("Creating `tls.Socket`: %o",n),c=s.default.connect(n)):(d("Creating `net.Socket`: %o",n),c=o.default.connect(n)),e._header){let t,n;d("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(d("Patching connection write() output buffer with updated header"),t=e.output[0],n=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(n),d("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(d("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,n=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(n),d("Output buffer: %o",e.outputData[0].data))}return yield(0,l.default)(c,"connect"),c}))}}t.default=p},9201:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(8370));function i(e){return new r.default(e)}!function(e){e.HttpProxyAgent=r.default,e.prototype=r.default.prototype}(i||(i={})),e.exports=i},9146:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(1808)),s=i(n(4404)),a=i(n(7310)),c=i(n(9491)),l=i(n(5158)),u=n(8054),d=i(n(9829)),p=l.default("https-proxy-agent:agent");class h extends u.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");p("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this;let i;r?(p("Creating `tls.Socket`: %o",n),i=s.default.connect(n)):(p("Creating `net.Socket`: %o",n),i=o.default.connect(n));const a=Object.assign({},n.headers);let l=`CONNECT ${t.host}:${t.port} HTTP/1.1\r\n`;n.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:u,port:h,secureEndpoint:m}=t;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,m)||(u+=`:${h}`),a.Host=u,a.Connection="close";for(const e of Object.keys(a))l+=`${e}: ${a[e]}\r\n`;const g=d.default(i);i.write(`${l}\r\n`);const{statusCode:y,buffered:v}=yield g;if(200===y){if(e.once("socket",f),t.secureEndpoint){p("Upgrading socket connection to TLS");const e=t.servername||t.host;return s.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(t,"host","hostname","path","port")),{socket:i,servername:e}))}return i}i.destroy();const b=new o.default.Socket({writable:!1});return b.readable=!0,e.once("socket",(e=>{p("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(v),e.push(null)})),b}))}}function f(e){e.resume()}t.default=h},6018:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(9146));function i(e){return new r.default(e)}!function(e){e.HttpsProxyAgent=r.default,e.prototype=r.default.prototype}(i||(i={})),e.exports=i},9829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(5158)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,n)=>{let r=0;const o=[];function s(){const n=e.read();n?function(e){o.push(e),r+=e.length;const n=Buffer.concat(o,r);if(-1===n.indexOf("\r\n\r\n"))return i("have not received end of HTTP headers yet..."),void s();const a=n.toString("ascii",0,n.indexOf("\r\n")),c=+a.split(" ")[1];i("got proxy server response: %o",a),t({statusCode:c,buffered:n})}(n):e.once("readable",s)}function a(e){i("onclose had error %o",e)}function c(){i("onend")}e.on("error",(function t(r){e.removeListener("end",c),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",s),i("onerror %o",r),n(r)})),e.on("close",a),e.on("end",c),s()}))}},7844:(e,t,n)=>{var r=n(2479),i=Object.create(null),o=n(778);e.exports=r((function(e,t){return i[e]?(i[e].push(t),null):(i[e]=[t],function(e){return o((function t(){var n=i[e],r=n.length,o=function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r]=e[r];return n}(arguments);try{for(var s=0;s<r;s++)n[s].apply(null,o)}finally{n.length>r?(n.splice(0,r),process.nextTick((function(){t.apply(null,o)}))):delete i[e]}}))}(e))}))},4378:(e,t,n)=>{try{var r=n(3837);if("function"!=typeof r.inherits)throw"";e.exports=r.inherits}catch(t){e.exports=n(5717)}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1171:(e,t,n)=>{e.exports=p,p.Minimatch=h;var r=function(){try{return n(1017)}catch(e){}}()||{sep:"/"};p.sep=r.sep;var i=p.GLOBSTAR=h.GLOBSTAR={},o=n(3644),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c=a+"*?",l="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),u=/\/+/;function d(e,t){t=t||{};var n={};return Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(e){n[e]=t[e]})),n}function p(e,t,n){return m(t),n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&new h(t,n).match(e)}function h(e,t){if(!(this instanceof h))return new h(e,t);m(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===r.sep||(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function f(e,t){return t||(t=this instanceof h?this.options:{}),e=void 0===e?this.pattern:e,m(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:o(e)}p.filter=function(e,t){return t=t||{},function(n,r,i){return p(n,e,t)}},p.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return p;var t=p,n=function(n,r,i){return t(n,r,d(e,i))};return(n.Minimatch=function(n,r){return new t.Minimatch(n,d(e,r))}).defaults=function(n){return t.defaults(d(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,d(e,r))},n.defaults=function(n){return t.defaults(d(e,n))},n.makeRe=function(n,r){return t.makeRe(n,d(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,d(e,r))},n.match=function(n,r,i){return t.match(n,r,d(e,i))},n},h.defaults=function(e){return p.defaults(e).Minimatch},h.prototype.debug=function(){},h.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(u)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n}else this.empty=!0;else this.comment=!0},h.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(!this.options.nonegate){for(var r=0,i=e.length;r<i&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}},p.braceExpand=function(e,t){return f(e,t)},h.prototype.braceExpand=f;var m=function(e){if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};h.prototype.parse=function(e,t){m(e);var n=this.options;if("**"===e){if(!n.noglobstar)return i;e="*"}if(""===e)return"";var r,o="",u=!!n.nocase,d=!1,p=[],h=[],f=!1,y=-1,v=-1,b="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",S=this;function w(){if(r){switch(r){case"*":o+=c,u=!0;break;case"?":o+=a,u=!0;break;default:o+="\\"+r}S.debug("clearStateChar %j %j",r,o),r=!1}}for(var T,_=0,E=e.length;_<E&&(T=e.charAt(_));_++)if(this.debug("%s\t%s %s %j",e,_,o,T),d&&l[T])o+="\\"+T,d=!1;else switch(T){case"/":return!1;case"\\":w(),d=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,_,o,T),f){this.debug("  in class"),"!"===T&&_===v+1&&(T="^"),o+=T;continue}S.debug("call clearStateChar %j",r),w(),r=T,n.noext&&w();continue;case"(":if(f){o+="(";continue}if(!r){o+="\\(";continue}p.push({type:r,start:_-1,reStart:o.length,open:s[r].open,close:s[r].close}),o+="!"===r?"(?:(?!(?:":"(?:",this.debug("plType %j %j",r,o),r=!1;continue;case")":if(f||!p.length){o+="\\)";continue}w(),u=!0;var C=p.pop();o+=C.close,"!"===C.type&&h.push(C),C.reEnd=o.length;continue;case"|":if(f||!p.length||d){o+="\\|",d=!1;continue}w(),o+="|";continue;case"[":if(w(),f){o+="\\"+T;continue}f=!0,v=_,y=o.length,o+=T;continue;case"]":if(_===v+1||!f){o+="\\"+T,d=!1;continue}var R=e.substring(v+1,_);try{RegExp("["+R+"]")}catch(e){var x=this.parse(R,g);o=o.substr(0,y)+"\\["+x[0]+"\\]",u=u||x[1],f=!1;continue}u=!0,f=!1,o+=T;continue;default:w(),d?d=!1:!l[T]||"^"===T&&f||(o+="\\"),o+=T}for(f&&(R=e.substr(v+1),x=this.parse(R,g),o=o.substr(0,y)+"\\["+x[0],u=u||x[1]),C=p.pop();C;C=p.pop()){var I=o.slice(C.reStart+C.open.length);this.debug("setting tail",o,C),I=I.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,n){return n||(n="\\"),t+t+n+"|"})),this.debug("tail=%j\n   %s",I,I,C,o);var O="*"===C.type?c:"?"===C.type?a:"\\"+C.type;u=!0,o=o.slice(0,C.reStart)+O+"\\("+I}w(),d&&(o+="\\\\");var P=!1;switch(o.charAt(0)){case"[":case".":case"(":P=!0}for(var D=h.length-1;D>-1;D--){var A=h[D],N=o.slice(0,A.reStart),k=o.slice(A.reStart,A.reEnd-8),j=o.slice(A.reEnd-8,A.reEnd),q=o.slice(A.reEnd);j+=q;var M=N.split("(").length-1,L=q;for(_=0;_<M;_++)L=L.replace(/\)[+*?]?/,"");var F="";""===(q=L)&&t!==g&&(F="$"),o=N+k+q+F+j}if(""!==o&&u&&(o="(?=.)"+o),P&&(o=b+o),t===g)return[o,u];if(!u)return e.replace(/\\(.)/g,"$1");var U=n.nocase?"i":"";try{var B=new RegExp("^"+o+"$",U)}catch(e){return new RegExp("$.")}return B._glob=e,B._src=o,B};var g={};p.makeRe=function(e,t){return new h(e,t||{}).makeRe()},h.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===i?n:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(e){this.regexp=!1}return this.regexp},p.match=function(e,t,n){var r=new h(t,n=n||{});return e=e.filter((function(e){return r.match(e)})),r.options.nonull&&!e.length&&e.push(t),e},h.prototype.match=function(e,t){if(void 0===t&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==r.sep&&(e=e.split(r.sep).join("/")),e=e.split(u),this.debug(this.pattern,"split",e);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=e.length-1;o>=0&&!(i=e[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=e;if(n.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},h.prototype.matchOne=function(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var l,u=t[s],d=e[o];if(this.debug(t,u,d),!1===u)return!1;if(u===i){this.debug("GLOBSTAR",[t,u,d]);var p=o,h=s+1;if(h===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!r.dot&&"."===e[o].charAt(0))return!1;return!0}for(;p<a;){var f=e[p];if(this.debug("\nglobstar while",e,p,t,h,f),this.matchOne(e.slice(p),t.slice(h),n))return this.debug("globstar found match!",p,a,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==a))}if("string"==typeof u?(l=d===u,this.debug("string match",u,d,l)):(l=d.match(u),this.debug("pattern match",u,d,l)),!l)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},5736:(e,t,n)=>{"use strict";const r=n(2361),i=n(2781),o=n(4411),s=n(1576).StringDecoder,a=Symbol("EOF"),c=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),u=Symbol("emittingEnd"),d=Symbol("closed"),p=Symbol("read"),h=Symbol("flush"),f=Symbol("flushChunk"),m=Symbol("encoding"),g=Symbol("decoder"),y=Symbol("flowing"),v=Symbol("paused"),b=Symbol("resume"),S=Symbol("bufferLength"),w=Symbol("bufferPush"),T=Symbol("bufferShift"),_=Symbol("objectMode"),E=Symbol("destroyed"),C="1"!==global._MP_NO_ITERATOR_SYMBOLS_,R=C&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),x=C&&Symbol.iterator||Symbol("iterator not implemented"),I=e=>"end"===e||"finish"===e||"prefinish"===e;e.exports=class e extends i{constructor(e){super(),this[y]=!1,this[v]=!1,this.pipes=new o,this.buffer=new o,this[_]=e&&e.objectMode||!1,this[_]?this[m]=null:this[m]=e&&e.encoding||null,"buffer"===this[m]&&(this[m]=null),this[g]=this[m]?new s(this[m]):null,this[a]=!1,this[l]=!1,this[u]=!1,this[d]=!1,this.writable=!0,this.readable=!0,this[S]=0,this[E]=!1}get bufferLength(){return this[S]}get encoding(){return this[m]}set encoding(e){if(this[_])throw new Error("cannot set encoding in objectMode");if(this[m]&&e!==this[m]&&(this[g]&&this[g].lastNeed||this[S]))throw new Error("cannot change encoding");this[m]!==e&&(this[g]=e?new s(e):null,this.buffer.length&&(this.buffer=this.buffer.map((e=>this[g].write(e))))),this[m]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[_]}set objectMode(e){this[_]=this[_]||!!e}write(e,t,n){if(this[a])throw new Error("write after end");if(this[E])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;var r;if("function"==typeof t&&(n=t,t="utf8"),t||(t="utf8"),this[_]||Buffer.isBuffer(e)||(r=e,!Buffer.isBuffer(r)&&ArrayBuffer.isView(r)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(e=>e instanceof ArrayBuffer||"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e)?e=Buffer.from(e):"string"!=typeof e&&(this.objectMode=!0)),!this.objectMode&&!e.length){const e=this.flowing;return 0!==this[S]&&this.emit("readable"),n&&n(),e}"string"!=typeof e||this[_]||t===this[m]&&!this[g].lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[m]&&(e=this[g].write(e));try{return this.flowing?(this.emit("data",e),this.flowing):(this[w](e),!1)}finally{0!==this[S]&&this.emit("readable"),n&&n()}}read(e){if(this[E])return null;try{return 0===this[S]||0===e||e>this[S]?null:(this[_]&&(e=null),this.buffer.length>1&&!this[_]&&(this.encoding?this.buffer=new o([Array.from(this.buffer).join("")]):this.buffer=new o([Buffer.concat(Array.from(this.buffer),this[S])])),this[p](e||null,this.buffer.head.value))}finally{this[c]()}}[p](e,t){return e===t.length||null===e?this[T]():(this.buffer.head.value=t.slice(e),t=t.slice(0,e),this[S]-=e),this.emit("data",t),this.buffer.length||this[a]||this.emit("drain"),t}end(e,t,n){return"function"==typeof e&&(n=e,e=null),"function"==typeof t&&(n=t,t="utf8"),e&&this.write(e,t),n&&this.once("end",n),this[a]=!0,this.writable=!1,!this.flowing&&this[v]||this[c](),this}[b](){this[E]||(this[v]=!1,this[y]=!0,this.emit("resume"),this.buffer.length?this[h]():this[a]?this[c]():this.emit("drain"))}resume(){return this[b]()}pause(){this[y]=!1,this[v]=!0}get destroyed(){return this[E]}get flowing(){return this[y]}get paused(){return this[v]}[w](e){return this[_]?this[S]+=1:this[S]+=e.length,this.buffer.push(e)}[T](){return this.buffer.length&&(this[_]?this[S]-=1:this[S]-=this.buffer.head.value.length),this.buffer.shift()}[h](){do{}while(this[f](this[T]()));this.buffer.length||this[a]||this.emit("drain")}[f](e){return!!e&&(this.emit("data",e),this.flowing)}pipe(e,t){if(this[E])return;const n=this[l];t=t||{},e===process.stdout||e===process.stderr?t.end=!1:t.end=!1!==t.end;const r={dest:e,opts:t,ondrain:e=>this[b]()};return this.pipes.push(r),e.on("drain",r.ondrain),this[b](),n&&r.opts.end&&r.dest.end(),e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{"data"!==e||this.pipes.length||this.flowing?I(e)&&this[l]&&(super.emit(e),this.removeAllListeners(e)):this[b]()}}get emittedEnd(){return this[l]}[c](){this[u]||this[l]||this[E]||0!==this.buffer.length||!this[a]||(this[u]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[d]&&this.emit("close"),this[u]=!1)}emit(e,t){if("error"!==e&&"close"!==e&&e!==E&&this[E])return;if("data"===e){if(!t)return;this.pipes.length&&this.pipes.forEach((e=>!1===e.dest.write(t)&&this.pause()))}else if("end"===e){if(!0===this[l])return;this[l]=!0,this.readable=!1,this[g]&&(t=this[g].end())&&(this.pipes.forEach((e=>e.dest.write(t))),super.emit("data",t)),this.pipes.forEach((e=>{e.dest.removeListener("drain",e.ondrain),e.opts.end&&e.dest.end()}))}else if("close"===e&&(this[d]=!0,!this[l]&&!this[E]))return;const n=new Array(arguments.length);if(n[0]=e,n[1]=t,arguments.length>2)for(let e=2;e<arguments.length;e++)n[e]=arguments[e];try{return super.emit.apply(this,n)}finally{I(e)?this.removeAllListeners(e):this[c]()}}collect(){const e=[];this[_]||(e.dataLength=0);const t=this.promise();return this.on("data",(t=>{e.push(t),this[_]||(e.dataLength+=t.length)})),t.then((()=>e))}concat(){return this[_]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[_]?Promise.reject(new Error("cannot concat in objectMode")):this[m]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(E,(()=>t(new Error("stream destroyed")))),this.on("end",(()=>e())),this.on("error",(e=>t(e)))}))}[R](){return{next:()=>{const e=this.read();if(null!==e)return Promise.resolve({done:!1,value:e});if(this[a])return Promise.resolve({done:!0});let t=null,n=null;const r=e=>{this.removeListener("data",i),this.removeListener("end",o),n(e)},i=e=>{this.removeListener("error",r),this.removeListener("end",o),this.pause(),t({value:e,done:!!this[a]})},o=()=>{this.removeListener("error",r),this.removeListener("data",i),t({done:!0})},s=()=>r(new Error("stream destroyed"));return new Promise(((e,a)=>{n=a,t=e,this.once(E,s),this.once("error",r),this.once("end",o),this.once("data",i)}))}}}[x](){return{next:()=>{const e=this.read();return{value:e,done:null===e}}}}destroy(e){return this[E]?(e?this.emit("error",e):this.emit(E),this):(this[E]=!0,this.buffer=new o,this[S]=0,"function"!=typeof this.close||this[d]||this.close(),e?this.emit("error",e):this.emit(E),this)}static isStream(t){return!!t&&(t instanceof e||t instanceof i||t instanceof r&&("function"==typeof t.pipe||"function"==typeof t.write&&"function"==typeof t.end))}}},883:(e,t,n)=>{const r=n(9796).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},r))},1650:(e,t,n)=>{"use strict";const r=n(9491),i=n(4300).Buffer,o=n(9796),s=t.constants=n(883),a=n(5736),c=i.concat,l=Symbol("_superWrite");class u extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const d=Symbol("opts"),p=Symbol("flushFlag"),h=Symbol("finishFlushFlag"),f=Symbol("fullFlushFlag"),m=Symbol("handle"),g=Symbol("onError"),y=Symbol("sawError"),v=Symbol("level"),b=Symbol("strategy"),S=Symbol("ended");Symbol("_defaultFullFlush");class w extends a{constructor(e,t){if(!e||"object"!=typeof e)throw new TypeError("invalid options for ZlibBase constructor");super(e),this[y]=!1,this[S]=!1,this[d]=e,this[p]=e.flush,this[h]=e.finishFlush;try{this[m]=new o[t](e)}catch(e){throw new u(e)}this[g]=e=>{this[y]||(this[y]=!0,this.close(),this.emit("error",e))},this[m].on("error",(e=>this[g](new u(e)))),this.once("end",(()=>this.close))}close(){this[m]&&(this[m].close(),this[m]=null,this.emit("close"))}reset(){if(!this[y])return r(this[m],"zlib binding closed"),this[m].reset()}flush(e){this.ended||("number"!=typeof e&&(e=this[f]),this.write(Object.assign(i.alloc(0),{[p]:e})))}end(e,t,n){return e&&this.write(e,t),this.flush(this[h]),this[S]=!0,super.end(null,null,n)}get ended(){return this[S]}write(e,t,n){if("function"==typeof t&&(n=t,t="utf8"),"string"==typeof e&&(e=i.from(e,t)),this[y])return;r(this[m],"zlib binding closed");const o=this[m]._handle,s=o.close;o.close=()=>{};const a=this[m].close;let d,h;this[m].close=()=>{},i.concat=e=>e;try{const t="number"==typeof e[p]?e[p]:this[p];d=this[m]._processChunk(e,t),i.concat=c}catch(e){i.concat=c,this[g](new u(e))}finally{this[m]&&(this[m]._handle=o,o.close=s,this[m].close=a,this[m].removeAllListeners("error"))}if(this[m]&&this[m].on("error",(e=>this[g](new u(e)))),d)if(Array.isArray(d)&&d.length>0){h=this[l](i.from(d[0]));for(let e=1;e<d.length;e++)h=this[l](d[e])}else h=this[l](i.from(d));return n&&n(),h}[l](e){return super.write(e)}}class T extends w{constructor(e,t){(e=e||{}).flush=e.flush||s.Z_NO_FLUSH,e.finishFlush=e.finishFlush||s.Z_FINISH,super(e,t),this[f]=s.Z_FULL_FLUSH,this[v]=e.level,this[b]=e.strategy}params(e,t){if(!this[y]){if(!this[m])throw new Error("cannot switch params when binding is closed");if(!this[m].params)throw new Error("not supported in this implementation");if(this[v]!==e||this[b]!==t){this.flush(s.Z_SYNC_FLUSH),r(this[m],"zlib binding closed");const n=this[m].flush;this[m].flush=(e,t)=>{this.flush(e),t()};try{this[m].params(e,t)}finally{this[m].flush=n}this[m]&&(this[v]=e,this[b]=t)}}}}const _=Symbol("_portable");class E extends w{constructor(e,t){(e=e||{}).flush=e.flush||s.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||s.BROTLI_OPERATION_FINISH,super(e,t),this[f]=s.BROTLI_OPERATION_FLUSH}}t.Deflate=class extends T{constructor(e){super(e,"Deflate")}},t.Inflate=class extends T{constructor(e){super(e,"Inflate")}},t.Gzip=class extends T{constructor(e){super(e,"Gzip"),this[_]=e&&!!e.portable}[l](e){return this[_]?(this[_]=!1,e[9]=255,super[l](e)):super[l](e)}},t.Gunzip=class extends T{constructor(e){super(e,"Gunzip")}},t.DeflateRaw=class extends T{constructor(e){super(e,"DeflateRaw")}},t.InflateRaw=class extends T{constructor(e){super(e,"InflateRaw")}},t.Unzip=class extends T{constructor(e){super(e,"Unzip")}},"function"==typeof o.BrotliCompress?(t.BrotliCompress=class extends E{constructor(e){super(e,"BrotliCompress")}},t.BrotliDecompress=class extends E{constructor(e){super(e,"BrotliDecompress")}}):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}},1890:(e,t,n)=>{const r=n(4231),i=n(3610),{mkdirpNative:o,mkdirpNativeSync:s}=n(9378),{mkdirpManual:a,mkdirpManualSync:c}=n(8600),{useNative:l,useNativeSync:u}=n(6167),d=(e,t)=>(e=i(e),t=r(t),l(t)?o(e,t):a(e,t));d.sync=(e,t)=>(e=i(e),t=r(t),u(t)?s(e,t):c(e,t)),d.native=(e,t)=>o(i(e),r(t)),d.manual=(e,t)=>a(i(e),r(t)),d.nativeSync=(e,t)=>s(i(e),r(t)),d.manualSync=(e,t)=>c(i(e),r(t)),e.exports=d},8812:(e,t,n)=>{const{dirname:r}=n(1017),i=(e,t,n=void 0)=>n===t?Promise.resolve():e.statAsync(t).then((e=>e.isDirectory()?n:void 0),(n=>"ENOENT"===n.code?i(e,r(t),t):void 0)),o=(e,t,n=void 0)=>{if(n!==t)try{return e.statSync(t).isDirectory()?n:void 0}catch(n){return"ENOENT"===n.code?o(e,r(t),t):void 0}};e.exports={findMade:i,findMadeSync:o}},8600:(e,t,n)=>{const{dirname:r}=n(1017),i=(e,t,n)=>{t.recursive=!1;const o=r(e);return o===e?t.mkdirAsync(e,t).catch((e=>{if("EISDIR"!==e.code)throw e})):t.mkdirAsync(e,t).then((()=>n||e),(r=>{if("ENOENT"===r.code)return i(o,t).then((n=>i(e,t,n)));if("EEXIST"!==r.code&&"EROFS"!==r.code)throw r;return t.statAsync(e).then((e=>{if(e.isDirectory())return n;throw r}),(()=>{throw r}))}))},o=(e,t,n)=>{const i=r(e);if(t.recursive=!1,i===e)try{return t.mkdirSync(e,t)}catch(e){if("EISDIR"!==e.code)throw e;return}try{return t.mkdirSync(e,t),n||e}catch(r){if("ENOENT"===r.code)return o(e,t,o(i,t,n));if("EEXIST"!==r.code&&"EROFS"!==r.code)throw r;try{if(!t.statSync(e).isDirectory())throw r}catch(e){throw r}}};e.exports={mkdirpManual:i,mkdirpManualSync:o}},9378:(e,t,n)=>{const{dirname:r}=n(1017),{findMade:i,findMadeSync:o}=n(8812),{mkdirpManual:s,mkdirpManualSync:a}=n(8600);e.exports={mkdirpNative:(e,t)=>(t.recursive=!0,r(e)===e?t.mkdirAsync(e,t):i(t,e).then((n=>t.mkdirAsync(e,t).then((()=>n)).catch((n=>{if("ENOENT"===n.code)return s(e,t);throw n}))))),mkdirpNativeSync:(e,t)=>{if(t.recursive=!0,r(e)===e)return t.mkdirSync(e,t);const n=o(t,e);try{return t.mkdirSync(e,t),n}catch(n){if("ENOENT"===n.code)return a(e,t);throw n}}}},4231:(e,t,n)=>{const{promisify:r}=n(3837),i=n(7147);e.exports=e=>{if(e)if("object"==typeof e)e={mode:511,fs:i,...e};else if("number"==typeof e)e={mode:e,fs:i};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8),fs:i}}else e={mode:511,fs:i};return e.mkdir=e.mkdir||e.fs.mkdir||i.mkdir,e.mkdirAsync=r(e.mkdir),e.stat=e.stat||e.fs.stat||i.stat,e.statAsync=r(e.stat),e.statSync=e.statSync||e.fs.statSync||i.statSync,e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||i.mkdirSync,e}},3610:(e,t,n)=>{const r=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:i,parse:o}=n(1017);e.exports=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=i(e),"win32"===r){const t=/[*|"<>?:]/,{root:n}=o(e);if(t.test(e.substr(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e}},6167:(e,t,n)=>{const r=n(7147),i=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),o=+i[0]>10||10==+i[0]&&+i[1]>=12,s=o?e=>e.mkdir===r.mkdir:()=>!1,a=o?e=>e.mkdirSync===r.mkdirSync:()=>!1;e.exports={useNative:s,useNativeSync:a}},7824:e=>{var t=1e3,n=60*t,r=60*n,i=24*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===l&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?o(a,c,i,"day"):c>=r?o(a,c,r,"hour"):c>=n?o(a,c,n,"minute"):c>=t?o(a,c,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=r?Math.round(e/r)+"h":o>=n?Math.round(e/n)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},778:(e,t,n)=>{var r=n(2479);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},5339:e=>{"use strict";var t="win32"===process.platform,n=t?/[^:]\\$/:/.\/$/;e.exports=function(){var e;return e=t?process.env.TEMP||process.env.TMP||(process.env.SystemRoot||process.env.windir)+"\\temp":process.env.TMPDIR||process.env.TMP||process.env.TEMP||"/tmp",n.test(e)&&(e=e.slice(0,-1)),e}},4095:e=>{"use strict";function t(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),n=t[1]||"",r=Boolean(n&&":"!==n.charAt(1));return Boolean(t[2]||r)}e.exports="win32"===process.platform?n:t,e.exports.posix=t,e.exports.win32=n},9916:e=>{function t(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function n(e){e.pending+=1;var t=!1;return function(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending<e.max)r(e,e.waiting.shift());else if(0===e.pending){var o=e.listeners;e.listeners=[],o.forEach(n)}};function n(t){t(e.error)}}function r(e,t){t(n(e))}e.exports=t,t.prototype.go=function(e){this.pending<this.max?r(this,e):this.waiting.push(e)},t.prototype.wait=function(e){0===this.pending?e(this.error):this.listeners.push(e)},t.prototype.hold=function(){return n(this)}},9353:(e,t,n)=>{e.exports=n(1846)},1846:(e,t,n)=>{var r=n(1960);t.operation=function(e){var n=t.timeouts(e);return new r(n,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort((function(e,t){return e-t})),r},t.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*Math.pow(t.factor,e));return Math.min(r,t.maxTimeout)},t.wrap=function(e,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var i in r=[],e)"function"==typeof e[i]&&r.push(i);for(var o=0;o<r.length;o++){var s=r[o],a=e[s];e[s]=function(r){var i=t.operation(n),o=Array.prototype.slice.call(arguments,1),s=o.pop();o.push((function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),s.apply(this,arguments))})),i.attempt((function(){r.apply(e,o)}))}.bind(e,a),e[s].options=n}}},1960:e=>{function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),n=this._timeouts.shift()}var r=this,i=setTimeout((function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout((function(){r._operationTimeoutCb(r._attempts)}),r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)}),n);return this._options.unref&&i.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],o=i.message,s=(e[o]||0)+1;e[o]=s,s>=n&&(t=i,n=s)}return t}},6625:(e,t)=>{var n;t=e.exports=Y,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=r-6,s=t.re=[],a=t.safeRe=[],c=t.src=[],l=0,u="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[u,o]];function p(e){for(var t=0;t<d.length;t++){var n=d[t][0],r=d[t][1];e=e.split(n+"*").join(n+"{0,"+r+"}").split(n+"+").join(n+"{1,"+r+"}")}return e}var h=l++;c[h]="0|[1-9]\\d*";var f=l++;c[f]="\\d+";var m=l++;c[m]="\\d*[a-zA-Z-]"+u+"*";var g=l++;c[g]="("+c[h]+")\\.("+c[h]+")\\.("+c[h]+")";var y=l++;c[y]="("+c[f]+")\\.("+c[f]+")\\.("+c[f]+")";var v=l++;c[v]="(?:"+c[h]+"|"+c[m]+")";var b=l++;c[b]="(?:"+c[f]+"|"+c[m]+")";var S=l++;c[S]="(?:-("+c[v]+"(?:\\."+c[v]+")*))";var w=l++;c[w]="(?:-?("+c[b]+"(?:\\."+c[b]+")*))";var T=l++;c[T]=u+"+";var _=l++;c[_]="(?:\\+("+c[T]+"(?:\\."+c[T]+")*))";var E=l++,C="v?"+c[g]+c[S]+"?"+c[_]+"?";c[E]="^"+C+"$";var R="[v=\\s]*"+c[y]+c[w]+"?"+c[_]+"?",x=l++;c[x]="^"+R+"$";var I=l++;c[I]="((?:<|>)?=?)";var O=l++;c[O]=c[f]+"|x|X|\\*";var P=l++;c[P]=c[h]+"|x|X|\\*";var D=l++;c[D]="[v=\\s]*("+c[P]+")(?:\\.("+c[P]+")(?:\\.("+c[P]+")(?:"+c[S]+")?"+c[_]+"?)?)?";var A=l++;c[A]="[v=\\s]*("+c[O]+")(?:\\.("+c[O]+")(?:\\.("+c[O]+")(?:"+c[w]+")?"+c[_]+"?)?)?";var N=l++;c[N]="^"+c[I]+"\\s*"+c[D]+"$";var k=l++;c[k]="^"+c[I]+"\\s*"+c[A]+"$";var j=l++;c[j]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var q=l++;c[q]="(?:~>?)";var M=l++;c[M]="(\\s*)"+c[q]+"\\s+",s[M]=new RegExp(c[M],"g"),a[M]=new RegExp(p(c[M]),"g");var L=l++;c[L]="^"+c[q]+c[D]+"$";var F=l++;c[F]="^"+c[q]+c[A]+"$";var U=l++;c[U]="(?:\\^)";var B=l++;c[B]="(\\s*)"+c[U]+"\\s+",s[B]=new RegExp(c[B],"g"),a[B]=new RegExp(p(c[B]),"g");var z=l++;c[z]="^"+c[U]+c[D]+"$";var H=l++;c[H]="^"+c[U]+c[A]+"$";var G=l++;c[G]="^"+c[I]+"\\s*("+R+")$|^$";var V=l++;c[V]="^"+c[I]+"\\s*("+C+")$|^$";var W=l++;c[W]="(\\s*)"+c[I]+"\\s*("+R+"|"+c[D]+")",s[W]=new RegExp(c[W],"g"),a[W]=new RegExp(p(c[W]),"g");var $=l++;c[$]="^\\s*("+c[D]+")\\s+-\\s+("+c[D]+")\\s*$";var K=l++;c[K]="^\\s*("+c[A]+")\\s+-\\s+("+c[A]+")\\s*$";var Q=l++;c[Q]="(<|>)?=?\\s*\\*";for(var J=0;J<35;J++)n(J,c[J]),s[J]||(s[J]=new RegExp(c[J]),a[J]=new RegExp(p(c[J])));function X(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Y)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[x]:a[E]).test(e))return null;try{return new Y(e,t)}catch(e){return null}}function Y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Y){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof Y))return new Y(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?a[x]:a[E]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}t.parse=X,t.valid=function(e,t){var n=X(e,t);return n?n.version:null},t.clean=function(e,t){var n=X(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=Y,Y.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},Y.prototype.toString=function(){return this.version},Y.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof Y||(e=new Y(e,this.options)),this.compareMain(e)||this.comparePre(e)},Y.prototype.compareMain=function(e){return e instanceof Y||(e=new Y(e,this.options)),ee(this.major,e.major)||ee(this.minor,e.minor)||ee(this.patch,e.patch)},Y.prototype.comparePre=function(e){if(e instanceof Y||(e=new Y(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return ee(r,i)}while(++t)},Y.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new Y(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(ie(e,t))return null;var n=X(e),r=X(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},t.compareIdentifiers=ee;var Z=/^[0-9]+$/;function ee(e,t){var n=Z.test(e),r=Z.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function te(e,t,n){return new Y(e,n).compare(new Y(t,n))}function ne(e,t,n){return te(e,t,n)>0}function re(e,t,n){return te(e,t,n)<0}function ie(e,t,n){return 0===te(e,t,n)}function oe(e,t,n){return 0!==te(e,t,n)}function se(e,t,n){return te(e,t,n)>=0}function ae(e,t,n){return te(e,t,n)<=0}function ce(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return ie(e,n,r);case"!=":return oe(e,n,r);case">":return ne(e,n,r);case">=":return se(e,n,r);case"<":return re(e,n,r);case"<=":return ae(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function le(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof le){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof le))return new le(e,t);e=e.trim().split(/\s+/).join(" "),n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ue?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return ee(t,e)},t.major=function(e,t){return new Y(e,t).major},t.minor=function(e,t){return new Y(e,t).minor},t.patch=function(e,t){return new Y(e,t).patch},t.compare=te,t.compareLoose=function(e,t){return te(e,t,!0)},t.rcompare=function(e,t,n){return te(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compare(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.rcompare(e,r,n)}))},t.gt=ne,t.lt=re,t.eq=ie,t.neq=oe,t.gte=se,t.lte=ae,t.cmp=ce,t.Comparator=le;var ue={};function de(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof de)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new de(e.raw,t);if(e instanceof le)return new de(e.value,t);if(!(this instanceof de))return new de(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function pe(e){return!e||"x"===e.toLowerCase()||"*"===e}function he(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=pe(n)?"":pe(r)?">="+n+".0.0":pe(i)?">="+n+"."+r+".0":">="+t)+" "+(a=pe(c)?"":pe(l)?"<"+(+c+1)+".0.0":pe(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function fe(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==ue&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function me(e,t,n){try{t=new de(t,n)}catch(e){return!1}return t.test(e)}function ge(e,t,n,r){var i,o,s,a,c;switch(e=new Y(e,r),t=new de(t,r),n){case">":i=ne,o=ae,s=re,a=">",c=">=";break;case"<":i=re,o=se,s=ne,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(me(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===ue&&(e=new le(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}le.prototype.parse=function(e){var t=this.options.loose?a[G]:a[V],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new Y(n[2],this.options.loose):this.semver=ue},le.prototype.toString=function(){return this.value},le.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ue||("string"==typeof e&&(e=new Y(e,this.options)),ce(e,this.operator,this.semver,this.options))},le.prototype.intersects=function(e,t){if(!(e instanceof le))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new de(e.value,t),me(this.value,n,t);if(""===e.operator)return n=new de(this.value,t),me(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ce(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ce(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},t.Range=de,de.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},de.prototype.toString=function(){return this.range},de.prototype.parseRange=function(e){var t=this.options.loose,r=t?a[K]:a[$];e=e.replace(r,he),n("hyphen replace",e),e=e.replace(a[W],"$1$2$3"),n("comparator trim",e,a[W]),e=(e=e.replace(a[M],"$1~")).replace(a[B],"$1^");var i=t?a[G]:a[V],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?a[H]:a[z];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),pe(r)?a="":pe(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":pe(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?a[F]:a[L];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),pe(r)?a="":pe(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":pe(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?a[k]:a[N];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=pe(i),l=c||pe(o),u=l||pe(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(a[Q],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(i)}))),o.map((function(e){return new le(e,this.options)}),this)},de.prototype.intersects=function(e,t){if(!(e instanceof de))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new de(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},de.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new Y(e,this.options));for(var t=0;t<this.set.length;t++)if(fe(this.set[t],e,this.options))return!0;return!1},t.satisfies=me,t.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new de(t,n)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(r&&-1!==i.compare(e)||(i=new Y(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new de(t,n)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(r&&1!==i.compare(e)||(i=new Y(r=e,n)))})),r},t.minVersion=function(e,t){e=new de(e,t);var n=new Y("0.0.0");if(e.test(n))return n;if(n=new Y("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new Y(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!ne(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},t.validRange=function(e,t){try{return new de(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return ge(e,t,"<",n)},t.gtr=function(e,t,n){return ge(e,t,">",n)},t.outside=ge,t.prerelease=function(e,t){var n=X(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new de(e,n),t=new de(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof Y)return e;if("string"!=typeof e)return null;var t=e.match(a[j]);return null==t?null:X(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},2130:(e,t,n)=>{"use strict";const r=n(2037),i=n(6224),o=n(2146),{env:s}=process;let a;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(0===a)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===a)return 0;const n=a||0;if("dumb"===s.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in s))||"codeship"===s.CI_NAME?1:n;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in s)return 1;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:n}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?a=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(a=1),"FORCE_COLOR"in s&&(a="true"===s.FORCE_COLOR?1:"false"===s.FORCE_COLOR?0:0===s.FORCE_COLOR.length?1:Math.min(parseInt(s.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(l(e,e&&e.isTTY))},stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}},2146:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}},7998:(e,t,n)=>{"use strict";t.c=t.create=n(4629),t.r=t.replace=n(1746),t.t=t.list=n(6473),t.u=t.update=n(5997),t.x=t.extract=n(769),t.Pack=n(8042),t.Unpack=n(2699),t.Parse=n(6824),t.ReadEntry=n(6277),t.WriteEntry=n(7620),t.Header=n(7134),t.Pax=n(4747),t.types=n(4402)},4629:(e,t,n)=>{"use strict";const r=n(2093),i=n(8042),o=n(292),s=n(6473),a=n(1017);e.exports=(e,t,n)=>{if("function"==typeof t&&(n=t),Array.isArray(e)&&(t=e,e={}),!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);const i=r(e);if(i.sync&&"function"==typeof n)throw new TypeError("callback not supported for sync tar functions");if(!i.file&&"function"==typeof n)throw new TypeError("callback only supported with file option");return i.file&&i.sync?c(i,t):i.file?l(i,t,n):i.sync?p(i,t):h(i,t)};const c=(e,t)=>{const n=new i.Sync(e),r=new o.WriteStreamSync(e.file,{mode:e.mode||438});n.pipe(r),u(n,t)},l=(e,t,n)=>{const r=new i(e),s=new o.WriteStream(e.file,{mode:e.mode||438});r.pipe(s);const a=new Promise(((e,t)=>{s.on("error",t),s.on("close",e),r.on("error",t)}));return d(r,t),n?a.then(n,n):a},u=(e,t)=>{t.forEach((t=>{"@"===t.charAt(0)?s({file:a.resolve(e.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:t=>e.add(t)}):e.add(t)})),e.end()},d=(e,t)=>{for(;t.length;){const n=t.shift();if("@"===n.charAt(0))return s({file:a.resolve(e.cwd,n.substr(1)),noResume:!0,onentry:t=>e.add(t)}).then((n=>d(e,t)));e.add(n)}e.end()},p=(e,t)=>{const n=new i.Sync(e);return u(n,t),n},h=(e,t)=>{const n=new i(e);return d(n,t),n}},769:(e,t,n)=>{"use strict";const r=n(2093),i=n(2699),o=n(7147),s=n(292),a=n(1017),c=n(4922);e.exports=(e,t,n)=>{"function"==typeof e?(n=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),"function"==typeof t&&(n=t,t=null),t=t?Array.from(t):[];const i=r(e);if(i.sync&&"function"==typeof n)throw new TypeError("callback not supported for sync tar functions");if(!i.file&&"function"==typeof n)throw new TypeError("callback only supported with file option");return t.length&&l(i,t),i.file&&i.sync?u(i):i.file?d(i,n):i.sync?p(i):h(i)};const l=(e,t)=>{const n=new Map(t.map((e=>[c(e),!0]))),r=e.filter,i=(e,t)=>{const r=t||a.parse(e).root||".",o=e!==r&&(n.has(e)?n.get(e):i(a.dirname(e),r));return n.set(e,o),o};e.filter=r?(e,t)=>r(e,t)&&i(c(e)):e=>i(c(e))},u=e=>{const t=new i.Sync(e),n=e.file,r=o.statSync(n),a=e.maxReadSize||16777216;new s.ReadStreamSync(n,{readSize:a,size:r.size}).pipe(t)},d=(e,t)=>{const n=new i(e),r=e.maxReadSize||16777216,a=e.file,c=new Promise(((e,t)=>{n.on("error",t),n.on("close",e),o.stat(a,((e,i)=>{if(e)t(e);else{const e=new s.ReadStream(a,{readSize:r,size:i.size});e.on("error",t),e.pipe(n)}}))}));return t?c.then(t,t):c},p=e=>new i.Sync(e),h=e=>new i(e)},5879:(e,t,n)=>{const r="win32"===(process.env.__FAKE_PLATFORM__||process.platform),i=global.__FAKE_TESTING_FS__||n(7147),{O_CREAT:o,O_TRUNC:s,O_WRONLY:a,UV_FS_O_FILEMAP:c=0}=i.constants,l=r&&!!c,u=c|s|o|a;e.exports=l?e=>e<524288?u:"w":()=>"w"},7134:(e,t,n)=>{"use strict";const r=n(4402),i=n(1017).posix,o=n(9678),s=Symbol("slurp"),a=Symbol("type"),c=(e,t,n)=>e.slice(t,t+n).toString("utf8").replace(/\0.*/,""),l=(e,t,n)=>u(d(e,t,n)),u=e=>null===e?null:new Date(1e3*e),d=(e,t,n)=>128&e[t]?o.parse(e.slice(t,t+n)):p(e,t,n),p=(e,t,n)=>{return r=parseInt(e.slice(t,t+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?null:r;var r},h={12:8589934591,8:2097151},f=(e,t,n,r)=>null!==r&&(r>h[n]||r<0?(o.encode(r,e.slice(t,t+n)),!0):(m(e,t,n,r),!1)),m=(e,t,n,r)=>e.write(g(r,n),t,n,"ascii"),g=(e,t)=>y(Math.floor(e).toString(8),t),y=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0",v=(e,t,n,r)=>null!==r&&f(e,t,n,r.getTime()/1e3),b=new Array(156).join("\0"),S=(e,t,n,r)=>null!==r&&(e.write(r+b,t,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);e.exports=class{constructor(e,t,n,r){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[a]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,t||0,n,r):e&&this.set(e)}decode(e,t,n,r){if(t||(t=0),!(e&&e.length>=t+512))throw new Error("need 512 bytes for header");if(this.path=c(e,t,100),this.mode=d(e,t+100,8),this.uid=d(e,t+108,8),this.gid=d(e,t+116,8),this.size=d(e,t+124,12),this.mtime=l(e,t+136,12),this.cksum=d(e,t+148,12),this[s](n),this[s](r,!0),this[a]=c(e,t+156,1),""===this[a]&&(this[a]="0"),"0"===this[a]&&"/"===this.path.substr(-1)&&(this[a]="5"),"5"===this[a]&&(this.size=0),this.linkpath=c(e,t+157,100),"ustar\x0000"===e.slice(t+257,t+265).toString())if(this.uname=c(e,t+265,32),this.gname=c(e,t+297,32),this.devmaj=d(e,t+329,8),this.devmin=d(e,t+337,8),0!==e[t+475]){const n=c(e,t+345,155);this.path=n+"/"+this.path}else{const n=c(e,t+345,130);n&&(this.path=n+"/"+this.path),this.atime=l(e,t+476,12),this.ctime=l(e,t+488,12)}let i=256;for(let n=t;n<t+148;n++)i+=e[n];for(let n=t+156;n<t+512;n++)i+=e[n];this.cksumValid=i===this.cksum,null===this.cksum&&256===i&&(this.nullBlock=!0)}[s](e,t){for(const n in e)null===e[n]||void 0===e[n]||t&&"path"===n||(this[n]=e[n])}encode(e,t){if(e||(e=this.block=Buffer.alloc(512),t=0),t||(t=0),!(e.length>=t+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=((e,t)=>{let n,r=e,o="";const s=i.parse(e).root||".";if(Buffer.byteLength(r)<100)n=[r,o,!1];else{o=i.dirname(r),r=i.basename(r);do{Buffer.byteLength(r)<=100&&Buffer.byteLength(o)<=t?n=[r,o,!1]:Buffer.byteLength(r)>100&&Buffer.byteLength(o)<=t?n=[r.substr(0,99),o,!0]:(r=i.join(i.basename(o),r),o=i.dirname(o))}while(o!==s&&!n);n||(n=[e.substr(0,99),"",!0])}return n})(this.path||"",n),o=r[0],s=r[1];this.needPax=r[2],this.needPax=S(e,t,100,o)||this.needPax,this.needPax=f(e,t+100,8,this.mode)||this.needPax,this.needPax=f(e,t+108,8,this.uid)||this.needPax,this.needPax=f(e,t+116,8,this.gid)||this.needPax,this.needPax=f(e,t+124,12,this.size)||this.needPax,this.needPax=v(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this[a].charCodeAt(0),this.needPax=S(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=S(e,t+265,32,this.uname)||this.needPax,this.needPax=S(e,t+297,32,this.gname)||this.needPax,this.needPax=f(e,t+329,8,this.devmaj)||this.needPax,this.needPax=f(e,t+337,8,this.devmin)||this.needPax,this.needPax=S(e,t+345,n,s)||this.needPax,0!==e[t+475]?this.needPax=S(e,t+345,155,s)||this.needPax:(this.needPax=S(e,t+345,130,s)||this.needPax,this.needPax=v(e,t+476,12,this.atime)||this.needPax,this.needPax=v(e,t+488,12,this.ctime)||this.needPax);let c=256;for(let n=t;n<t+148;n++)c+=e[n];for(let n=t+156;n<t+512;n++)c+=e[n];return this.cksum=c,f(e,t+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(const t in e)null!==e[t]&&void 0!==e[t]&&(this[t]=e[t])}get type(){return r.name.get(this[a])||this[a]}get typeKey(){return this[a]}set type(e){r.code.has(e)?this[a]=r.code.get(e):this[a]=e}}},2093:e=>{"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=e=>e?Object.keys(e).map((n=>[t.has(n)?t.get(n):n,e[n]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},9678:e=>{"use strict";const t=e=>255&(255^e),n=e=>1+(255^e)&255;e.exports={encode:(e,r)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");return e<0?((e,r)=>{r[0]=255;var i=!1;e*=-1;for(var o=r.length;o>1;o--){var s=255&e;e=Math.floor(e/256),i?r[o-1]=t(s):0===s?r[o-1]=0:(i=!0,r[o-1]=n(s))}})(e,r):((e,t)=>{t[0]=128;for(var n=t.length;n>1;n--)t[n-1]=255&e,e=Math.floor(e/256)})(e,r),r},parse:e=>{const r=e[0],i=128===r?(e=>{for(var t=e.length,n=0,r=t-1;r>-1;r--){var i=e[r];0!==i&&(n+=i*Math.pow(256,t-r-1))}return n})(e.slice(1,e.length)):255===r?(e=>{for(var r=e.length,i=0,o=!1,s=r-1;s>-1;s--){var a,c=e[s];o?a=t(c):0===c?a=c:(o=!0,a=n(c)),0!==a&&(i-=a*Math.pow(256,r-s-1))}return i})(e):null;if(null===i)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(i))throw Error("parsed number outside of javascript safe integer range");return i}}},6473:(e,t,n)=>{"use strict";const r=n(2093),i=n(6824),o=n(7147),s=n(292),a=n(1017),c=n(4922);e.exports=(e,t,n)=>{"function"==typeof e?(n=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),"function"==typeof t&&(n=t,t=null),t=t?Array.from(t):[];const i=r(e);if(i.sync&&"function"==typeof n)throw new TypeError("callback not supported for sync tar functions");if(!i.file&&"function"==typeof n)throw new TypeError("callback only supported with file option");return t.length&&u(i,t),i.noResume||l(i),i.file&&i.sync?d(i):i.file?p(i,n):h(i)};const l=e=>{const t=e.onentry;e.onentry=t?e=>{t(e),e.resume()}:e=>e.resume()},u=(e,t)=>{const n=new Map(t.map((e=>[c(e),!0]))),r=e.filter,i=(e,t)=>{const r=t||a.parse(e).root||".",o=e!==r&&(n.has(e)?n.get(e):i(a.dirname(e),r));return n.set(e,o),o};e.filter=r?(e,t)=>r(e,t)&&i(c(e)):e=>i(c(e))},d=e=>{const t=h(e),n=e.file;let r,i=!0;try{const s=o.statSync(n),a=e.maxReadSize||16777216;if(s.size<a)t.end(o.readFileSync(n));else{let e=0;const i=Buffer.allocUnsafe(a);for(r=o.openSync(n,"r");e<s.size;){const n=o.readSync(r,i,0,a,e);e+=n,t.write(i.slice(0,n))}t.end()}i=!1}finally{if(i&&r)try{o.closeSync(r)}catch(e){}}},p=(e,t)=>{const n=new i(e),r=e.maxReadSize||16777216,a=e.file,c=new Promise(((e,t)=>{n.on("error",t),n.on("end",e),o.stat(a,((e,i)=>{if(e)t(e);else{const e=new s.ReadStream(a,{readSize:r,size:i.size});e.on("error",t),e.pipe(n)}}))}));return t?c.then(t,t):c},h=e=>new i(e)},3248:(e,t,n)=>{"use strict";const r=n(1890),i=n(7147),o=n(1017),s=n(9019),a=n(2905);class c extends Error{constructor(e,t){super("Cannot extract through symbolic link"),this.path=t,this.symlink=e}get name(){return"SylinkError"}}class l extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'"),this.path=e,this.code=t}get name(){return"CwdError"}}const u=(e,t)=>e.get(a(t)),d=(e,t,n)=>e.set(a(t),n);e.exports=(e,t,n)=>{e=a(e);const c=t.umask,h=448|t.mode,f=0!=(h&c),m=t.uid,g=t.gid,y="number"==typeof m&&"number"==typeof g&&(m!==t.processUid||g!==t.processGid),v=t.preserve,b=t.unlink,S=t.cache,w=a(t.cwd),T=(t,r)=>{t?n(t):(d(S,e,!0),r&&y?s(r,m,g,(e=>T(e))):f?i.chmod(e,h,n):n())};if(S&&!0===u(S,e))return T();if(e===w)return((e,t)=>{i.stat(e,((n,r)=>{!n&&r.isDirectory()||(n=new l(e,n&&n.code||"ENOTDIR")),t(n)}))})(e,T);if(v)return r(e,{mode:h}).then((e=>T(null,e)),T);const _=a(o.relative(w,e)).split("/");p(w,_,h,S,b,w,null,T)};const p=(e,t,n,r,s,c,l,d)=>{if(!t.length)return d(null,l);const f=t.shift(),m=a(o.resolve(e+"/"+f));if(u(r,m))return p(m,t,n,r,s,c,l,d);i.mkdir(m,n,h(m,t,n,r,s,c,l,d))},h=(e,t,n,r,o,s,l,u)=>d=>{d?i.lstat(e,((f,m)=>{if(f)f.path=f.path&&a(f.path),u(f);else if(m.isDirectory())p(e,t,n,r,o,s,l,u);else if(o)i.unlink(e,(a=>{if(a)return u(a);i.mkdir(e,n,h(e,t,n,r,o,s,l,u))}));else{if(m.isSymbolicLink())return u(new c(e,e+"/"+t.join("/")));u(d)}})):p(e,t,n,r,o,s,l=l||e,u)};e.exports.sync=(e,t)=>{e=a(e);const n=t.umask,p=448|t.mode,h=0!=(p&n),f=t.uid,m=t.gid,g="number"==typeof f&&"number"==typeof m&&(f!==t.processUid||m!==t.processGid),y=t.preserve,v=t.unlink,b=t.cache,S=a(t.cwd),w=t=>{d(b,e,!0),t&&g&&s.sync(t,f,m),h&&i.chmodSync(e,p)};if(b&&!0===u(b,e))return w();if(e===S)return(e=>{let t=!1,n="ENOTDIR";try{t=i.statSync(e).isDirectory()}catch(e){n=e.code}finally{if(!t)throw new l(e,n)}})(S),w();if(y)return w(r.sync(e,p));const T=a(o.relative(S,e)).split("/");let _=null;for(let e=T.shift(),t=S;e&&(t+="/"+e);e=T.shift())if(t=a(o.resolve(t)),!u(b,t))try{i.mkdirSync(t,p),_=_||t,d(b,t,!0)}catch(e){const n=i.lstatSync(t);if(n.isDirectory()){d(b,t,!0);continue}if(v){i.unlinkSync(t),i.mkdirSync(t,p),_=_||t,d(b,t,!0);continue}if(n.isSymbolicLink())return new c(t,t+"/"+T.join("/"))}return w(_)}},7716:e=>{"use strict";e.exports=(e,t,n)=>(e&=4095,n&&(e=-19&(384|e)),t&&(256&e&&(e|=64),32&e&&(e|=8),4&e&&(e|=1)),e)},1946:e=>{const t=Object.create(null),{hasOwnProperty:n}=Object.prototype;e.exports=e=>(n.call(t,e)||(t[e]=e.normalize("NFKD")),t[e])},2905:e=>{const t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports="win32"!==t?e=>e:e=>e&&e.replace(/\\/g,"/")},8042:(e,t,n)=>{"use strict";class r{constructor(e,t){this.path=e||"./",this.absolute=t,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}}const i=n(5736),o=n(1650),s=n(6277),a=n(7620),c=a.Sync,l=a.Tar,u=n(4411),d=Buffer.alloc(1024),p=Symbol("onStat"),h=Symbol("ended"),f=Symbol("queue"),m=Symbol("current"),g=Symbol("process"),y=Symbol("processing"),v=Symbol("processJob"),b=Symbol("jobs"),S=Symbol("jobDone"),w=Symbol("addFSEntry"),T=Symbol("addTarEntry"),_=Symbol("stat"),E=Symbol("readdir"),C=Symbol("onreaddir"),R=Symbol("pipe"),x=Symbol("entry"),I=Symbol("entryOpt"),O=Symbol("writeEntryClass"),P=Symbol("write"),D=Symbol("ondrain"),A=n(7147),N=n(1017),k=n(7902),j=n(2905),q=k(class extends i{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=j(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[O]=a,"function"==typeof e.onwarn&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?("object"!=typeof e.gzip&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new o.Gzip(e.gzip),this.zip.on("data",(e=>super.write(e))),this.zip.on("end",(e=>super.end())),this.zip.on("drain",(e=>this[D]())),this.on("resume",(e=>this.zip.resume()))):this.on("drain",this[D]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter="function"==typeof e.filter?e.filter:e=>!0,this[f]=new u,this[b]=0,this.jobs=+e.jobs||4,this[y]=!1,this[h]=!1}[P](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[h]=!0,this[g](),this}write(e){if(this[h])throw new Error("write after end");return e instanceof s?this[T](e):this[w](e),this.flowing}[T](e){const t=j(N.resolve(this.cwd,e.path));if(this.filter(e.path,e)){const n=new r(e.path,t,!1);n.entry=new l(e,this[I](n)),n.entry.on("end",(e=>this[S](n))),this[b]+=1,this[f].push(n)}else e.resume();this[g]()}[w](e){const t=j(N.resolve(this.cwd,e));this[f].push(new r(e,t)),this[g]()}[_](e){e.pending=!0,this[b]+=1;const t=this.follow?"stat":"lstat";A[t](e.absolute,((t,n)=>{e.pending=!1,this[b]-=1,t?this.emit("error",t):this[p](e,n)}))}[p](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[g]()}[E](e){e.pending=!0,this[b]+=1,A.readdir(e.absolute,((t,n)=>{if(e.pending=!1,this[b]-=1,t)return this.emit("error",t);this[C](e,n)}))}[C](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[g]()}[g](){if(!this[y]){this[y]=!0;for(let e=this[f].head;null!==e&&this[b]<this.jobs;e=e.next)if(this[v](e.value),e.value.ignore){const t=e.next;this[f].removeNode(e),e.next=t}this[y]=!1,this[h]&&!this[f].length&&0===this[b]&&(this.zip?this.zip.end(d):(super.write(d),super.end()))}}get[m](){return this[f]&&this[f].head&&this[f].head.value}[S](e){this[f].shift(),this[b]-=1,this[g]()}[v](e){e.pending||(e.entry?e!==this[m]||e.piped||this[R](e):(e.stat||(this.statCache.has(e.absolute)?this[p](e,this.statCache.get(e.absolute)):this[_](e)),e.stat&&(e.ignore||(this.noDirRecurse||!e.stat.isDirectory()||e.readdir||(this.readdirCache.has(e.absolute)?this[C](e,this.readdirCache.get(e.absolute)):this[E](e),e.readdir))&&(e.entry=this[x](e),e.entry?e!==this[m]||e.piped||this[R](e):e.ignore=!0))))}[I](e){return{onwarn:(e,t,n)=>this.warn(e,t,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[x](e){this[b]+=1;try{return new this[O](e.path,this[I](e)).on("end",(()=>this[S](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[D](){this[m]&&this[m].entry&&this[m].entry.resume()}[R](e){e.piped=!0,e.readdir&&e.readdir.forEach((t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[w](r+t)}));const t=e.entry,n=this.zip;n?t.on("data",(e=>{n.write(e)||t.pause()})):t.on("data",(e=>{super.write(e)||t.pause()}))}pause(){return this.zip&&this.zip.pause(),super.pause()}});q.Sync=class extends q{constructor(e){super(e),this[O]=c}pause(){}resume(){}[_](e){const t=this.follow?"statSync":"lstatSync";this[p](e,A[t](e.absolute))}[E](e,t){this[C](e,A.readdirSync(e.absolute))}[R](e){const t=e.entry,n=this.zip;e.readdir&&e.readdir.forEach((t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[w](r+t)})),n?t.on("data",(e=>{n.write(e)})):t.on("data",(e=>{super[P](e)}))}},e.exports=q},6824:(e,t,n)=>{"use strict";const r=n(7902),i=n(7134),o=n(2361),s=n(4411),a=n(6277),c=n(4747),l=n(1650),u=Buffer.from([31,139]),d=Symbol("state"),p=Symbol("writeEntry"),h=Symbol("readEntry"),f=Symbol("nextEntry"),m=Symbol("processEntry"),g=Symbol("extendedHeader"),y=Symbol("globalExtendedHeader"),v=Symbol("meta"),b=Symbol("emitMeta"),S=Symbol("buffer"),w=Symbol("queue"),T=Symbol("ended"),_=Symbol("emittedEnd"),E=Symbol("emit"),C=Symbol("unzip"),R=Symbol("consumeChunk"),x=Symbol("consumeChunkSub"),I=Symbol("consumeBody"),O=Symbol("consumeMeta"),P=Symbol("consumeHeader"),D=Symbol("consuming"),A=Symbol("bufferConcat"),N=Symbol("maybeEnd"),k=Symbol("writing"),j=Symbol("aborted"),q=Symbol("onDone"),M=Symbol("sawValidEntry"),L=Symbol("sawNullBlock"),F=Symbol("sawEOF"),U=e=>!0;e.exports=r(class extends o{constructor(e){super(e=e||{}),this.file=e.file||"",this[M]=null,this.on(q,(e=>{"begin"!==this[d]&&!1!==this[M]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")})),e.ondone?this.on(q,e.ondone):this.on(q,(e=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")})),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||1048576,this.filter="function"==typeof e.filter?e.filter:U,this.writable=!0,this.readable=!1,this[w]=new s,this[S]=null,this[h]=null,this[p]=null,this[d]="begin",this[v]="",this[g]=null,this[y]=null,this[T]=!1,this[C]=null,this[j]=!1,this[L]=!1,this[F]=!1,"function"==typeof e.onwarn&&this.on("warn",e.onwarn),"function"==typeof e.onentry&&this.on("entry",e.onentry)}[P](e,t){let n;null===this[M]&&(this[M]=!1);try{n=new i(e,t,this[g],this[y])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(n.nullBlock)this[L]?(this[F]=!0,"begin"===this[d]&&(this[d]="header"),this[E]("eof")):(this[L]=!0,this[E]("nullBlock"));else if(this[L]=!1,n.cksumValid)if(n.path){const e=n.type;if(/^(Symbolic)?Link$/.test(e)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(!/^(Symbolic)?Link$/.test(e)&&n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n});else{const e=this[p]=new a(n,this[g],this[y]);if(!this[M])if(e.remain){const t=()=>{e.invalid||(this[M]=!0)};e.on("end",t)}else this[M]=!0;e.meta?e.size>this.maxMetaEntrySize?(e.ignore=!0,this[E]("ignoredEntry",e),this[d]="ignore",e.resume()):e.size>0&&(this[v]="",e.on("data",(e=>this[v]+=e)),this[d]="meta"):(this[g]=null,e.ignore=e.ignore||!this.filter(e.path,e),e.ignore?(this[E]("ignoredEntry",e),this[d]=e.remain?"ignore":"header",e.resume()):(e.remain?this[d]="body":(this[d]="header",e.end()),this[h]?this[w].push(e):(this[w].push(e),this[f]())))}}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[m](e){let t=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[h]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",(e=>this[f]())),t=!1)):(this[h]=null,t=!1),t}[f](){do{}while(this[m](this[w].shift()));if(!this[w].length){const e=this[h];!e||e.flowing||e.size===e.remain?this[k]||this.emit("drain"):e.once("drain",(e=>this.emit("drain")))}}[I](e,t){const n=this[p],r=n.blockRemain,i=r>=e.length&&0===t?e:e.slice(t,t+r);return n.write(i),n.blockRemain||(this[d]="header",this[p]=null,n.end()),i.length}[O](e,t){const n=this[p],r=this[I](e,t);return this[p]||this[b](n),r}[E](e,t,n){this[w].length||this[h]?this[w].push([e,t,n]):this.emit(e,t,n)}[b](e){switch(this[E]("meta",this[v]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[g]=c.parse(this[v],this[g],!1);break;case"GlobalExtendedHeader":this[y]=c.parse(this[v],this[y],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[g]=this[g]||Object.create(null),this[g].path=this[v].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[g]=this[g]||Object.create(null),this[g].linkpath=this[v].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[j]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[j])return;if(null===this[C]&&e){if(this[S]&&(e=Buffer.concat([this[S],e]),this[S]=null),e.length<u.length)return this[S]=e,!0;for(let t=0;null===this[C]&&t<u.length;t++)e[t]!==u[t]&&(this[C]=!1);if(null===this[C]){const t=this[T];this[T]=!1,this[C]=new l.Unzip,this[C].on("data",(e=>this[R](e))),this[C].on("error",(e=>this.abort(e))),this[C].on("end",(e=>{this[T]=!0,this[R]()})),this[k]=!0;const n=this[C][t?"end":"write"](e);return this[k]=!1,n}}this[k]=!0,this[C]?this[C].write(e):this[R](e),this[k]=!1;const t=!this[w].length&&(!this[h]||this[h].flowing);return t||this[w].length||this[h].once("drain",(e=>this.emit("drain"))),t}[A](e){e&&!this[j]&&(this[S]=this[S]?Buffer.concat([this[S],e]):e)}[N](){if(this[T]&&!this[_]&&!this[j]&&!this[D]){this[_]=!0;const e=this[p];if(e&&e.blockRemain){const t=this[S]?this[S].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[S]&&e.write(this[S]),e.end()}this[E](q)}}[R](e){if(this[D])this[A](e);else if(e||this[S]){if(this[D]=!0,this[S]){this[A](e);const t=this[S];this[S]=null,this[x](t)}else this[x](e);for(;this[S]&&this[S].length>=512&&!this[j]&&!this[F];){const e=this[S];this[S]=null,this[x](e)}this[D]=!1}else this[N]();this[S]&&!this[T]||this[N]()}[x](e){let t=0;const n=e.length;for(;t+512<=n&&!this[j]&&!this[F];)switch(this[d]){case"begin":case"header":this[P](e,t),t+=512;break;case"ignore":case"body":t+=this[I](e,t);break;case"meta":t+=this[O](e,t);break;default:throw new Error("invalid state: "+this[d])}t<n&&(this[S]?this[S]=Buffer.concat([e.slice(t),this[S]]):this[S]=e.slice(t))}end(e){this[j]||(this[C]?this[C].end(e):(this[T]=!0,this.write(e)))}})},10:(e,t,n)=>{const r=n(9491),i=n(1946),o=n(4922),{join:s}=n(1017),a="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);e.exports=()=>{const e=new Map,t=new Map,n=new Set,c=n=>{const{paths:r,dirs:i}=(n=>{const r=t.get(n);if(!r)throw new Error("function does not have any path reservations");return{paths:r.paths.map((t=>e.get(t))),dirs:[...r.dirs].map((t=>e.get(t)))}})(n);return r.every((e=>e[0]===n))&&i.every((e=>e[0]instanceof Set&&e[0].has(n)))},l=e=>!(n.has(e)||!c(e)||(n.add(e),e((()=>u(e))),0)),u=i=>{if(!n.has(i))return!1;const{paths:o,dirs:s}=t.get(i),a=new Set;return o.forEach((t=>{const n=e.get(t);r.equal(n[0],i),1===n.length?e.delete(t):(n.shift(),"function"==typeof n[0]?a.add(n[0]):n[0].forEach((e=>a.add(e))))})),s.forEach((t=>{const n=e.get(t);r(n[0]instanceof Set),1===n[0].size&&1===n.length?e.delete(t):1===n[0].size?(n.shift(),a.add(n[0])):n[0].delete(i)})),n.delete(i),a.forEach((e=>l(e))),!0};return{check:c,reserve:(n,r)=>{n=a?["win32 parallelization disabled"]:n.map((e=>i(o(s(e))).toLowerCase()));const c=new Set(n.map((e=>(e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>(e.length&&(t=s(e[e.length-1],t)),e.push(t||"/"),e)),[]);return t})(e))).reduce(((e,t)=>e.concat(t))));return t.set(r,{dirs:c,paths:n}),n.forEach((t=>{const n=e.get(t);n?n.push(r):e.set(t,[r])})),c.forEach((t=>{const n=e.get(t);n?n[n.length-1]instanceof Set?n[n.length-1].add(r):n.push(new Set([r])):e.set(t,[new Set([r])])})),l(r)}}}},4747:(e,t,n)=>{"use strict";const r=n(7134),i=n(1017);class o{constructor(e,t){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=t||!1}encode(){const e=this.encodeBody();if(""===e)return null;const t=Buffer.byteLength(e),n=512*Math.ceil(1+t/512),o=Buffer.allocUnsafe(n);for(let e=0;e<512;e++)o[e]=0;new r({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(o),o.write(e,512,t,"utf8");for(let e=t+512;e<o.length;e++)o[e]=0;return o}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(null===this[e]||void 0===this[e])return"";const t=" "+("dev"===e||"ino"===e||"nlink"===e?"SCHILY.":"")+e+"="+(this[e]instanceof Date?this[e].getTime()/1e3:this[e])+"\n",n=Buffer.byteLength(t);let r=Math.floor(Math.log(n)/Math.log(10))+1;return n+r>=Math.pow(10,r)&&(r+=1),r+n+t}}o.parse=(e,t,n)=>new o(s(a(e),t),n);const s=(e,t)=>t?Object.keys(e).reduce(((t,n)=>(t[n]=e[n],t)),t):e,a=e=>e.replace(/\n$/,"").split("\n").reduce(c,Object.create(null)),c=(e,t)=>{const n=parseInt(t,10);if(n!==Buffer.byteLength(t)+1)return e;const r=(t=t.substr((n+" ").length)).split("="),i=r.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!i)return e;const o=r.join("=");return e[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(1e3*o):/^[0-9]+$/.test(o)?+o:o,e};e.exports=o},6277:(e,t,n)=>{"use strict";const r=n(5736),i=n(2905),o=Symbol("slurp");e.exports=class extends r{constructor(e,t,n){switch(super(),this.pause(),this.extended=t,this.globalExtended=n,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=i(e.path),this.mode=e.mode,this.mode&&(this.mode=4095&this.mode),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=i(e.linkpath),this.uname=e.uname,this.gname=e.gname,t&&this[o](t),n&&this[o](n,!0)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-t),this.blockRemain=Math.max(0,r-t),!!this.ignore||(n>=t?super.write(e):super.write(e.slice(0,n)))}[o](e,t){for(const n in e)null===e[n]||void 0===e[n]||t&&"path"===n||(this[n]="path"===n||"linkpath"===n?i(e[n]):e[n])}}},1746:(e,t,n)=>{"use strict";const r=n(2093),i=n(8042),o=n(7147),s=n(292),a=n(6473),c=n(1017),l=n(7134);e.exports=(e,t,n)=>{const i=r(e);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),i.sync?u(i,t):p(i,t,n)};const u=(e,t)=>{const n=new i.Sync(e);let r,s,a=!0;try{try{r=o.openSync(e.file,"r+")}catch(t){if("ENOENT"!==t.code)throw t;r=o.openSync(e.file,"w+")}const i=o.fstatSync(r),c=Buffer.alloc(512);e:for(s=0;s<i.size;s+=512){for(let e=0,t=0;e<512;e+=t){if(t=o.readSync(r,c,e,c.length-e,s+e),0===s&&31===c[0]&&139===c[1])throw new Error("cannot append to compressed archives");if(!t)break e}const t=new l(c);if(!t.cksumValid)break;const n=512*Math.ceil(t.size/512);if(s+n+512>i.size)break;s+=n,e.mtimeCache&&e.mtimeCache.set(t.path,t.mtime)}a=!1,d(e,n,s,r,t)}finally{if(a)try{o.closeSync(r)}catch(e){}}},d=(e,t,n,r,i)=>{const o=new s.WriteStreamSync(e.file,{fd:r,start:n});t.pipe(o),h(t,i)},p=(e,t,n)=>{t=Array.from(t);const r=new i(e),a=new Promise(((n,i)=>{r.on("error",i);let a="r+";const c=(u,d)=>u&&"ENOENT"===u.code&&"r+"===a?(a="w+",o.open(e.file,a,c)):u?i(u):void o.fstat(d,((a,c)=>{if(a)return o.close(d,(()=>i(a)));((t,n,r)=>{const i=(e,n)=>{e?o.close(t,(t=>r(e))):r(null,n)};let s=0;if(0===n)return i(null,0);let a=0;const c=Buffer.alloc(512),u=(r,d)=>{if(r)return i(r);if(a+=d,a<512&&d)return o.read(t,c,a,c.length-a,s+a,u);if(0===s&&31===c[0]&&139===c[1])return i(new Error("cannot append to compressed archives"));if(a<512)return i(null,s);const p=new l(c);if(!p.cksumValid)return i(null,s);const h=512*Math.ceil(p.size/512);return s+h+512>n?i(null,s):(s+=h+512,s>=n?i(null,s):(e.mtimeCache&&e.mtimeCache.set(p.path,p.mtime),a=0,void o.read(t,c,0,512,s,u)))};o.read(t,c,0,512,s,u)})(d,c.size,((o,a)=>{if(o)return i(o);const c=new s.WriteStream(e.file,{fd:d,start:a});r.pipe(c),c.on("error",i),c.on("close",n),f(r,t)}))}));o.open(e.file,a,c)}));return n?a.then(n,n):a},h=(e,t)=>{t.forEach((t=>{"@"===t.charAt(0)?a({file:c.resolve(e.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:t=>e.add(t)}):e.add(t)})),e.end()},f=(e,t)=>{for(;t.length;){const n=t.shift();if("@"===n.charAt(0))return a({file:c.resolve(e.cwd,n.substr(1)),noResume:!0,onentry:t=>e.add(t)}).then((n=>f(e,t)));e.add(n)}e.end()}},2214:(e,t,n)=>{const{isAbsolute:r,parse:i}=n(1017).win32;e.exports=e=>{let t="",n=i(e);for(;r(e)||n.root;){const r="/"===e.charAt(0)&&"//?/"!==e.slice(0,4)?"/":n.root;e=e.substr(r.length),t+=r,n=i(e)}return[t,e]}},4922:e=>{e.exports=e=>{let t=e.length-1,n=-1;for(;t>-1&&"/"===e.charAt(t);)n=t,t--;return-1===n?e:e.slice(0,n)}},4402:(e,t)=>{"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},2699:(e,t,n)=>{"use strict";const r=n(9491),i=n(6824),o=n(7147),s=n(292),a=n(1017),c=n(3248),l=n(619),u=n(10),d=n(2214),p=n(2905),h=n(4922),f=n(1946),m=Symbol("onEntry"),g=Symbol("checkFs"),y=Symbol("checkFs2"),v=Symbol("pruneCache"),b=Symbol("isReusable"),S=Symbol("makeFs"),w=Symbol("file"),T=Symbol("directory"),_=Symbol("link"),E=Symbol("symlink"),C=Symbol("hardlink"),R=Symbol("unsupported"),x=Symbol("checkPath"),I=Symbol("mkdir"),O=Symbol("onError"),P=Symbol("pending"),D=Symbol("pend"),A=Symbol("unpend"),N=Symbol("ended"),k=Symbol("maybeClose"),j=Symbol("skip"),q=Symbol("doChown"),M=Symbol("uid"),L=Symbol("gid"),F=Symbol("checkedCwd"),U=n(6113),B=n(5879),z="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),H=(e,t,n)=>e===e>>>0?e:t===t>>>0?t:n,G=e=>f(h(p(e))).toLowerCase();class V extends i{constructor(e){if(e||(e={}),e.ondone=e=>{this[N]=!0,this[k]()},super(e),this[F]=!1,this.reservations=u(),this.transform="function"==typeof e.transform?e.transform:null,this.writable=!0,this.readable=!1,this[P]=0,this[N]=!1,this.dirCache=e.dirCache||new Map,"number"==typeof e.uid||"number"==typeof e.gid){if("number"!=typeof e.uid||"number"!=typeof e.gid)throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;void 0===e.preserveOwner&&"number"!=typeof e.uid?this.preserveOwner=process.getuid&&0===process.getuid():this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=!0===e.forceChown,this.win32=!!e.win32||z,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=p(a.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask="number"==typeof e.umask?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",(e=>this[m](e)))}warn(e,t,n={}){return"TAR_BAD_ARCHIVE"!==e&&"TAR_ABORT"!==e||(n.recoverable=!1),super.warn(e,t,n)}[k](){this[N]&&0===this[P]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[x](e){if(this.strip){const t=p(e.path).split("/");if(t.length<this.strip)return!1;if(e.path=t.slice(this.strip).join("/"),"Link"===e.type){const t=p(e.linkpath).split("/");if(!(t.length>=this.strip))return!1;e.linkpath=t.slice(this.strip).join("/")}}if(!this.preservePaths){const t=p(e.path),n=t.split("/");if(n.includes("..")||z&&/^[a-z]:\.\.$/i.test(n[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;const[r,i]=d(t);r&&(e.path=i,this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:e,path:t}))}if(a.isAbsolute(e.path)?e.absolute=p(a.resolve(e.path)):e.absolute=p(a.resolve(this.cwd,e.path)),!this.preservePaths&&0!==e.absolute.indexOf(this.cwd+"/")&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:p(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&"Directory"!==e.type&&"GNUDumpDir"!==e.type)return!1;if(this.win32){const{root:t}=a.win32.parse(e.absolute);e.absolute=t+l.encode(e.absolute.substr(t.length));const{root:n}=a.win32.parse(e.path);e.path=n+l.encode(e.path.substr(n.length))}return!0}[m](e){if(!this[x](e))return e.resume();switch(r.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=448|e.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[g](e);default:return this[R](e)}}[O](e,t){"CwdError"===e.name?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[A](),t.resume())}[I](e,t,n){c(p(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},n)}[q](e){return this.forceChown||this.preserveOwner&&("number"==typeof e.uid&&e.uid!==this.processUid||"number"==typeof e.gid&&e.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[M](e){return H(this.uid,e.uid,this.processUid)}[L](e){return H(this.gid,e.gid,this.processGid)}[w](e,t){const n=4095&e.mode||this.fmode,r=new s.WriteStream(e.absolute,{flags:B(e.size),mode:n,autoClose:!1});r.on("error",(n=>{r.fd&&o.close(r.fd,(()=>{})),r.write=()=>!0,this[O](n,e),t()}));let i=1;const a=n=>{if(n)return r.fd&&o.close(r.fd,(()=>{})),this[O](n,e),void t();0==--i&&o.close(r.fd,(n=>{n?this[O](n,e):this[A](),t()}))};r.on("finish",(t=>{const n=e.absolute,s=r.fd;if(e.mtime&&!this.noMtime){i++;const t=e.atime||new Date,r=e.mtime;o.futimes(s,t,r,(e=>e?o.utimes(n,t,r,(t=>a(t&&e))):a()))}if(this[q](e)){i++;const t=this[M](e),r=this[L](e);o.fchown(s,t,r,(e=>e?o.chown(n,t,r,(t=>a(t&&e))):a()))}a()}));const c=this.transform&&this.transform(e)||e;c!==e&&(c.on("error",(n=>{this[O](n,e),t()})),e.pipe(c)),c.pipe(r)}[T](e,t){const n=4095&e.mode||this.dmode;this[I](e.absolute,n,(n=>{if(n)return this[O](n,e),void t();let r=1;const i=n=>{0==--r&&(t(),this[A](),e.resume())};e.mtime&&!this.noMtime&&(r++,o.utimes(e.absolute,e.atime||new Date,e.mtime,i)),this[q](e)&&(r++,o.chown(e.absolute,this[M](e),this[L](e),i)),i()}))}[R](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[E](e,t){this[_](e,e.linkpath,"symlink",t)}[C](e,t){const n=p(a.resolve(this.cwd,e.linkpath));this[_](e,n,"link",t)}[D](){this[P]++}[A](){this[P]--,this[k]()}[j](e){this[A](),e.resume()}[b](e,t){return"File"===e.type&&!this.unlink&&t.isFile()&&t.nlink<=1&&!z}[g](e){this[D]();const t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,(t=>this[y](e,t)))}[v](e){"SymbolicLink"===e.type?(e=>{for(const t of e.keys())e.delete(t)})(this.dirCache):"Directory"!==e.type&&((e,t)=>{t=G(t);for(const n of e.keys()){const r=G(n);r!==t&&0!==r.indexOf(t+"/")||e.delete(n)}})(this.dirCache,e.absolute)}[y](e,t){this[v](e);const n=n=>{this[v](e),t(n)},r=()=>{if(e.absolute!==this.cwd){const t=p(a.dirname(e.absolute));if(t!==this.cwd)return this[I](t,this.dmode,(t=>{if(t)return this[O](t,e),void n();i()}))}i()},i=()=>{o.lstat(e.absolute,((t,r)=>{if(r&&(this.keep||this.newer&&r.mtime>e.mtime))return this[j](e),void n();if(t||this[b](e,r))return this[S](null,e,n);if(r.isDirectory()){if("Directory"===e.type){const t=t=>this[S](t,e,n);return!this.noChmod&&e.mode&&(4095&r.mode)!==e.mode?o.chmod(e.absolute,e.mode,t):t()}if(e.absolute!==this.cwd)return o.rmdir(e.absolute,(t=>this[S](t,e,n)))}if(e.absolute===this.cwd)return this[S](null,e,n);((e,t)=>{if(!z)return o.unlink(e,t);const n=e+".DELETE."+U.randomBytes(16).toString("hex");o.rename(e,n,(e=>{if(e)return t(e);o.unlink(n,t)}))})(e.absolute,(t=>this[S](t,e,n)))}))};this[F]?r():(()=>{this[I](this.cwd,this.dmode,(t=>{if(t)return this[O](t,e),void n();this[F]=!0,r()}))})()}[S](e,t,n){if(e)return this[O](e,t),void n();switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[w](t,n);case"Link":return this[C](t,n);case"SymbolicLink":return this[E](t,n);case"Directory":case"GNUDumpDir":return this[T](t,n)}}[_](e,t,n,r){o[n](t,e.absolute,(t=>{t?this[O](t,e):(this[A](),e.resume()),r()}))}}const W=e=>{try{return[null,e()]}catch(e){return[e,null]}};V.Sync=class extends V{[S](e,t){return super[S](e,t,(()=>{}))}[g](e){if(this[v](e),!this[F]){const t=this[I](this.cwd,this.dmode);if(t)return this[O](t,e);this[F]=!0}if(e.absolute!==this.cwd){const t=p(a.dirname(e.absolute));if(t!==this.cwd){const n=this[I](t,this.dmode);if(n)return this[O](n,e)}}const[t,n]=W((()=>o.lstatSync(e.absolute)));if(n&&(this.keep||this.newer&&n.mtime>e.mtime))return this[j](e);if(t||this[b](e,n))return this[S](null,e);if(n.isDirectory()){if("Directory"===e.type){const t=!this.noChmod&&e.mode&&(4095&n.mode)!==e.mode,[r]=t?W((()=>{o.chmodSync(e.absolute,e.mode)})):[];return this[S](r,e)}const[t]=W((()=>o.rmdirSync(e.absolute)));this[S](t,e)}const[r]=e.absolute===this.cwd?[]:W((()=>(e=>{if(!z)return o.unlinkSync(e);const t=e+".DELETE."+U.randomBytes(16).toString("hex");o.renameSync(e,t),o.unlinkSync(t)})(e.absolute)));this[S](r,e)}[w](e,t){const n=4095&e.mode||this.fmode,r=n=>{let r;try{o.closeSync(i)}catch(e){r=e}(n||r)&&this[O](n||r,e),t()};let i;try{i=o.openSync(e.absolute,B(e.size),n)}catch(e){return r(e)}const s=this.transform&&this.transform(e)||e;s!==e&&(s.on("error",(t=>this[O](t,e))),e.pipe(s)),s.on("data",(e=>{try{o.writeSync(i,e,0,e.length)}catch(e){r(e)}})),s.on("end",(t=>{let n=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date,r=e.mtime;try{o.futimesSync(i,t,r)}catch(i){try{o.utimesSync(e.absolute,t,r)}catch(e){n=i}}}if(this[q](e)){const t=this[M](e),r=this[L](e);try{o.fchownSync(i,t,r)}catch(i){try{o.chownSync(e.absolute,t,r)}catch(e){n=n||i}}}r(n)}))}[T](e,t){const n=4095&e.mode||this.dmode,r=this[I](e.absolute,n);if(r)return this[O](r,e),void t();if(e.mtime&&!this.noMtime)try{o.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(r){}if(this[q](e))try{o.chownSync(e.absolute,this[M](e),this[L](e))}catch(r){}t(),e.resume()}[I](e,t){try{return c.sync(p(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[_](e,t,n,r){try{o[n+"Sync"](t,e.absolute),r(),e.resume()}catch(t){return this[O](t,e)}}},e.exports=V},5997:(e,t,n)=>{"use strict";const r=n(2093),i=n(1746);e.exports=(e,t,n)=>{const s=r(e);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),o(s),i(s,t,n)};const o=e=>{const t=e.filter;e.mtimeCache||(e.mtimeCache=new Map),e.filter=t?(n,r)=>t(n,r)&&!(e.mtimeCache.get(n)>r.mtime):(t,n)=>!(e.mtimeCache.get(t)>n.mtime)}},7902:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,n={}){this.file&&(n.file=this.file),this.cwd&&(n.cwd=this.cwd),n.code=t instanceof Error&&t.code||e,n.tarCode=e,this.strict||!1===n.recoverable?t instanceof Error?this.emit("error",Object.assign(t,n)):this.emit("error",Object.assign(new Error(`${e}: ${t}`),n)):(t instanceof Error&&(n=Object.assign(t,n),t=t.message),this.emit("warn",n.tarCode,t,n))}}},619:e=>{"use strict";const t=["|","<",">","?",":"],n=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0)))),r=new Map(t.map(((e,t)=>[e,n[t]]))),i=new Map(n.map(((e,n)=>[e,t[n]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(r.get(t))),e),decode:e=>n.reduce(((e,t)=>e.split(t).join(i.get(t))),e)}},7620:(e,t,n)=>{"use strict";const r=n(5736),i=n(4747),o=n(7134),s=n(7147),a=n(1017),c=n(2905),l=n(4922),u=(e,t)=>t?(e=c(e).replace(/^\.(\/|$)/,""),l(t)+"/"+e):c(e),d=Symbol("process"),p=Symbol("file"),h=Symbol("directory"),f=Symbol("symlink"),m=Symbol("hardlink"),g=Symbol("header"),y=Symbol("read"),v=Symbol("lstat"),b=Symbol("onlstat"),S=Symbol("onread"),w=Symbol("onreadlink"),T=Symbol("openfile"),_=Symbol("onopenfile"),E=Symbol("close"),C=Symbol("mode"),R=Symbol("awaitDrain"),x=Symbol("ondrain"),I=Symbol("prefix"),O=Symbol("hadError"),P=n(7902),D=n(619),A=n(2214),N=n(7716),k=P(class extends r{constructor(e,t){if(super(t=t||{}),"string"!=typeof e)throw new TypeError("path is required");this.path=c(e),this.portable=!!t.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=t.maxReadSize||16777216,this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.preservePaths=!!t.preservePaths,this.cwd=c(t.cwd||process.cwd()),this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,this.prefix=t.prefix?c(t.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,"function"==typeof t.onwarn&&this.on("warn",t.onwarn);let n=!1;if(!this.preservePaths){const[e,t]=A(this.path);e&&(this.path=t,n=e)}this.win32=!!t.win32||"win32"===process.platform,this.win32&&(this.path=D.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=c(t.absolute||a.resolve(this.cwd,e)),""===this.path&&(this.path="./"),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.statCache.has(this.absolute)?this[b](this.statCache.get(this.absolute)):this[v]()}emit(e,...t){return"error"===e&&(this[O]=!0),super.emit(e,...t)}[v](){s.lstat(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[b](t)}))}[b](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=q(e),this.emit("stat",e),this[d]()}[d](){switch(this.type){case"File":return this[p]();case"Directory":return this[h]();case"SymbolicLink":return this[f]();default:return this.end()}}[C](e){return N(e,"Directory"===this.type,this.portable)}[I](e){return u(e,this.prefix)}[g](){"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.header=new o({path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,mode:this[C](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[h](){"/"!==this.path.substr(-1)&&(this.path+="/"),this.stat.size=0,this[g](),this.end()}[f](){s.readlink(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[w](t)}))}[w](e){this.linkpath=c(e),this[g](),this.end()}[m](e){this.type="Link",this.linkpath=c(a.relative(this.cwd,e)),this.stat.size=0,this[g](),this.end()}[p](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(0===t.indexOf(this.cwd))return this[m](t)}this.linkCache.set(e,this.absolute)}if(this[g](),0===this.stat.size)return this.end();this[T]()}[T](){s.open(this.absolute,"r",((e,t)=>{if(e)return this.emit("error",e);this[_](t)}))}[_](e){if(this.fd=e,this[O])return this[E]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[y]()}[y](){const{fd:e,buf:t,offset:n,length:r,pos:i}=this;s.read(e,t,n,r,i,((e,t)=>{if(e)return this[E]((()=>this.emit("error",e)));this[S](t)}))}[E](e){s.close(this.fd,e)}[S](e){if(e<=0&&this.remain>0){const e=new Error("encountered unexpected EOF");return e.path=this.absolute,e.syscall="read",e.code="EOF",this[E]((()=>this.emit("error",e)))}if(e>this.remain){const e=new Error("did not encounter expected EOF");return e.path=this.absolute,e.syscall="read",e.code="EOF",this[E]((()=>this.emit("error",e)))}if(e===this.remain)for(let t=e;t<this.length&&e<this.blockRemain;t++)this.buf[t+this.offset]=0,e++,this.remain++;const t=0===this.offset&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(t)?this[x]():this[R]((()=>this[x]()))}[R](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){const e=new Error("writing more data than expected");return e.path=this.absolute,this.emit("error",e)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[x](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[E]((e=>e?this.emit("error",e):this.end()));this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[y]()}}),j=P(class extends r{constructor(e,t){super(t=t||{}),this.preservePaths=!!t.preservePaths,this.portable=!!t.portable,this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.readEntry=e,this.type=e.type,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=t.prefix||null,this.path=c(e.path),this.mode=this[C](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:t.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=c(e.linkpath),"function"==typeof t.onwarn&&this.on("warn",t.onwarn);let n=!1;if(!this.preservePaths){const[e,t]=A(this.path);e&&(this.path=t,n=e)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new o({path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[I](e){return u(e,this.prefix)}[C](e){return N(e,"Directory"===this.type,this.portable)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=t,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});k.Sync=class extends k{[v](){this[b](s.lstatSync(this.absolute))}[f](){this[w](s.readlinkSync(this.absolute))}[T](){this[_](s.openSync(this.absolute,"r"))}[y](){let e=!0;try{const{fd:t,buf:n,offset:r,length:i,pos:o}=this,a=s.readSync(t,n,r,i,o);this[S](a),e=!1}finally{if(e)try{this[E]((()=>{}))}catch(e){}}}[R](e){e()}[E](e){s.closeSync(this.fd),e()}},k.Tar=j;const q=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=k},6276:(e,t,n)=>{const r=n(7147),i=n(1017),o=n(6113),s=n(5339),a=process.binding("constants"),c=s(),l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,d=(a.O_CREAT||a.fs.O_CREAT)|(a.O_EXCL||a.fs.O_EXCL)|(a.O_RDWR||a.fs.O_RDWR),p=a.EBADF||a.os.errno.EBADF,h=a.ENOENT||a.os.errno.ENOENT,f=[];var m=!1,g=!1;function y(e){var t=[],n=null;try{n=o.randomBytes(e)}catch(t){n=o.pseudoRandomBytes(e)}for(var r=0;r<e;r++)t.push(l[n[r]%l.length]);return t.join("")}function v(e){return void 0===e}function b(e,t){return"function"==typeof e?[t||{},e]:v(e)?[{},t]:[e,t]}function S(e){if(e.name)return i.join(e.dir||c,e.name);if(e.template)return e.template.replace(u,y(6));const t=[e.prefix||"tmp-",process.pid,y(12),e.postfix||""].join("");return i.join(e.dir||c,t)}function w(e,t){var n=b(e,t),i=n[0],o=n[1],s=i.name?1:i.tries||3;return isNaN(s)||s<0?o(new Error("Invalid tries")):i.template&&!i.template.match(u)?o(new Error("Invalid template provided")):void function e(){const t=S(i);r.stat(t,(function(n){if(!n)return s-- >0?e():o(new Error("Could not get a unique tmp filename, max tries reached "+t));o(null,t)}))}()}function T(e){var t=b(e)[0],n=t.name?1:t.tries||3;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(t.template&&!t.template.match(u))throw new Error("Invalid template provided");do{const e=S(t);try{r.statSync(e)}catch(t){return e}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function _(e){const t=[e];do{for(var n=t.pop(),o=!1,s=r.readdirSync(n),a=0,c=s.length;a<c;a++){var l=i.join(n,s[a]);r.lstatSync(l).isDirectory()?(o||(o=!0,t.push(n)),t.push(l)):r.unlinkSync(l)}o||r.rmdirSync(n)}while(0!==t.length)}function E(e,t,n){const i=R((function(e){try{0<=e[0]&&r.closeSync(e[0])}catch(e){if(!O(e,-p,"EBADF")&&!I(e))throw e}try{r.unlinkSync(e[1])}catch(e){if(!I(e))throw e}}),[t,e]);return n.keep||f.unshift(i),i}function C(e,t){const n=R(t.unsafeCleanup?_:r.rmdirSync.bind(r),e);return t.keep||f.unshift(n),n}function R(e,t){var n=!1;return function r(i){if(!n){const i=f.indexOf(r);i>=0&&f.splice(i,1),n=!0,e(t)}i&&i(null)}}function x(){if(!g||m)for(;f.length;)try{f[0].call(null)}catch(e){}}function I(e){return O(e,-h,"ENOENT")}function O(e,t,n){return e.code==t||e.code==n}const P=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));0===P[0]&&(P[1]<9||9===P[1]&&P[2]<5)&&process.addListener("uncaughtException",(function(e){throw g=!0,x(),e})),process.addListener("exit",(function(e){e&&(g=!0),x()})),e.exports.tmpdir=c,e.exports.dir=function(e,t){var n=b(e,t),i=n[0],o=n[1];w(i,(function(e,t){if(e)return o(e);r.mkdir(t,i.mode||448,(function(e){if(e)return o(e);o(null,t,C(t,i))}))}))},e.exports.dirSync=function(e){var t=b(e)[0];const n=T(t);return r.mkdirSync(n,t.mode||448),{name:n,removeCallback:C(n,t)}},e.exports.file=function(e,t){var n=b(e,t),i=n[0],o=n[1];i.postfix=v(i.postfix)?".tmp":i.postfix,w(i,(function(e,t){if(e)return o(e);r.open(t,d,i.mode||384,(function(e,n){return e?o(e):i.discardDescriptor?r.close(n,(function(e){if(e){try{r.unlinkSync(t)}catch(t){I(t)||(e=t)}return o(e)}o(null,t,void 0,E(t,-1,i))})):i.detachDescriptor?o(null,t,n,E(t,-1,i)):void o(null,t,n,E(t,n,i))}))}))},e.exports.fileSync=function(e){var t=b(e)[0];t.postfix=t.postfix||".tmp";const n=t.discardDescriptor||t.detachDescriptor,i=T(t);var o=r.openSync(i,d,t.mode||384);return t.discardDescriptor&&(r.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:E(i,n?-1:o,t)}},e.exports.tmpName=w,e.exports.tmpNameSync=T,e.exports.setGracefulCleanup=function(){m=!0}},3126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3680),i=n(2593);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None}),e.is=function(t){let n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o=t.CancellationToken||(t.CancellationToken={}));const s=Object.freeze((function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));class a{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new r.Emitter),this._emitter.event)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new a),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this.cancel()}}},3680:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var n=!1,r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...e){if(!this._callbacks)return[];for(var t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0),i=0,o=n.length;i<o;i++)try{t.push(n[i].apply(r[i],e))}catch(e){console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,i)=>{let o;return this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),o={dispose:()=>{this._callbacks.remove(e,t),o.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(i)&&i.push(o),o}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}r._noop=function(){},t.Emitter=r},2593:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},397:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={})),t.LinkedMap=class{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e){const t=this._map.get(e);if(t)return t.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}}delete(e){const t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}forEachReverse(e,t){let n=this._tail;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous}values(){let e=[],t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){let e=[],t=this._head;for(;t;)e.push(t.key),t=t.next;return e}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}}},8231:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const i=n(2593),o=n(3234);t.RequestType=o.RequestType,t.RequestType0=o.RequestType0,t.RequestType1=o.RequestType1,t.RequestType2=o.RequestType2,t.RequestType3=o.RequestType3,t.RequestType4=o.RequestType4,t.RequestType5=o.RequestType5,t.RequestType6=o.RequestType6,t.RequestType7=o.RequestType7,t.RequestType8=o.RequestType8,t.RequestType9=o.RequestType9,t.ResponseError=o.ResponseError,t.ErrorCodes=o.ErrorCodes,t.NotificationType=o.NotificationType,t.NotificationType0=o.NotificationType0,t.NotificationType1=o.NotificationType1,t.NotificationType2=o.NotificationType2,t.NotificationType3=o.NotificationType3,t.NotificationType4=o.NotificationType4,t.NotificationType5=o.NotificationType5,t.NotificationType6=o.NotificationType6,t.NotificationType7=o.NotificationType7,t.NotificationType8=o.NotificationType8,t.NotificationType9=o.NotificationType9;const s=n(6386);t.MessageReader=s.MessageReader,t.StreamMessageReader=s.StreamMessageReader,t.IPCMessageReader=s.IPCMessageReader,t.SocketMessageReader=s.SocketMessageReader;const a=n(9725);t.MessageWriter=a.MessageWriter,t.StreamMessageWriter=a.StreamMessageWriter,t.IPCMessageWriter=a.IPCMessageWriter,t.SocketMessageWriter=a.SocketMessageWriter;const c=n(3680);t.Disposable=c.Disposable,t.Event=c.Event,t.Emitter=c.Emitter;const l=n(3126);t.CancellationTokenSource=l.CancellationTokenSource,t.CancellationToken=l.CancellationToken;const u=n(397);var d,p,h,f,m,g,y;r(n(3377)),r(n(1609)),function(e){e.type=new o.NotificationType("$/cancelRequest")}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(h=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTraceNotification")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(g=t.ConnectionErrors||(t.ConnectionErrors={}));class v extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,v.prototype)}}function b(e,t,n,r){let s=0,a=0,b=0;const S="2.0";let w,T,_,E,C=Object.create(null),R=Object.create(null),x=new u.LinkedMap,I=Object.create(null),O=Object.create(null),P=p.Off,D=h.Text,A=y.New,N=new c.Emitter,k=new c.Emitter,j=new c.Emitter,q=new c.Emitter;function M(e){return"req-"+e.toString()}function L(e){}function F(){return A===y.Listening}function U(){return A===y.Closed}function B(){return A===y.Disposed}function z(){A!==y.New&&A!==y.Listening||(A=y.Closed,k.fire(void 0))}function H(){_||0===x.size||(_=setImmediate((()=>{_=void 0,function(){if(0===x.size)return;let e=x.shift();try{o.isRequestMessage(e)?function(e){if(B())return;function n(n,r,i){let s={jsonrpc:S,id:e.id};n instanceof o.ResponseError?s.error=n.toJson():s.result=void 0===n?null:n,V(s,r,i),t.write(s)}function r(n,r,i){let o={jsonrpc:S,id:e.id,error:n.toJson()};V(o,r,i),t.write(o)}!function(e){if(P!==p.Off&&E)if(D===h.Text){let t;P===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),E.log(`Received request '${e.method} - (${e.id})'.`,t)}else W("receive-request",e)}(e);let s,a,c=C[e.method];c&&(s=c.type,a=c.handler);let u=Date.now();if(a||w){let c=new l.CancellationTokenSource,d=String(e.id);O[d]=c;try{let l;l=void 0===e.params||void 0!==s&&0===s.numberOfParams?a?a(c.token):w(e.method,c.token):i.array(e.params)&&(void 0===s||s.numberOfParams>1)?a?a(...e.params,c.token):w(e.method,...e.params,c.token):a?a(e.params,c.token):w(e.method,e.params,c.token);let p=l;l?p.then?p.then((t=>{delete O[d],n(t,e.method,u)}),(t=>{delete O[d],t instanceof o.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(delete O[d],n(l,e.method,u)):(delete O[d],function(n,r,i){void 0===n&&(n=null);let o={jsonrpc:S,id:e.id,result:n};V(o,r,i),t.write(o)}(l,e.method,u))}catch(t){delete O[d],t instanceof o.ResponseError?n(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):o.isNotificationMessage(e)?function(e){if(B())return;let t,r;if(e.method===d.type.method)r=e=>{let t=e.id,n=O[String(t)];n&&n.cancel()};else{let n=R[e.method];n&&(r=n.handler,t=n.type)}if(r||T)try{!function(e){if(P!==p.Off&&E&&e.method!==m.type.method)if(D===h.Text){let t;P===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),E.log(`Received notification '${e.method}'.`,t)}else W("receive-notification",e)}(e),void 0===e.params||void 0!==t&&0===t.numberOfParams?r?r():T(e.method):i.array(e.params)&&(void 0===t||t.numberOfParams>1)?r?r(...e.params):T(e.method,...e.params):r?r(e.params):T(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else j.fire(e)}(e):o.isResponseMessage(e)?function(e){if(!B())if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),r=I[t];if(function(e,t){if(P!==p.Off&&E)if(D===h.Text){let n;if(P===p.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";E.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else E.log(`Received response ${e.id} without active response promise.`,n)}else W("receive-response",e)}(e,r),r){delete I[t];try{if(e.error){let t=e.error;r.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${r.method}' failed with message: ${e.message}`):n.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(i.string(t.id)||i.number(t.id)){let e=String(t.id),n=I[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{H()}}()})))}e.onClose(z),e.onError((function(e){N.fire([e,void 0,void 0])})),t.onClose(z),t.onError((function(e){N.fire(e)}));let G=e=>{try{if(o.isNotificationMessage(e)&&e.method===d.type.method){let n=M(e.params.id),i=x.get(n);if(o.isRequestMessage(i)){let o=r&&r.cancelUndispatched?r.cancelUndispatched(i,L):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return x.delete(n),o.id=i.id,V(o,e.method,Date.now()),void t.write(o)}}!function(e,t){var n;o.isRequestMessage(t)?e.set(M(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++b).toString():"res-"+n.toString(),t):e.set("not-"+(++a).toString(),t)}(x,e)}finally{H()}};function V(e,t,n){if(P!==p.Off&&E)if(D===h.Text){let r;P===p.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),E.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else W("send-response",e)}function W(e,t){if(!E||P===p.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};E.log(n)}function $(){if(U())throw new v(g.Closed,"Connection is closed.");if(B())throw new v(g.Disposed,"Connection is disposed.")}function K(e){return void 0===e?null:e}function Q(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=null;break;case 1:n=K(t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(K(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}let J={sendNotification:(e,...n)=>{let r,o;if($(),i.string(e))switch(r=e,n.length){case 0:o=null;break;case 1:o=n[0];break;default:o=n}else r=e.method,o=Q(e,n);let s={jsonrpc:S,method:r,params:o};!function(e){if(P!==p.Off&&E)if(D===h.Text){let t;P===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),E.log(`Sending notification '${e.method}'.`,t)}else W("send-notification",e)}(s),t.write(s)},onNotification:(e,t)=>{$(),i.func(e)?T=e:t&&(i.string(e)?R[e]={type:void 0,handler:t}:R[e.method]={type:e,handler:t})},sendRequest:(e,...n)=>{let r,a,c;if($(),function(){if(!F())throw new Error("Call listen() first.")}(),i.string(e))switch(r=e,n.length){case 0:a=null;break;case 1:l.CancellationToken.is(n[0])?(a=null,c=n[0]):a=K(n[0]);break;default:const e=n.length-1;l.CancellationToken.is(n[e])?(c=n[e],a=2===n.length?K(n[0]):n.slice(0,e).map((e=>K(e)))):a=n.map((e=>K(e)))}else{r=e.method,a=Q(e,n);let t=e.numberOfParams;c=l.CancellationToken.is(n[t])?n[t]:void 0}let u=s++,f=new Promise(((e,n)=>{let i={jsonrpc:S,id:u,method:r,params:a},s={method:r,timerStart:Date.now(),resolve:e,reject:n};!function(e){if(P!==p.Off&&E)if(D===h.Text){let t;P===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),E.log(`Sending request '${e.method} - (${e.id})'.`,t)}else W("send-request",e)}(i);try{t.write(i)}catch(e){s.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),s=null}s&&(I[String(u)]=s)}));return c&&c.onCancellationRequested((()=>{J.sendNotification(d.type,{id:u})})),f},onRequest:(e,t)=>{$(),i.func(e)?w=e:t&&(i.string(e)?C[e]={type:void 0,handler:t}:C[e.method]={type:e,handler:t})},trace:(e,t,n)=>{let r=!1,o=h.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||h.Text)),P=e,D=o,E=P===p.Off?void 0:t,!r||U()||B()||J.sendNotification(f.type,{value:p.toString(e)})},onError:N.event,onClose:k.event,onUnhandledNotification:j.event,onDispose:q.event,dispose:()=>{if(B())return;A=y.Disposed,q.fire(void 0);let n=new Error("Connection got disposed.");Object.keys(I).forEach((e=>{I[e].reject(n)})),I=Object.create(null),O=Object.create(null),x=new u.LinkedMap,i.func(t.dispose)&&t.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{$(),function(){if(F())throw new v(g.AlreadyListening,"Connection is already listening")}(),A=y.Listening,e.listen(G)},inspect:()=>{console.log("inspect")}};return J.onNotification(m.type,(e=>{P!==p.Off&&E&&E.log(e.message,P===p.Verbose?e.verbose:void 0)})),J}t.ConnectionError=v,(t.ConnectionStrategy||(t.ConnectionStrategy={})).is=function(e){let t=e;return t&&i.func(t.cancelUndispatched)},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(y||(y={})),t.createMessageConnection=function(e,n,r,i){r||(r=t.NullLogger);let o=void 0!==(c=e).listen&&void 0===c.read?e:new s.StreamMessageReader(e);var c;let l=function(e){return void 0!==e.write&&void 0===e.end}(n)?n:new a.StreamMessageWriter(n);return b(o,l,r,i)}},6386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3680),i=n(2593);let o=8192,s=Buffer.from("\r","ascii")[0],a=Buffer.from("\n","ascii")[0];class c{constructor(e="utf8"){this.encoding=e,this.index=0,this.buffer=Buffer.allocUnsafe(o)}append(e){var t=e;if("string"==typeof e){var n=e,r=Buffer.byteLength(n,this.encoding);(t=Buffer.allocUnsafe(r)).write(n,0,r,this.encoding)}if(this.buffer.length-this.index>=t.length)t.copy(this.buffer,this.index,0,t.length);else{var i=(Math.ceil((this.index+t.length)/o)+1)*o;0===this.index?(this.buffer=Buffer.allocUnsafe(i),t.copy(this.buffer,0,0,t.length)):this.buffer=Buffer.concat([this.buffer.slice(0,this.index),t],i)}this.index+=t.length}tryReadHeaders(){let e,t=0;for(;t+3<this.index&&(this.buffer[t]!==s||this.buffer[t+1]!==a||this.buffer[t+2]!==s||this.buffer[t+3]!==a);)t++;if(t+3>=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((t=>{let n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");let r=t.substr(0,n),i=t.substr(n+1).trim();e[r]=i}));let n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e}tryReadContent(e){if(this.index<e)return null;let t=this.buffer.toString(this.encoding,0,e),n=e;return this.buffer.copy(this.buffer,0,n),this.index=this.index-n,t}get numberOfBytes(){return this.index}}(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)};class l{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader recevied error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=l;class u extends l{constructor(e,t="utf8"){super(),this.readable=e,this.buffer=new c(t),this._partialMessageTimeout=1e4}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e,this.readable.on("data",(e=>{this.onData(e)})),this.readable.on("error",(e=>this.fireError(e))),this.readable.on("close",(()=>this.fireClose()))}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var n=JSON.parse(t);this.callback(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=u,t.IPCMessageReader=class extends l{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){this.process.on("message",e)}},t.SocketMessageReader=class extends u{constructor(e,t="utf-8"){super(e,t)}}},9725:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3680),i=n(2593);let o="Content-Length: ",s="\r\n";(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)};class a{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer recevied error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=a,t.StreamMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",(e=>this.fireError(e))),this.writable.on("close",(()=>this.fireClose()))}write(e){let t=JSON.stringify(e),n=Buffer.byteLength(t,this.encoding),r=[o,n.toString(),s,s];try{this.writable.write(r.join(""),"ascii"),this.writable.write(t,this.encoding),this.errorCount=0}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.IPCMessageWriter=class extends a{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,(t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.SocketMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",(e=>this.fireError(e))),this.socket.on("close",(()=>this.fireClose()))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){let t=JSON.stringify(e),n=Buffer.byteLength(t,this.encoding),r=[o,n.toString(),s,s];try{this.sending=!0,this.socket.write(r.join(""),"ascii",(n=>{n&&this.handleError(n,e);try{this.socket.write(t,this.encoding,(t=>{this.sending=!1,t?this.handleError(t,e):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(n){this.handleError(n,e)}}))}catch(t){this.handleError(t,e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}},3234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2593);var i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e,t){this._method=e,this._numberOfParams=t}get method(){return this._method}get numberOfParams(){return this._numberOfParams}}t.AbstractMessageType=s,t.RequestType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.RequestType=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.RequestType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.RequestType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.RequestType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.RequestType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.RequestType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.RequestType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.RequestType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.NotificationType=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.NotificationType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.NotificationType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.NotificationType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.NotificationType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.NotificationType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.NotificationType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.NotificationType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.NotificationType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.isRequestMessage=function(e){let t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},t.isNotificationMessage=function(e){let t=e;return t&&r.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){let t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},3377:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1017),i=n(2037),o=n(6113),s=n(1808),a=n(6386),c=n(9725);t.generateRandomPipeName=function(){const e=o.randomBytes(21).toString("hex");return"win32"===process.platform?`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`:r.join(i.tmpdir(),`vscode-${e}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n,r=new Promise(((e,t)=>{n=e}));return new Promise(((i,o)=>{let l=s.createServer((e=>{l.close(),n([new a.SocketMessageReader(e,t),new c.SocketMessageWriter(e,t)])}));l.on("error",o),l.listen(e,(()=>{l.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=s.createConnection(e);return[new a.SocketMessageReader(n,t),new c.SocketMessageWriter(n,t)]}},1609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1808),i=n(6386),o=n(9725);t.createClientSocketTransport=function(e,t="utf-8"){let n,s=new Promise(((e,t)=>{n=e}));return new Promise(((a,c)=>{let l=r.createServer((e=>{l.close(),n([new i.SocketMessageReader(e,t),new o.SocketMessageWriter(e,t)])}));l.on("error",c),l.listen(e,"127.0.0.1",(()=>{l.removeListener("error",c),a({onConnected:()=>s})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=r.createConnection(e,"127.0.0.1");return[new i.SocketMessageReader(n,t),new o.SocketMessageWriter(n,t)]}},5620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496),i=n(4192),o=n(4103),s=n(3101),a=n(2097),c=n(3299),l=n(4489);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(4192));class u{error(e){console.error(e)}warn(e){console.warn(e)}info(e){console.info(e)}log(e){console.log(e)}}var d,p,h,f,m;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(d=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(p=t.CloseAction||(t.CloseAction={}));class g{constructor(e){this.name=e,this.restarts=[]}error(e,t,n){return n&&n<=3?d.Continue:d.Shutdown}closed(){return this.restarts.push(Date.now()),this.restarts.length<5?p.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(r.window.showErrorMessage(`The ${this.name} server crashed 5 times in the last 3 minutes. The server will not be restarted.`),p.DoNotRestart):(this.restarts.shift(),p.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(h=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(f=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(m||(m={}));const y=[i.SymbolKind.File,i.SymbolKind.Module,i.SymbolKind.Namespace,i.SymbolKind.Package,i.SymbolKind.Class,i.SymbolKind.Method,i.SymbolKind.Property,i.SymbolKind.Field,i.SymbolKind.Constructor,i.SymbolKind.Enum,i.SymbolKind.Interface,i.SymbolKind.Function,i.SymbolKind.Variable,i.SymbolKind.Constant,i.SymbolKind.String,i.SymbolKind.Number,i.SymbolKind.Boolean,i.SymbolKind.Array,i.SymbolKind.Object,i.SymbolKind.Key,i.SymbolKind.Null,i.SymbolKind.EnumMember,i.SymbolKind.Struct,i.SymbolKind.Event,i.SymbolKind.Operator,i.SymbolKind.TypeParameter],v=[i.CompletionItemKind.Text,i.CompletionItemKind.Method,i.CompletionItemKind.Function,i.CompletionItemKind.Constructor,i.CompletionItemKind.Field,i.CompletionItemKind.Variable,i.CompletionItemKind.Class,i.CompletionItemKind.Interface,i.CompletionItemKind.Module,i.CompletionItemKind.Property,i.CompletionItemKind.Unit,i.CompletionItemKind.Value,i.CompletionItemKind.Enum,i.CompletionItemKind.Keyword,i.CompletionItemKind.Snippet,i.CompletionItemKind.Color,i.CompletionItemKind.File,i.CompletionItemKind.Reference,i.CompletionItemKind.Folder,i.CompletionItemKind.EnumMember,i.CompletionItemKind.Constant,i.CompletionItemKind.Struct,i.CompletionItemKind.Event,i.CompletionItemKind.Operator,i.CompletionItemKind.TypeParameter];function b(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var S;!function(e){e.is=function(e){let t=e;return t&&a.func(t.register)&&a.func(t.unregister)&&a.func(t.dispose)&&void 0!==t.messages}}(S||(S={}));class w{constructor(e,t,n,r,i,o){this._client=e,this._event=t,this._type=n,this._middleware=r,this._createParams=i,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(r.languages.match(n,t))return!0;return!1}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,(e=>this._client.sendNotification(this._type,this._createParams(e)))):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))}notificationSent(e){}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class T extends w{constructor(e,t){super(e,r.workspace.onDidOpenTextDocument,i.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),w.textDocumentFilter),this._syncedDocuments=t}get messages(){return i.DidOpenTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){if(super.register(e,t),!t.registerOptions.documentSelector)return;let n=t.registerOptions.documentSelector;r.workspace.textDocuments.forEach((e=>{let t=e.uri.toString();if(!this._syncedDocuments.has(t)&&r.languages.match(n,e)){let n=this._client.clientOptions.middleware,r=e=>{this._client.sendNotification(this._type,this._createParams(e))};n.didOpen?n.didOpen(e,r):r(e),this._syncedDocuments.set(t,e)}}))}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class _ extends w{constructor(e,t){super(e,r.workspace.onDidCloseTextDocument,i.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),w.textDocumentFilter),this._syncedDocuments=t}get messages(){return i.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.delete(e.uri.toString())}unregister(e){let t=this._selectors.get(e);super.unregister(e);let n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(r.languages.match(t,e)&&!this._selectorFilter(n,e)){let t=this._client.clientOptions.middleware,n=e=>{this._client.sendNotification(this._type,this._createParams(e))};this._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,n):n(e)}}))}}class E{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get messages(){return i.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==i.TextDocumentSyncKind.None&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))}callback(e){if(0!==e.contentChanges.length)for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===i.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,(()=>this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t))):this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===i.TextDocumentSyncKind.Full){let t=e=>{this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger((()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}))):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new c.Delayer(200)},this._changeDelayer.delayer.trigger((()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}),-1))};n.didChange?n.didChange(e,t):t(e)}}}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}}class C extends w{constructor(e){super(e,r.workspace.onWillSaveTextDocument,i.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),((e,t)=>w.textDocumentFilter(e,t.document)))}get messages(){return i.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}}class R{constructor(e){this._client=e,this._selectors=new Map}get messages(){return i.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){if(w.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(i.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((e=>{let t=this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class x extends w{constructor(e){super(e,r.workspace.onDidSaveTextDocument,i.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),w.textDocumentFilter)}get messages(){return i.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.save&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!n.save.includeText})})}register(e,t){this._includeText=!!t.registerOptions.includeText,super.register(e,t)}}class I{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get messages(){return i.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){b(b(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e,t){if(!Array.isArray(t.registerOptions.watchers))return;let n=[];for(let e of t.registerOptions.watchers){if(!a.string(e.globPattern))continue;let t=!0,o=!0,s=!0;void 0!==e.kind&&null!==e.kind&&(t=0!=(e.kind&i.WatchKind.Create),o=0!=(e.kind&i.WatchKind.Change),s=0!=(e.kind&i.WatchKind.Delete));let c=r.workspace.createFileSystemWatcher(e.globPattern,!t,!o,!s);this.hookListeners(c,t,o,s),n.push(c)}this._watchers.set(t.id,n)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,r,o){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Created})),null,o),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Changed})),null,o),r&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Deleted})),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}class O{constructor(e,t){this._client=e,this._message=t,this._providers=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wrong feature. Requested ${e.method} but reached feature ${this.messages.method}`);if(!t.registerOptions.documentSelector)return;let n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)}unregister(e){let t=this._providers.get(e);t&&t.dispose()}dispose(){this._providers.forEach((e=>{e.dispose()})),this._providers.clear()}}t.TextDocumentFeature=O;class P{constructor(e,t){this._client=e,this._message=t,this._providers=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wron feature. Requested ${e.method} but reached feature ${this.messages.method}`);let n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)}unregister(e){let t=this._providers.get(e);t&&t.dispose()}dispose(){this._providers.forEach((e=>{e.dispose()})),this._providers.clear()}}class D extends O{constructor(e){super(e,i.CompletionRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0},t.completionItemKind={valueSet:v}}initialize(e,t){e.completionProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.completionProvider)})}registerLanguageProvider(e){let t=e.triggerCharacters||[],n=this._client,o=(e,t,r,o)=>n.sendRequest(i.CompletionRequest.type,n.code2ProtocolConverter.asCompletionParams(e,t,r),o).then(n.protocol2CodeConverter.asCompletionResult,(e=>(n.logFailedRequest(i.CompletionRequest.type,e),Promise.resolve([])))),s=(e,t)=>n.sendRequest(i.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,(t=>(n.logFailedRequest(i.CompletionResolveRequest.type,t),Promise.resolve(e)))),a=this._client.clientOptions.middleware;return r.languages.registerCompletionItemProvider(e.documentSelector,{provideCompletionItems:(e,t,n,r)=>a.provideCompletionItem?a.provideCompletionItem(e,t,r,n,o):o(e,t,r,n),resolveCompletionItem:e.resolveProvider?(e,t)=>a.resolveCompletionItem?a.resolveCompletionItem(e,t,s):s(e,t):void 0},...t)}}class A extends O{constructor(e){super(e,i.HoverRequest.type)}fillClientCapabilities(e){const t=b(b(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[i.MarkupKind.Markdown,i.MarkupKind.PlainText]}initialize(e,t){e.hoverProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.HoverRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asHover,(e=>(t.logFailedRequest(i.HoverRequest.type,e),Promise.resolve(null)))),o=t.clientOptions.middleware;return r.languages.registerHoverProvider(e.documentSelector,{provideHover:(e,t,r)=>o.provideHover?o.provideHover(e,t,r,n):n(e,t,r)})}}class N extends O{constructor(e){super(e,i.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0}}initialize(e,t){e.signatureHelpProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.signatureHelpProvider)})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.SignatureHelpRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asSignatureHelp,(e=>(t.logFailedRequest(i.SignatureHelpRequest.type,e),Promise.resolve(null)))),o=t.clientOptions.middleware,s=e.triggerCharacters||[];return r.languages.registerSignatureHelpProvider(e.documentSelector,{provideSignatureHelp:(e,t,r)=>o.provideSignatureHelp?o.provideSignatureHelp(e,t,r,n):n(e,t,r)},...s)}}class k extends O{constructor(e){super(e,i.DefinitionRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){e.definitionProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.DefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDefinitionResult,(e=>(t.logFailedRequest(i.DefinitionRequest.type,e),Promise.resolve(null)))),o=t.clientOptions.middleware;return r.languages.registerDefinitionProvider(e.documentSelector,{provideDefinition:(e,t,r)=>o.provideDefinition?o.provideDefinition(e,t,r,n):n(e,t,r)})}}class j extends O{constructor(e){super(e,i.ReferencesRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){e.referencesProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>t.sendRequest(i.ReferencesRequest.type,t.code2ProtocolConverter.asReferenceParams(e,n,r),o).then(t.protocol2CodeConverter.asReferences,(e=>(t.logFailedRequest(i.ReferencesRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerReferenceProvider(e.documentSelector,{provideReferences:(e,t,r,i)=>o.provideReferences?o.provideReferences(e,t,r,i,n):n(e,t,r,i)})}}class q extends O{constructor(e){super(e,i.DocumentHighlightRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){e.documentHighlightProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.DocumentHighlightRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDocumentHighlights,(e=>(t.logFailedRequest(i.DocumentHighlightRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerDocumentHighlightProvider(e.documentSelector,{provideDocumentHighlights:(e,t,r)=>o.provideDocumentHighlights?o.provideDocumentHighlights(e,t,r,n):n(e,t,r)})}}class M extends O{constructor(e){super(e,i.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y},t.hierarchicalDocumentSymbolSupport=!0}initialize(e,t){e.documentSymbolProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.DocumentSymbolRequest.type,t.code2ProtocolConverter.asDocumentSymbolParams(e),n).then((e=>{if(null!==e){if(0===e.length)return[];{let n=e[0];return i.DocumentSymbol.is(n)?t.protocol2CodeConverter.asDocumentSymbols(e):t.protocol2CodeConverter.asSymbolInformations(e)}}}),(e=>(t.logFailedRequest(i.DocumentSymbolRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerDocumentSymbolProvider(e.documentSelector,{provideDocumentSymbols:(e,t)=>o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,n):n(e,t)})}}class L extends P{constructor(e){super(e,i.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=b(b(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y}}initialize(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:l.generateUuid(),registerOptions:void 0})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.WorkspaceSymbolRequest.type,{query:e},n).then(t.protocol2CodeConverter.asSymbolInformations,(e=>(t.logFailedRequest(i.WorkspaceSymbolRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:(e,t)=>o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,n):n(e,t)})}}class F extends O{constructor(e){super(e,i.CodeActionRequest.type)}fillClientCapabilities(e){const t=b(b(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:["",i.CodeActionKind.QuickFix,i.CodeActionKind.Refactor,i.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorRewrite,i.CodeActionKind.Source,i.CodeActionKind.SourceOrganizeImports]}}}initialize(e,t){if(!e.codeActionProvider||!t)return;let n;a.boolean(e.codeActionProvider)||(n=e.codeActionProvider.codeActionKinds),this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t,codeActionKinds:n}})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>{let s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),context:t.code2ProtocolConverter.asCodeActionContext(r)};return t.sendRequest(i.CodeActionRequest.type,s,o).then((e=>{if(null===e)return;let n=[];for(let r of e)i.Command.is(r)?n.push(t.protocol2CodeConverter.asCommand(r)):n.push(t.protocol2CodeConverter.asCodeAction(r));return n}),(e=>(t.logFailedRequest(i.CodeActionRequest.type,e),Promise.resolve([]))))},o=t.clientOptions.middleware;return r.languages.registerCodeActionsProvider(e.documentSelector,{provideCodeActions:(e,t,r,i)=>o.provideCodeActions?o.provideCodeActions(e,t,r,i,n):n(e,t,r,i)},e.codeActionKinds?{providedCodeActionKinds:t.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0)}}class U extends O{constructor(e){super(e,i.CodeLensRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"codeLens").dynamicRegistration=!0}initialize(e,t){e.codeLensProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.codeLensProvider)})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.CodeLensRequest.type,t.code2ProtocolConverter.asCodeLensParams(e),n).then(t.protocol2CodeConverter.asCodeLenses,(e=>(t.logFailedRequest(i.CodeLensRequest.type,e),Promise.resolve([])))),o=(e,n)=>t.sendRequest(i.CodeLensResolveRequest.type,t.code2ProtocolConverter.asCodeLens(e),n).then(t.protocol2CodeConverter.asCodeLens,(n=>(t.logFailedRequest(i.CodeLensResolveRequest.type,n),e))),s=t.clientOptions.middleware;return r.languages.registerCodeLensProvider(e.documentSelector,{provideCodeLenses:(e,t)=>s.provideCodeLenses?s.provideCodeLenses(e,t,n):n(e,t),resolveCodeLens:e.resolveProvider?(e,t)=>s.resolveCodeLens?s.resolveCodeLens(e,t,o):o(e,t):void 0})}}class B extends O{constructor(e){super(e,i.DocumentFormattingRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){e.documentFormattingProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>{let o={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),options:t.code2ProtocolConverter.asFormattingOptions(n)};return t.sendRequest(i.DocumentFormattingRequest.type,o,r).then(t.protocol2CodeConverter.asTextEdits,(e=>(t.logFailedRequest(i.DocumentFormattingRequest.type,e),Promise.resolve([]))))},o=t.clientOptions.middleware;return r.languages.registerDocumentFormattingEditProvider(e.documentSelector,{provideDocumentFormattingEdits:(e,t,r)=>o.provideDocumentFormattingEdits?o.provideDocumentFormattingEdits(e,t,r,n):n(e,t,r)})}}class z extends O{constructor(e){super(e,i.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){e.documentRangeFormattingProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>{let s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),options:t.code2ProtocolConverter.asFormattingOptions(r)};return t.sendRequest(i.DocumentRangeFormattingRequest.type,s,o).then(t.protocol2CodeConverter.asTextEdits,(e=>(t.logFailedRequest(i.DocumentRangeFormattingRequest.type,e),Promise.resolve([]))))},o=t.clientOptions.middleware;return r.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,{provideDocumentRangeFormattingEdits:(e,t,r,i)=>o.provideDocumentRangeFormattingEdits?o.provideDocumentRangeFormattingEdits(e,t,r,i,n):n(e,t,r,i)})}}class H extends O{constructor(e){super(e,i.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){e.documentOnTypeFormattingProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentOnTypeFormattingProvider)})}registerLanguageProvider(e){let t=this._client,n=e.moreTriggerCharacter||[],o=(e,n,r,o,s)=>{let a={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),ch:r,options:t.code2ProtocolConverter.asFormattingOptions(o)};return t.sendRequest(i.DocumentOnTypeFormattingRequest.type,a,s).then(t.protocol2CodeConverter.asTextEdits,(e=>(t.logFailedRequest(i.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([]))))},s=t.clientOptions.middleware;return r.languages.registerOnTypeFormattingEditProvider(e.documentSelector,{provideOnTypeFormattingEdits:(e,t,n,r,i)=>s.provideOnTypeFormattingEdits?s.provideOnTypeFormattingEdits(e,t,n,r,i,o):o(e,t,n,r,i)},e.firstTriggerCharacter,...n)}}class G extends O{constructor(e){super(e,i.RenameRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0}initialize(e,t){if(!e.renameProvider||!t)return;let n=Object.assign({},{documentSelector:t});a.boolean(e.renameProvider)?n.prepareProvider=!1:n.prepareProvider=e.renameProvider.prepareProvider,this.register(this.messages,{id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>{let s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),newName:r};return t.sendRequest(i.RenameRequest.type,s,o).then(t.protocol2CodeConverter.asWorkspaceEdit,(e=>(t.logFailedRequest(i.RenameRequest.type,e),Promise.reject(new Error(e.message)))))},o=(e,n,r)=>{let o={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n)};return t.sendRequest(i.PrepareRenameRequest.type,o,r).then((e=>i.Range.is(e)?t.protocol2CodeConverter.asRange(e):e&&e.range?{range:t.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:null),(e=>(t.logFailedRequest(i.PrepareRenameRequest.type,e),Promise.reject(new Error(e.message)))))},s=t.clientOptions.middleware;return r.languages.registerRenameProvider(e.documentSelector,{provideRenameEdits:(e,t,r,i)=>s.provideRenameEdits?s.provideRenameEdits(e,t,r,i,n):n(e,t,r,i),prepareRename:e.prepareProvider?(e,t,n)=>s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n):void 0})}}class V extends O{constructor(e){super(e,i.DocumentLinkRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"documentLink").dynamicRegistration=!0}initialize(e,t){e.documentLinkProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentLinkProvider)})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.DocumentLinkRequest.type,t.code2ProtocolConverter.asDocumentLinkParams(e),n).then(t.protocol2CodeConverter.asDocumentLinks,(e=>{t.logFailedRequest(i.DocumentLinkRequest.type,e),Promise.resolve(new Error(e.message))})),o=(e,n)=>t.sendRequest(i.DocumentLinkResolveRequest.type,t.code2ProtocolConverter.asDocumentLink(e),n).then(t.protocol2CodeConverter.asDocumentLink,(e=>{t.logFailedRequest(i.DocumentLinkResolveRequest.type,e),Promise.resolve(new Error(e.message))})),s=t.clientOptions.middleware;return r.languages.registerDocumentLinkProvider(e.documentSelector,{provideDocumentLinks:(e,t)=>s.provideDocumentLinks?s.provideDocumentLinks(e,t,n):n(e,t),resolveDocumentLink:e.resolveProvider?(e,t)=>s.resolveDocumentLink?s.resolveDocumentLink(e,t,o):o(e,t):void 0})}}class W{constructor(e){this._client=e,this._listeners=new Map}get messages(){return i.DidChangeConfigurationNotification.type}fillClientCapabilities(e){b(b(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{section:e}})}register(e,t){let n=r.workspace.onDidChangeConfiguration((e=>{this.onDidChangeConfiguration(t.registerOptions.section,e)}));this._listeners.set(t.id,n),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let n;if(n=a.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;let r=e=>{void 0!==e?this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,r):r(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=n[t[e]];r||(r=Object.create(null),n[t[e]]=r),n=r}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){let s=e[o],a=s.indexOf("."),c=null;if(c=a>=0?r.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):r.workspace.getConfiguration(s,n),c){let n=e[o].split(".");t(i,n)[n[n.length-1]]=c}}return i}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class ${constructor(e){this._client=e,this._commands=new Map}get messages(){return i.ExecuteCommandRequest.type}fillClientCapabilities(e){b(b(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e,t){let n=this._client;if(t.registerOptions.commands){let e=[];for(const o of t.registerOptions.commands)e.push(r.commands.registerCommand(o,((...e)=>{let t={command:o,arguments:e};return n.sendRequest(i.ExecuteCommandRequest.type,t).then(void 0,(e=>{n.logFailedRequest(i.ExecuteCommandRequest.type,e)}))})));this._commands.set(t.id,e)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}dispose(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}(t.MessageTransports||(t.MessageTransports={})).is=function(e){return e&&i.MessageReader.is(e.reader)&&i.MessageWriter.is(e.writer)};class K{constructor(e,t){this._resolve=e,this._reject=t,this._used=!1}get isUsed(){return this._used}resolve(){this._used=!0,this._resolve()}reject(e){this._used=!0,this._reject(e)}}t.BaseLanguageClient=class{constructor(e,t,n){this._traceFormat=i.TraceFormat.Text,this._features=[],this._method2Message=new Map,this._dynamicFeatures=new Map,this._id=e,this._name=t,n=n||{},this._clientOptions={documentSelector:n.documentSelector||[],synchronize:n.synchronize||{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName||this._name,revealOutputChannelOn:n.revealOutputChannelOn||h.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,errorHandler:n.errorHandler||new g(this._name),middleware:n.middleware||{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this.state=m.Initial,this._connectionPromise=void 0,this._resolvedConnection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._listeners=void 0,this._providers=void 0,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onReady=new Promise(((e,t)=>{this._onReadyCallbacks=new K(e,t)})),this._onStop=void 0,this._telemetryEmitter=new i.Emitter,this._stateChangeEmitter=new i.Emitter,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=o.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get state(){return this._state}set state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){return this.state===m.Running?f.Running:this.state===m.Starting?f.Starting:f.Stopped}get initializeResult(){return this._initializeResult}sendRequest(e,...t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{return this._resolvedConnection.sendRequest(e,...t)}catch(t){throw this.error(`Sending request ${a.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onRequest(e,t)}catch(t){throw this.error(`Registering request handler ${a.string(e)?e:e.method} failed.`,t),t}}sendNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendNotification(e,t)}catch(t){throw this.error(`Sending notification ${a.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onNotification(e,t)}catch(t){throw this.error(`Registering notification handler ${a.string(e)?e:e.method} failed.`,t),t}}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=r.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(){return new g(this._name)}set trace(e){this._trace=e,this.onReady().then((()=>{this.resolveConnection().then((e=>{e.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}))}),(()=>{}))}data2String(e){if(e instanceof i.ResponseError){const t=e;return`  Message: ${t.message}\n  Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}info(e,t){this.outputChannel.appendLine(`[Info  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),this._clientOptions.revealOutputChannelOn<=h.Info&&this.outputChannel.show(!0)}warn(e,t){this.outputChannel.appendLine(`[Warn  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),this._clientOptions.revealOutputChannelOn<=h.Warn&&this.outputChannel.show(!0)}error(e,t){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),this._clientOptions.revealOutputChannelOn<=h.Error&&this.outputChannel.show(!0)}logTrace(e,t){this.outputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.outputChannel.append(`[LSP   - ${(new Date).toLocaleTimeString()}] `):this.outputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.outputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.state===m.Initial||this.state===m.Stopping||this.state===m.Stopped}needsStop(){return this.state===m.Starting||this.state===m.Running}onReady(){return this._onReady}isConnectionActive(){return this.state===m.Running&&!!this._resolvedConnection}start(){return this._onReadyCallbacks.isUsed&&(this._onReady=new Promise(((e,t)=>{this._onReadyCallbacks=new K(e,t)}))),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?r.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):r.languages.createDiagnosticCollection()),this.state=m.Starting,this.resolveConnection().then((e=>(e.onLogMessage((e=>{switch(e.type){case i.MessageType.Error:this.error(e.message);break;case i.MessageType.Warning:this.warn(e.message);break;case i.MessageType.Info:this.info(e.message);break;default:this.outputChannel.appendLine(e.message)}})),e.onShowMessage((e=>{switch(e.type){case i.MessageType.Error:r.window.showErrorMessage(e.message);break;case i.MessageType.Warning:r.window.showWarningMessage(e.message);break;case i.MessageType.Info:default:r.window.showInformationMessage(e.message)}})),e.onRequest(i.ShowMessageRequest.type,(e=>{let t;switch(e.type){case i.MessageType.Error:t=r.window.showErrorMessage;break;case i.MessageType.Warning:t=r.window.showWarningMessage;break;case i.MessageType.Info:default:t=r.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)})),e.onTelemetry((e=>{this._telemetryEmitter.fire(e)})),e.listen(),this.initialize(e)))).then(void 0,(e=>{this.state=m.StartFailed,this._onReadyCallbacks.reject(e),this.error("Starting client failed",e),r.window.showErrorMessage(`Couldn't start client ${this._name}`)})),new r.Disposable((()=>{this.needsStop()&&this.stop()}))}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,n=this._clientOptions.workspaceFolder?this._clientOptions.workspaceFolder.uri.fsPath:this._clientGetRootPath(),o={processId:process.pid,rootPath:n||null,rootUri:n?this._c2p.asUri(r.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:i.Trace.toString(this._trace),workspaceFolders:null};return this.fillInitializeParams(o),e.initialize(o).then((t=>{let n;return this._resolvedConnection=e,this._initializeResult=t,this.state=m.Running,a.number(t.capabilities.textDocumentSync)?n=t.capabilities.textDocumentSync===i.TextDocumentSyncKind.None?{openClose:!1,change:i.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:t.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==t.capabilities.textDocumentSync&&null!==t.capabilities.textDocumentSync&&(n=t.capabilities.textDocumentSync),this._capabilities=Object.assign({},t.capabilities,{resolvedTextDocumentSync:n}),e.onDiagnostics((e=>this.handleDiagnostics(e))),e.onRequest(i.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(i.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(i.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e))),e.sendNotification(i.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),t})).then(void 0,(t=>{this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t)):t instanceof i.ResponseError&&t.data&&t.data.retry?r.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((n=>{n&&"retry"===n.id?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t))})):(t&&t.message&&r.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t))}))}_clientGetRootPath(){let e=r.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(){return this._initializeResult=void 0,this._connectionPromise?this.state===m.Stopping&&this._onStop?this._onStop:(this.state=m.Stopping,this.cleanUp(),this._onStop=this.resolveConnection().then((e=>e.shutdown().then((()=>{e.exit(),e.dispose(),this.state=m.Stopped,this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0}))))):(this.state=m.Stopped,Promise.resolve())}cleanUp(e=!0,t=!0){this._listeners&&(this._listeners.forEach((e=>e.dispose())),this._listeners=void 0),this._providers&&(this._providers.forEach((e=>e.dispose())),this._providers=void 0),this._syncedDocuments&&this._syncedDocuments.clear();for(let e of this._dynamicFeatures.values())e.dispose();e&&this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0),t&&this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0)}notifyFileEvent(e){this._fileEvents.push(e),this._fileEventDelayer.trigger((()=>{this.onReady().then((()=>{this.resolveConnection().then((e=>{this.isConnectionActive()&&e.didChangeWatchedFiles({changes:this._fileEvents}),this._fileEvents=[]}))}),(e=>{this.error("Notify file events failed.",e)}))}))}forceDocumentSync(){this._dynamicFeatures.get(i.DidChangeTextDocumentNotification.type.method).forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;let t=this._p2c.asUri(e.uri),n=this._p2c.asDiagnostics(e.diagnostics),r=this.clientOptions.middleware.handleDiagnostics;r?r(t,n,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(t,n)}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}createConnection(){let e=(e,t,n)=>{this.handleConnectionError(e,t,n)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then((n=>function(e,t,n,r){let o=new u,s=i.createProtocolConnection(e,t,o);return s.onError((e=>{n(e[0],e[1],e[2])})),s.onClose(r),{listen:()=>s.listen(),sendRequest:(e,...t)=>s.sendRequest(a.string(e)?e:e.method,...t),onRequest:(e,t)=>s.onRequest(a.string(e)?e:e.method,t),sendNotification:(e,t)=>s.sendNotification(a.string(e)?e:e.method,t),onNotification:(e,t)=>s.onNotification(a.string(e)?e:e.method,t),trace:(e,t,n)=>{const r={sendNotification:!1,traceFormat:i.TraceFormat.Text};void 0===n?s.trace(e,t,r):(a.boolean(n),s.trace(e,t,n))},initialize:e=>s.sendRequest(i.InitializeRequest.type,e),shutdown:()=>s.sendRequest(i.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(i.ExitNotification.type),onLogMessage:e=>s.onNotification(i.LogMessageNotification.type,e),onShowMessage:e=>s.onNotification(i.ShowMessageNotification.type,e),onTelemetry:e=>s.onNotification(i.TelemetryEventNotification.type,e),didChangeConfiguration:e=>s.sendNotification(i.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>s.sendNotification(i.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>s.sendNotification(i.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>s.sendNotification(i.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>s.sendNotification(i.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>s.sendNotification(i.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>s.onNotification(i.PublishDiagnosticsNotification.type,e),dispose:()=>s.dispose()}}(n.reader,n.writer,e,t)))}handleConnectionClosed(){if(this.state===m.Stopping||this.state===m.Stopped)return;try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch(e){}let e=p.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===p.DoNotRestart?(this.error("Connection to server got closed. Server will not be restarted."),this.state=m.Stopped,this.cleanUp(!1,!0)):e===p.Restart&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!1),this.state=m.Initial,this.start())}handleConnectionError(e,t,n){this._clientOptions.errorHandler.error(e,t,n)===d.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){r.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let n=r.workspace.getConfiguration(this._id),o=i.Trace.Off,s=i.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=i.Trace.fromString(e):(o=i.Trace.fromString(n.get("trace.server.verbosity","off")),s=i.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat})}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n],t&&this._dynamicFeatures.get(i.DidChangeWatchedFilesNotification.type.method).registerRaw(l.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),S.is(e)){let t=e.messages;if(Array.isArray(t))for(let n of t)this._method2Message.set(n.method,n),this._dynamicFeatures.set(n.method,e);else this._method2Message.set(t.method,t),this._dynamicFeatures.set(t.method,e)}}registerBuiltinFeatures(){this.registerFeature(new W(this)),this.registerFeature(new T(this,this._syncedDocuments)),this.registerFeature(new E(this)),this.registerFeature(new C(this)),this.registerFeature(new R(this)),this.registerFeature(new x(this)),this.registerFeature(new _(this,this._syncedDocuments)),this.registerFeature(new I(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new D(this)),this.registerFeature(new A(this)),this.registerFeature(new N(this)),this.registerFeature(new k(this)),this.registerFeature(new j(this)),this.registerFeature(new q(this)),this.registerFeature(new M(this)),this.registerFeature(new L(this)),this.registerFeature(new F(this)),this.registerFeature(new U(this)),this.registerFeature(new B(this)),this.registerFeature(new z(this)),this.registerFeature(new H(this)),this.registerFeature(new G(this)),this.registerFeature(new V(this)),this.registerFeature(new $(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};b(e,"workspace").applyEdit=!0;let t=b(b(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[i.ResourceOperationKind.Create,i.ResourceOperationKind.Rename,i.ResourceOperationKind.Delete],t.failureHandling=i.FailureHandlingKind.TextOnlyTransactional,b(b(e,"textDocument"),"publishDiagnostics").relatedInformation=!0;for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let e of this._features)e.initialize(this._capabilities,t)}handleRegistrationRequest(e){return new Promise(((t,n)=>{for(let t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const r=t.registerOptions||{};r.documentSelector=r.documentSelector||this._clientOptions.documentSelector;const i={id:t.id,registerOptions:r};e.register(this._method2Message.get(t.method),i)}t()}))}handleUnregistrationRequest(e){return new Promise(((t,n)=>{for(let t of e.unregisterations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}t()}))}handleApplyWorkspaceEdit(e){let t=e.edit,n=new Map;r.workspace.textDocuments.forEach((e=>n.set(e.uri.toString(),e)));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(i.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){let t=n.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):r.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then((e=>({applied:e})))}logFailedRequest(e,t){t instanceof i.ResponseError&&t.code===i.ErrorCodes.RequestCancelled||this.error(`Request ${e.method} failed.`,t)}}},4103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496),i=n(4192),o=n(2097),s=n(213),a=n(5628),c=n(6653);t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function l(e){return{uri:t(e.uri)}}function u(e){return{uri:t(e.uri),version:e.version}}function d(e){switch(e){case r.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case r.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case r.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function p(e){switch(e){case r.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case r.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function h(e){return{line:e.line,character:e.character}}function f(e){if(void 0!==e)return null===e?null:{line:e.line,character:e.character}}function m(e){return null==e?e:{start:f(e.start),end:f(e.end)}}function g(e){switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function y(e){let t=i.Diagnostic.create(m(e.range),e.message);return o.number(e.severity)&&(t.severity=g(e.severity)),(o.number(e.code)||o.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),t}function v(e){return null==e?e:e.map(y)}function b(e){return{range:m(e.range),newText:e.newText}}function S(e){let t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:l,asVersionedTextDocumentIdentifier:u,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){if(function(e){let t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){let t=e;return!!t.document&&!!t.contentChanges}(e)){let n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map((e=>{let t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:l(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:u(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:l(e.document),reason:d(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:l(e),position:h(t)}},asCompletionParams:function(e,t,n){return{textDocument:l(e),position:h(t),context:{triggerKind:p(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asWorkerPosition:h,asRange:m,asPosition:f,asDiagnosticSeverity:g,asDiagnostic:y,asDiagnostics:v,asCompletionItem:function(e){let t={label:e.label},n=e instanceof s.default?e:void 0;var a,c,l;return e.detail&&(t.detail=e.detail),e.documentation&&(n&&"$string"!==n.documentationFormat?t.documentation=function(e,t){switch(e){case"$string":return t;case i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),function(e,t){let n,o,s=i.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,o=m(t.textEdit.range)):t.insertText instanceof r.SnippetString?(s=i.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(o=m(t.range)),e.insertTextFormat=s,t.fromEdit&&n&&o?e.textEdit={newText:n,range:o}:e.insertText=n}(t,e),o.number(e.kind)&&(t.kind=(a=e.kind,void 0!==(c=n&&n.originalItemKind)?c:a+1)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=null==(l=e.additionalTextEdits)?l:l.map(b)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=S(e.command)),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),n&&(void 0!==n.data&&(t.data=n.data),!0!==n.deprecated&&!1!==n.deprecated||(t.deprecated=n.deprecated)),t},asTextEdit:b,asReferenceParams:function(e,t,n){return{textDocument:l(e),position:h(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeActionContext:function(e){return null==e?e:i.CodeActionContext.create(v(e.diagnostics),o.string(e.only)?[e.only]:void 0)},asCommand:S,asCodeLens:function(e){let t=i.CodeLens.create(m(e.range));return e.command&&(t.command=S(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:l(e)}},asCodeLensParams:function(e){return{textDocument:l(e)}},asDocumentLink:function(e){let t=i.DocumentLink.create(m(e.range));e.target&&(t.target=n(e.target));let r=e instanceof c.default?e:void 0;return r&&r.data&&(t.data=r.data),t},asDocumentLinkParams:function(e){return{textDocument:l(e)}}}}},2101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4489),i=n(2097),o=n(9496),s=n(4192),a=n(5620);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.DocumentColorRequest.type)}fillClientCapabilities(e){c(c(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){if(!e.colorProvider)return;const n=e.colorProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>{const i={color:e,textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(n.document),range:t.code2ProtocolConverter.asRange(n.range)};return t.sendRequest(s.ColorPresentationRequest.type,i,r).then(this.asColorPresentations.bind(this),(e=>(t.logFailedRequest(s.ColorPresentationRequest.type,e),Promise.resolve(null))))},r=(e,n)=>{const r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e)};return t.sendRequest(s.DocumentColorRequest.type,r,n).then(this.asColorInformations.bind(this),(e=>(t.logFailedRequest(s.ColorPresentationRequest.type,e),Promise.resolve(null))))},i=t.clientOptions.middleware;return o.languages.registerColorProvider(e.documentSelector,{provideColorPresentations:(e,t,r)=>i.provideColorPresentations?i.provideColorPresentations(e,t,r,n):n(e,t,r),provideDocumentColors:(e,t)=>i.provideDocumentColors?i.provideDocumentColors(e,t,r):r(e,t)})}asColor(e){return new o.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map((e=>new o.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color)))):[]}asColorPresentations(e){return Array.isArray(e)?e.map((e=>{let t=new o.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t})):[]}}t.ColorProviderFeature=l},7888:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496),i=n(4192);t.ConfigurationFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(i.ConfigurationRequest.type,((t,n)=>{let r=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},i=e.clientOptions.middleware.workspace;return i&&i.configuration?i.configuration(t,n,r):r(t)}))}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(-1===i)n=r.workspace.getConfiguration(void 0,e).get(t);else{let e=r.workspace.getConfiguration(t.substr(0,i));e&&(n=e.get(t.substr(i+1)))}}else{let t=r.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=t.get(e))}return n||null}}},7812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4489),i=n(2097),o=n(9496),s=n(4192),a=n(5620);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.DeclarationRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){if(e.declarationProvider)if(!0===e.declarationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{const n=e.declarationProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(s.DeclarationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDeclarationResult,(e=>(t.logFailedRequest(s.DeclarationRequest.type,e),Promise.resolve(null)))),r=t.clientOptions.middleware;return o.languages.registerDeclarationProvider(e.documentSelector,{provideDeclaration:(e,t,i)=>r.provideDeclaration?r.provideDeclaration(e,t,i,n):n(e,t,i)})}}t.DeclarationFeature=l},5573:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4489),i=n(2097),o=n(9496),s=n(4192),a=n(5620);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){if(!e.foldingRangeProvider)return;const n=e.foldingRangeProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>{const i={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e)};return t.sendRequest(s.FoldingRangeRequest.type,i,r).then(this.asFoldingRanges.bind(this),(e=>(t.logFailedRequest(s.FoldingRangeRequest.type,e),Promise.resolve(null))))},r=t.clientOptions.middleware;return o.languages.registerFoldingRangeProvider(e.documentSelector,{provideFoldingRanges:(e,t,i)=>r.provideFoldingRanges?r.provideFoldingRanges(e,t,i,n):n(e,0,i)})}asFoldingRangeKind(e){if(e)switch(e){case s.FoldingRangeKind.Comment:return o.FoldingRangeKind.Comment;case s.FoldingRangeKind.Imports:return o.FoldingRangeKind.Imports;case s.FoldingRangeKind.Region:return o.FoldingRangeKind.Region}}asFoldingRanges(e){return Array.isArray(e)?e.map((e=>new o.FoldingRange(e.startLine,e.endLine,this.asFoldingRangeKind(e.kind)))):[]}}t.FoldingRangeFeature=l},7391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4489),i=n(2097),o=n(9496),s=n(4192),a=n(5620);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.ImplementationRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){if(e.implementationProvider)if(!0===e.implementationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{const n=e.implementationProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(s.ImplementationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDefinitionResult,(e=>(t.logFailedRequest(s.ImplementationRequest.type,e),Promise.resolve(null)))),r=t.clientOptions.middleware;return o.languages.registerImplementationProvider(e.documentSelector,{provideImplementation:(e,t,i)=>r.provideImplementation?r.provideImplementation(e,t,i,n):n(e,t,i)})}}t.ImplementationFeature=l},3056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2081),i=n(7147),o=n(6625),s=n(5620),a=n(9496),c=n(4192),l=n(2101),u=n(7888),d=n(7391),p=n(9409),h=n(4670),f=n(5573),m=n(7812),g=n(2097),y=n(9567);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(5620));const v="^1.30";var b,S,w,T,_,E,C;!function(e){e.is=function(e){return g.string(e.command)}}(b||(b={})),function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(S=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){let t=e;return t&&t.kind===S.socket&&g.number(t.port)}}(w||(w={})),function(e){e.is=function(e){return g.string(e.module)}}(T||(T={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(_||(_={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(E||(E={}));class R extends s.BaseLanguageClient{constructor(e,t,n,r,i){let o,s,a,c,l;g.string(t)?(o=e,s=t,a=n,c=r,l=!!i):(o=e.toLowerCase(),s=e,a=t,c=n,l=r),void 0===l&&(l=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=l;try{this.checkVersion()}catch(e){throw g.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){let e=o.parse(a.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${a.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!o.satisfies(e,v))throw new Error(`The language client requires VS Code version ${v} but received version ${a.version}`)}stop(){return super.stop().then((()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}}))}checkProcessDied(e){e&&setTimeout((()=>{try{process.kill(e.pid,0),y.terminate(e)}catch(e){}}),2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}createMessageTransports(e){let t,n=this._serverOptions;if(g.func(n))return n().then((t=>{if(s.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(_.is(t))return this._isDetached=!!t.detached,{reader:new c.StreamMessageReader(t.reader),writer:new c.StreamMessageWriter(t.writer)};{let n;return E.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),{reader:new c.StreamMessageReader(n.stdout),writer:new c.StreamMessageWriter(n.stdin)}}}));let i=n;return t=i.run||i.debug?"object"==typeof v8debug||this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some((e=>/^--debug=?/.test(e)||/^--debug-brk=?/.test(e)||/^--inspect=?/.test(e)||/^--inspect-brk=?/.test(e)))}()?i.debug:i.run:n,this._getServerWorkingDir(t.options).then((i=>{if(T.is(t)&&t.module){let n=t,o=n.transport||S.stdio;if(!n.runtime){let t;return new Promise(((s,a)=>{let l=n.args&&n.args.slice()||[];o===S.ipc?l.push("--node-ipc"):o===S.stdio?l.push("--stdio"):o===S.pipe?(t=c.generateRandomPipeName(),l.push(`--pipe=${t}`)):w.isSocket(o)&&l.push(`--socket=${o.port}`),l.push(`--clientProcessId=${process.pid.toString()}`);let u=n.options||Object.create(null);if(u.execArgv=u.execArgv||[],u.cwd=i,u.silent=!0,o===S.ipc||o===S.stdio){let t=r.fork(n.module,l||[],u);this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o===S.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),s({reader:new c.IPCMessageReader(this._serverProcess),writer:new c.IPCMessageWriter(this._serverProcess)})):s({reader:new c.StreamMessageReader(t.stdout),writer:new c.StreamMessageWriter(t.stdin)})}else o===S.pipe?c.createClientPipeTransport(t).then((t=>{let i=r.fork(n.module,l||[],u);this._serverProcess=i,i.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{s({reader:e[0],writer:e[1]})}))})):w.isSocket(o)&&c.createClientSocketTransport(o.port).then((t=>{let i=r.fork(n.module,l||[],u);this._serverProcess=i,i.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{s({reader:e[0],writer:e[1]})}))}))}))}{let t=[],s=n.options||Object.create(null);s.execArgv&&s.execArgv.forEach((e=>t.push(e))),t.push(n.module),n.args&&n.args.forEach((e=>t.push(e)));let a,l=Object.create(null);if(l.cwd=i,l.env=function(e){if(!e)return process.env;let t=Object.create(null);return Object.keys(process.env).forEach((e=>t[e]=process.env[e])),Object.keys(e).forEach((n=>t[n]=e[n])),t}(s.env),o===S.ipc?(l.stdio=[null,null,null,"ipc"],t.push("--node-ipc")):o===S.stdio?t.push("--stdio"):o===S.pipe?(a=c.generateRandomPipeName(),t.push(`--pipe=${a}`)):w.isSocket(o)&&t.push(`--socket=${o.port}`),t.push(`--clientProcessId=${process.pid.toString()}`),o===S.ipc||o===S.stdio){let i=r.spawn(n.runtime,t,l);return i&&i.pid?(this._serverProcess=i,i.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o===S.ipc?(i.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),Promise.resolve({reader:new c.IPCMessageReader(i),writer:new c.IPCMessageWriter(i)})):Promise.resolve({reader:new c.StreamMessageReader(i.stdout),writer:new c.StreamMessageWriter(i.stdin)})):Promise.reject(`Launching server using runtime ${n.runtime} failed.`)}if(o==S.pipe)return c.createClientPipeTransport(a).then((i=>{let o=r.spawn(n.runtime,t,l);return o&&o.pid?(this._serverProcess=o,o.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.onConnected().then((e=>({reader:e[0],writer:e[1]})))):Promise.reject(`Launching server using runtime ${n.runtime} failed.`)}));if(w.isSocket(o))return c.createClientSocketTransport(o.port).then((i=>{let o=r.spawn(n.runtime,t,l);return o&&o.pid?(this._serverProcess=o,o.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.onConnected().then((e=>({reader:e[0],writer:e[1]})))):Promise.reject(`Launching server using runtime ${n.runtime} failed.`)}))}}else if(b.is(t)&&t.command){let n=t,o=n.args||[],s=Object.assign({},n.options);s.cwd=s.cwd||i;let a=r.spawn(n.command,o,s);return a&&a.pid?(a.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),this._serverProcess=a,this._isDetached=!!s.detached,Promise.resolve({reader:new c.StreamMessageReader(a.stdout),writer:new c.StreamMessageWriter(a.stdin)})):Promise.reject(`Launching server using command ${n.command} failed.`)}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(n,null,4)))}))}registerProposedFeatures(){this.registerFeatures(C.createAll(this))}registerBuiltinFeatures(){super.registerBuiltinFeatures(),this.registerFeature(new u.ConfigurationFeature(this)),this.registerFeature(new p.TypeDefinitionFeature(this)),this.registerFeature(new d.ImplementationFeature(this)),this.registerFeature(new l.ColorProviderFeature(this)),this.registerFeature(new h.WorkspaceFoldersFeature(this)),this.registerFeature(new f.FoldingRangeFeature(this)),this.registerFeature(new m.DeclarationFeature(this))}_mainGetRootPath(){let e=a.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise((e=>{i.lstat(t,((n,r)=>{e(!n&&r.isDirectory()?t:void 0)}))})):Promise.resolve(void 0)}}t.LanguageClient=R,t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return a.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new a.Disposable((()=>{this._client.needsStop()&&this._client.stop()}))}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,r=n?a.workspace.getConfiguration(t).get(n,!1):a.workspace.getConfiguration(t);r&&this._client.needsStart()?this._client.start():!r&&this._client.needsStop()&&this._client.stop()}},function(e){e.createAll=function(e){return[]}}(C=t.ProposedFeatures||(t.ProposedFeatures={}))},5628:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.CodeLens{constructor(e){super(e)}}t.default=i},213:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.CompletionItem{constructor(e){super(e)}}t.default=i},3101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496),i=n(4192),o=n(2097),s=n(213),a=n(5628),c=n(6653);var l;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(l||(l={})),t.createConverter=function(e){const t=e||(e=>r.Uri.parse(e));function n(e){return t(e)}function u(e){return e.map(d)}function d(e){let t=new r.Diagnostic(f(e.range),e.message,m(e.severity));return(o.number(e.code)||o.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(p)),t}function p(e){return new r.DiagnosticRelatedInformation(E(e.location),e.message)}function h(e){if(e)return new r.Position(e.line,e.character)}function f(e){if(e)return new r.Range(h(e.start),h(e.end))}function m(e){if(null==e)return r.DiagnosticSeverity.Error;switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}return r.DiagnosticSeverity.Error}function g(e){if(o.string(e))return e;switch(e.kind){case i.MarkupKind.Markdown:return new r.MarkdownString(e.value);case i.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function y(e){let t=new s.default(e.label);e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=g(e.documentation),t.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(t.filterText=e.filterText);let n=function(e){return e.textEdit?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.textEdit.newText),range:f(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:f(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(n&&(t.insertText=n.text,t.range=n.range,t.fromEdit=n.fromEdit),o.number(e.kind)){let[n,o]=(a=e.kind,i.CompletionItemKind.Text<=a&&a<=i.CompletionItemKind.TypeParameter?[a-1,void 0]:[r.CompletionItemKind.Text,a]);t.kind=n,o&&(t.originalItemKind=o)}var a;return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=b(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=A(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),void 0!==e.data&&(t.data=e.data),t}function v(e){if(e)return new r.TextEdit(f(e.range),e.newText)}function b(e){if(e)return e.map(v)}function S(e){return e.map(w)}function w(e){let t=new r.SignatureInformation(e.label);return e.documentation&&(t.documentation=g(e.documentation)),e.parameters&&(t.parameters=T(e.parameters)),t}function T(e){return e.map(_)}function _(e){let t=new r.ParameterInformation(e.label);return e.documentation&&(t.documentation=g(e.documentation)),t}function E(e){if(e)return new r.Location(t(e.uri),f(e.range))}function C(e){if(e)return{targetUri:t(e.targetUri),targetRange:f(e.targetSelectionRange),originSelectionRange:f(e.originSelectionRange),targetSelectionRange:f(e.targetSelectionRange)}}function R(e){if(e)return o.array(e)?0===e.length?[]:i.LocationLink.is(e[0])?e.map((e=>C(e))):e.map((e=>E(e))):i.LocationLink.is(e)?[C(e)]:E(e)}function x(e){let t=new r.DocumentHighlight(f(e.range));return o.number(e.kind)&&(t.kind=I(e.kind)),t}function I(e){switch(e){case i.DocumentHighlightKind.Text:return r.DocumentHighlightKind.Text;case i.DocumentHighlightKind.Read:return r.DocumentHighlightKind.Read;case i.DocumentHighlightKind.Write:return r.DocumentHighlightKind.Write}return r.DocumentHighlightKind.Text}function O(e){return e<=i.SymbolKind.TypeParameter?e-1:r.SymbolKind.Property}function P(e,n){let i=new r.SymbolInformation(e.name,O(e.kind),f(e.location.range),e.location.uri?t(e.location.uri):n);return e.containerName&&(i.containerName=e.containerName),i}function D(e){let t=new r.DocumentSymbol(e.name,e.detail||"",O(e.kind),f(e.range),f(e.selectionRange));if(void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(D(t));t.children=n}return t}function A(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const N=new Map;function k(e){if(null==e)return;let t=N.get(e);if(t)return t;let n=e.split(".");t=r.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function j(e){if(!e)return;let t=new a.default(f(e.range));return e.command&&(t.command=A(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}function q(e){if(!e)return;let n=new r.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach((e=>{i.CreateFile.is(e)?n.createFile(t(e.uri),e.options):i.RenameFile.is(e)?n.renameFile(t(e.oldUri),t(e.newUri),e.options):i.DeleteFile.is(e)?n.deleteFile(t(e.uri),e.options):i.TextDocumentEdit.is(e)?n.set(t(e.textDocument.uri),b(e.edits)):console.error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`)})):e.changes&&Object.keys(e.changes).forEach((r=>{n.set(t(r),b(e.changes[r]))})),n}function M(e){let t=f(e.range),r=e.target?n(e.target):void 0,i=new c.default(t,r);return void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function L(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}function F(e){return new r.ColorInformation(f(e.range),L(e.color))}function U(e){let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=b(e.additionalTextEdits),e.textEdit&&(t.textEdit=v(e.textEdit)),t}function B(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}function z(e){return new r.FoldingRange(e.startLine,e.endLine,B(e.kind))}return N.set("",r.CodeActionKind.Empty),N.set(i.CodeActionKind.QuickFix,r.CodeActionKind.QuickFix),N.set(i.CodeActionKind.Refactor,r.CodeActionKind.Refactor),N.set(i.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorExtract),N.set(i.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorInline),N.set(i.CodeActionKind.RefactorRewrite,r.CodeActionKind.RefactorRewrite),N.set(i.CodeActionKind.Source,r.CodeActionKind.Source),N.set(i.CodeActionKind.SourceOrganizeImports,r.CodeActionKind.SourceOrganizeImports),{asUri:n,asDiagnostics:u,asDiagnostic:d,asRange:f,asPosition:h,asDiagnosticSeverity:m,asHover:function(e){if(e)return new r.Hover(function(e){if(o.string(e))return new r.MarkdownString(e);if(l.is(e))return(new r.MarkdownString).appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=new r.MarkdownString;l.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case i.MarkupKind.Markdown:return new r.MarkdownString(e.value);case i.MarkupKind.PlainText:return t=new r.MarkdownString,t.appendText(e.value),t;default:return t=new r.MarkdownString,t.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`),t}}}(e.contents),f(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e))return e.map(y);let t=e;return new r.CompletionList(t.items.map(y),t.isIncomplete)},asCompletionItem:y,asTextEdit:v,asTextEdits:b,asSignatureHelp:function(e){if(!e)return;let t=new r.SignatureHelp;return o.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,o.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=S(e.signatures)),t},asSignatureInformations:S,asSignatureInformation:w,asParameterInformations:T,asParameterInformation:_,asDeclarationResult:function(e){if(e)return R(e)},asDefinitionResult:function(e){if(e)return R(e)},asLocation:E,asReferences:function(e){if(e)return e.map((e=>E(e)))},asDocumentHighlights:function(e){if(e)return e.map(x)},asDocumentHighlight:x,asDocumentHighlightKind:I,asSymbolInformations:function(e,t){if(e)return e.map((e=>P(e,t)))},asSymbolInformation:P,asDocumentSymbols:function(e){if(null!=e)return e.map(D)},asDocumentSymbol:D,asCommand:A,asCommands:function(e){if(e)return e.map(A)},asCodeAction:function(e){if(null==e)return;let t=new r.CodeAction(e.title);return void 0!==e.kind&&(t.kind=k(e.kind)),e.diagnostics&&(t.diagnostics=u(e.diagnostics)),e.edit&&(t.edit=q(e.edit)),e.command&&(t.command=A(e.command)),t},asCodeActionKind:k,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>k(e)))},asCodeLens:j,asCodeLenses:function(e){if(e)return e.map((e=>j(e)))},asWorkspaceEdit:q,asDocumentLink:M,asDocumentLinks:function(e){if(e)return e.map(M)},asFoldingRangeKind:B,asFoldingRange:z,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(z)},asColor:L,asColorInformation:F,asColorInformations:function(e){if(Array.isArray(e))return e.map(F)},asColorPresentation:U,asColorPresentations:function(e){if(Array.isArray(e))return e.map(U)}}}},6653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.DocumentLink{constructor(e,t){super(e,t)}}t.default=i},9409:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4489),i=n(2097),o=n(9496),s=n(4192),a=n(5620);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.TypeDefinitionRequest.type)}fillClientCapabilities(e){c(c(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=c(c(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){if(e.typeDefinitionProvider)if(!0===e.typeDefinitionProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{const n=e.typeDefinitionProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(s.TypeDefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDefinitionResult,(e=>(t.logFailedRequest(s.TypeDefinitionRequest.type,e),Promise.resolve(null)))),r=t.clientOptions.middleware;return o.languages.registerTypeDefinitionProvider(e.documentSelector,{provideTypeDefinition:(e,t,i)=>r.provideTypeDefinition?r.provideTypeDefinition(e,t,i,n):n(e,t,i)})}}t.TypeDefinitionFeature=l},3299:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}}},2097:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},9567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2081),i=n(1017),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(e,t){if(o)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),r.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!a&&!s)return e.kill("SIGKILL"),!0;try{var n=i.join(__dirname,"terminateProcess.sh");return!r.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},4489:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function i(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=i;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return i().asHex()}},4670:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4489),i=n(9496),o=n(4192);function s(e,t){if(void 0!==e)return e[t]}t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}get messages(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=i.workspace.workspaceFolders;e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,(e=>{let n=()=>{let e=i.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},r=t.clientOptions.middleware.workspace;return r&&r.workspaceFolders?r.workspaceFolders(e,n):n()}));let n,a=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof a?n=a:!0===a&&(n=r.generateUuid()),n&&this.register(this.messages,{id:n,registerOptions:void 0})}register(e,t){let n=t.id,r=this._client,s=i.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>{let t={event:{added:e.added.map((e=>this.asProtocol(e))),removed:e.removed.map((e=>this.asProtocol(e)))}};this._client.sendNotification(o.DidChangeWorkspaceFoldersNotification.type,t)},n=r.clientOptions.middleware.workspace;n&&n.didChangeWorkspaceFolders?n.didChangeWorkspaceFolders(e,t):t(e)}));this._listeners.set(n,s)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},4192:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const i=n(8231);t.ErrorCodes=i.ErrorCodes,t.ResponseError=i.ResponseError,t.CancellationToken=i.CancellationToken,t.CancellationTokenSource=i.CancellationTokenSource,t.Disposable=i.Disposable,t.Event=i.Event,t.Emitter=i.Emitter,t.Trace=i.Trace,t.TraceFormat=i.TraceFormat,t.SetTraceNotification=i.SetTraceNotification,t.LogTraceNotification=i.LogTraceNotification,t.RequestType=i.RequestType,t.RequestType0=i.RequestType0,t.NotificationType=i.NotificationType,t.NotificationType0=i.NotificationType0,t.MessageReader=i.MessageReader,t.MessageWriter=i.MessageWriter,t.ConnectionStrategy=i.ConnectionStrategy,t.StreamMessageReader=i.StreamMessageReader,t.StreamMessageWriter=i.StreamMessageWriter,t.IPCMessageReader=i.IPCMessageReader,t.IPCMessageWriter=i.IPCMessageWriter,t.createClientPipeTransport=i.createClientPipeTransport,t.createServerPipeTransport=i.createServerPipeTransport,t.generateRandomPipeName=i.generateRandomPipeName,t.createClientSocketTransport=i.createClientSocketTransport,t.createServerSocketTransport=i.createServerSocketTransport,r(n(1674)),r(n(9121)),t.createProtocolConnection=function(e,t,n,r){return i.createMessageConnection(e,t,n,r)}},1418:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8231);(t.DocumentColorRequest||(t.DocumentColorRequest={})).type=new r.RequestType("textDocument/documentColor"),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new r.RequestType("textDocument/colorPresentation")},4082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8231);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new r.RequestType("workspace/configuration")},3688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8231);(t.DeclarationRequest||(t.DeclarationRequest={})).type=new r.RequestType("textDocument/declaration")},4138:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8231);var i;(i=t.FoldingRangeKind||(t.FoldingRangeKind={})).Comment="comment",i.Imports="imports",i.Region="region",(t.FoldingRangeRequest||(t.FoldingRangeRequest={})).type=new r.RequestType("textDocument/foldingRange")},3759:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8231);(t.ImplementationRequest||(t.ImplementationRequest={})).type=new r.RequestType("textDocument/implementation")},9121:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3381),i=n(8231),o=n(3759);t.ImplementationRequest=o.ImplementationRequest;const s=n(2040);t.TypeDefinitionRequest=s.TypeDefinitionRequest;const a=n(942);t.WorkspaceFoldersRequest=a.WorkspaceFoldersRequest,t.DidChangeWorkspaceFoldersNotification=a.DidChangeWorkspaceFoldersNotification;const c=n(4082);t.ConfigurationRequest=c.ConfigurationRequest;const l=n(1418);t.DocumentColorRequest=l.DocumentColorRequest,t.ColorPresentationRequest=l.ColorPresentationRequest;const u=n(4138);t.FoldingRangeRequest=u.FoldingRangeRequest;const d=n(3688);var p,h,f,m,g,y,v;t.DeclarationRequest=d.DeclarationRequest,(t.DocumentFilter||(t.DocumentFilter={})).is=function(e){let t=e;return r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)},(t.RegistrationRequest||(t.RegistrationRequest={})).type=new i.RequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new i.RequestType("client/unregisterCapability"),(v=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",v.Rename="rename",v.Delete="delete",(y=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",y.Transactional="transactional",y.TextOnlyTransactional="textOnlyTransactional",y.Undo="undo",(g=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,g.Full=1,g.Incremental=2,(t.InitializeRequest||(t.InitializeRequest={})).type=new i.RequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new i.NotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new i.RequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new i.NotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new i.NotificationType("workspace/didChangeConfiguration"),(m=t.MessageType||(t.MessageType={})).Error=1,m.Warning=2,m.Info=3,m.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new i.NotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new i.RequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new i.NotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new i.NotificationType("telemetry/event"),(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).type=new i.NotificationType("textDocument/didOpen"),(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).type=new i.NotificationType("textDocument/didChange"),(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).type=new i.NotificationType("textDocument/didClose"),(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).type=new i.NotificationType("textDocument/didSave"),(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).type=new i.NotificationType("textDocument/willSave"),(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).type=new i.RequestType("textDocument/willSaveWaitUntil"),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new i.NotificationType("workspace/didChangeWatchedFiles"),(f=t.FileChangeType||(t.FileChangeType={})).Created=1,f.Changed=2,f.Deleted=3,(h=t.WatchKind||(t.WatchKind={})).Create=1,h.Change=2,h.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new i.NotificationType("textDocument/publishDiagnostics"),(p=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,p.TriggerCharacter=2,p.TriggerForIncompleteCompletions=3,(t.CompletionRequest||(t.CompletionRequest={})).type=new i.RequestType("textDocument/completion"),(t.CompletionResolveRequest||(t.CompletionResolveRequest={})).type=new i.RequestType("completionItem/resolve"),(t.HoverRequest||(t.HoverRequest={})).type=new i.RequestType("textDocument/hover"),(t.SignatureHelpRequest||(t.SignatureHelpRequest={})).type=new i.RequestType("textDocument/signatureHelp"),(t.DefinitionRequest||(t.DefinitionRequest={})).type=new i.RequestType("textDocument/definition"),(t.ReferencesRequest||(t.ReferencesRequest={})).type=new i.RequestType("textDocument/references"),(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).type=new i.RequestType("textDocument/documentHighlight"),(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).type=new i.RequestType("textDocument/documentSymbol"),(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).type=new i.RequestType("workspace/symbol"),(t.CodeActionRequest||(t.CodeActionRequest={})).type=new i.RequestType("textDocument/codeAction"),(t.CodeLensRequest||(t.CodeLensRequest={})).type=new i.RequestType("textDocument/codeLens"),(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).type=new i.RequestType("codeLens/resolve"),(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).type=new i.RequestType("textDocument/formatting"),(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).type=new i.RequestType("textDocument/rangeFormatting"),(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).type=new i.RequestType("textDocument/onTypeFormatting"),(t.RenameRequest||(t.RenameRequest={})).type=new i.RequestType("textDocument/rename"),(t.PrepareRenameRequest||(t.PrepareRenameRequest={})).type=new i.RequestType("textDocument/prepareRename"),(t.DocumentLinkRequest||(t.DocumentLinkRequest={})).type=new i.RequestType("textDocument/documentLink"),(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).type=new i.RequestType("documentLink/resolve"),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new i.RequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new i.RequestType("workspace/applyEdit")},2040:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8231);(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).type=new r.RequestType("textDocument/typeDefinition")},942:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8231);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new r.RequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new r.NotificationType("workspace/didChangeWorkspaceFolders")},3381:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},1674:(e,t,n)=>{"use strict";var r,i,o,s,a,c,l,u,d,p,h,f,m,g,y,v,b,S,w;n.r(t),n.d(t,{CodeAction:()=>H,CodeActionContext:()=>z,CodeActionKind:()=>B,CodeLens:()=>G,Color:()=>a,ColorInformation:()=>c,ColorPresentation:()=>l,Command:()=>m,CompletionItem:()=>O,CompletionItemKind:()=>x,CompletionList:()=>P,CreateFile:()=>v,DeleteFile:()=>S,Diagnostic:()=>f,DiagnosticRelatedInformation:()=>p,DiagnosticSeverity:()=>h,DocumentHighlight:()=>q,DocumentHighlightKind:()=>j,DocumentLink:()=>$,DocumentSymbol:()=>W,EOL:()=>J,FoldingRange:()=>d,FoldingRangeKind:()=>u,FormattingOptions:()=>V,Hover:()=>A,InsertTextFormat:()=>I,Location:()=>o,LocationLink:()=>s,MarkedString:()=>D,MarkupContent:()=>R,MarkupKind:()=>C,ParameterInformation:()=>N,Position:()=>r,Range:()=>i,RenameFile:()=>b,SignatureInformation:()=>k,SymbolInformation:()=>L,SymbolKind:()=>M,TextDocument:()=>K,TextDocumentEdit:()=>y,TextDocumentIdentifier:()=>T,TextDocumentItem:()=>E,TextDocumentSaveReason:()=>Q,TextEdit:()=>g,VersionedTextDocumentIdentifier:()=>_,WorkspaceChange:()=>U,WorkspaceEdit:()=>w}),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return X.objectLiteral(t)&&X.number(t.line)&&X.number(t.character)}}(r||(r={})),function(e){e.create=function(e,t,n,i){if(X.number(e)&&X.number(t)&&X.number(n)&&X.number(i))return{start:r.create(e,t),end:r.create(n,i)};if(r.is(e)&&r.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return X.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return X.defined(t)&&i.is(t.range)&&(X.string(t.uri)||X.undefined(t.uri))}}(o||(o={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return X.defined(t)&&i.is(t.targetRange)&&X.string(t.targetUri)&&(i.is(t.targetSelectionRange)||X.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||X.undefined(t.originSelectionRange))}}(s||(s={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return X.number(t.red)&&X.number(t.green)&&X.number(t.blue)&&X.number(t.alpha)}}(a||(a={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&a.is(t.color)}}(c||(c={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return X.string(t.label)&&(X.undefined(t.textEdit)||g.is(t))&&(X.undefined(t.additionalTextEdits)||X.typedArray(t.additionalTextEdits,g.is))}}(l||(l={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(u||(u={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return X.defined(n)&&(o.startCharacter=n),X.defined(r)&&(o.endCharacter=r),X.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return X.number(t.startLine)&&X.number(t.startLine)&&(X.undefined(t.startCharacter)||X.number(t.startCharacter))&&(X.undefined(t.endCharacter)||X.number(t.endCharacter))&&(X.undefined(t.kind)||X.string(t.kind))}}(d||(d={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return X.defined(t)&&o.is(t.location)&&X.string(t.message)}}(p||(p={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(h||(h={})),function(e){e.create=function(e,t,n,r,i,o){var s={range:e,message:t};return X.defined(n)&&(s.severity=n),X.defined(r)&&(s.code=r),X.defined(i)&&(s.source=i),X.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t=e;return X.defined(t)&&i.is(t.range)&&X.string(t.message)&&(X.number(t.severity)||X.undefined(t.severity))&&(X.number(t.code)||X.string(t.code)||X.undefined(t.code))&&(X.string(t.source)||X.undefined(t.source))&&(X.undefined(t.relatedInformation)||X.typedArray(t.relatedInformation,p.is))}}(f||(f={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return X.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){var t=e;return X.defined(t)&&X.string(t.title)&&X.string(t.command)}}(m||(m={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return X.objectLiteral(t)&&X.string(t.newText)&&i.is(t.range)}}(g||(g={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return X.defined(t)&&_.is(t.textDocument)&&Array.isArray(t.edits)}}(y||(y={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&X.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||X.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||X.boolean(t.options.ignoreIfExists)))}}(v||(v={})),function(e){e.create=function(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&X.string(t.oldUri)&&X.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||X.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||X.boolean(t.options.ignoreIfExists)))}}(b||(b={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&X.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||X.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||X.boolean(t.options.ignoreIfNotExists)))}}(S||(S={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return X.string(e.kind)?v.is(e)||b.is(e)||S.is(e):y.is(e)})))}}(w||(w={}));var T,_,E,C,R,x,I,O,P,D,A,N,k,j,q,M,L,F=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(g.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(g.replace(e,t))},e.prototype.delete=function(e){this.edits.push(g.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),U=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(y.is(e)){var n=new F(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new F(e.changes[n]);t._textEditChanges[n]=r})))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(_.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new F(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new F(i),this._textEditChanges[e]=r}return r},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(v.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(S.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return X.defined(t)&&X.string(t.uri)}}(T||(T={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return X.defined(t)&&X.string(t.uri)&&(null===t.version||X.number(t.version))}}(_||(_={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return X.defined(t)&&X.string(t.uri)&&X.string(t.languageId)&&X.number(t.version)&&X.string(t.text)}}(E||(E={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(C||(C={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(C||(C={})),function(e){e.is=function(e){var t=e;return X.objectLiteral(e)&&C.is(t.kind)&&X.string(t.value)}}(R||(R={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(x||(x={})),function(e){e.PlainText=1,e.Snippet=2}(I||(I={})),function(e){e.create=function(e){return{label:e}}}(O||(O={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(P||(P={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return X.string(t)||X.objectLiteral(t)&&X.string(t.language)&&X.string(t.value)}}(D||(D={})),function(e){e.is=function(e){var t=e;return!!t&&X.objectLiteral(t)&&(R.is(t.contents)||D.is(t.contents)||X.typedArray(t.contents,D.is))&&(void 0===e.range||i.is(e.range))}}(A||(A={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(N||(N={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return X.defined(t)&&(i.documentation=t),X.defined(n)?i.parameters=n:i.parameters=[],i}}(k||(k={})),function(e){e.Text=1,e.Read=2,e.Write=3}(j||(j={})),function(e){e.create=function(e,t){var n={range:e};return X.number(t)&&(n.kind=t),n}}(q||(q={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(M||(M={})),function(e){e.create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}}(L||(L={}));var B,z,H,G,V,W=function(){};!function(e){e.create=function(e,t,n,r,i,o){var s={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&X.string(t.name)&&X.number(t.kind)&&i.is(t.range)&&i.is(t.selectionRange)&&(void 0===t.detail||X.string(t.detail))&&(void 0===t.deprecated||X.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))}}(W||(W={})),function(e){e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports"}(B||(B={})),function(e){e.create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function(e){var t=e;return X.defined(t)&&X.typedArray(t.diagnostics,f.is)&&(void 0===t.only||X.typedArray(t.only,X.string))}}(z||(z={})),function(e){e.create=function(e,t,n){var r={title:e};return m.is(t)?r.command=t:r.edit=t,void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&X.string(t.title)&&(void 0===t.diagnostics||X.typedArray(t.diagnostics,f.is))&&(void 0===t.kind||X.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||m.is(t.command))&&(void 0===t.edit||w.is(t.edit))}}(H||(H={})),function(e){e.create=function(e,t){var n={range:e};return X.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return X.defined(t)&&i.is(t.range)&&(X.undefined(t.command)||m.is(t.command))}}(G||(G={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return X.defined(t)&&X.number(t.tabSize)&&X.boolean(t.insertSpaces)}}(V||(V={}));var $=function(){};!function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return X.defined(t)&&i.is(t.range)&&(X.undefined(t.target)||X.string(t.target))}}($||($={}));var K,Q,J=["\n","\r\n","\r"];!function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,i=e.slice(0,r),o=e.slice(r);t(i,n),t(o,n);for(var s=0,a=0,c=0;s<i.length&&a<o.length;){var l=n(i[s],o[a]);e[c++]=l<=0?i[s++]:o[a++]}for(;s<i.length;)e[c++]=i[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,r){return new Y(e,t,n,r)},e.is=function(e){var t=e;return!!(X.defined(t)&&X.string(t.uri)&&(X.undefined(t.languageId)||X.string(t.languageId))&&X.number(t.lineCount)&&X.func(t.getText)&&X.func(t.positionAt)&&X.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),i=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=r.length,s=i.length-1;s>=0;s--){var a=i[s],c=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=o))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(l,r.length),o=c}return r}}(K||(K={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(Q||(Q={}));var X,Y=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return r.create(0,e);for(;n<i;){var o=Math.floor((n+i)/2);t[o]>e?i=o:n=o+1}var s=n-1;return r.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(X||(X={}))},3403:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o,s,a,c,l=n(1017),u=n(7147),d=Object.prototype.toString;function p(e){return void 0!==e}function h(e){return"[object String]"===d.call(e)}function f(e){return JSON.parse(u.readFileSync(e,"utf8"))}function m(e,t){return c&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,n){var r=n[0],i=t[r],o=e;return"string"==typeof i?o=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(o=String(i)),o}))}function g(e){return function(t,n){for(var r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return r=t,"[object Number]"===d.call(r)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):m(e[t],i):h(n)?(console.warn("Message "+n+" didn't get externalized correctly."),m(n,i)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function y(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return m(t,n)}function v(e,t){return s[e]=t,t}function b(e){try{return function(e){var t=f(l.join(e,"nls.metadata.json")),n=Object.create(null);for(var r in t){var i=t[r];n[r]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function S(e,t){var n;if(!0===a.languagePackSupport&&void 0!==a.cacheRoot&&void 0!==a.languagePackId&&void 0!==a.translationsConfigFile&&void 0!==a.translationsConfig)try{n=function(e,t){var n,r,i,o=l.join(a.cacheRoot,e.id+"-"+e.hash+".json"),s=!1,c=!1;try{return n=JSON.parse(u.readFileSync(o,{encoding:"utf8",flag:"r"})),r=o,i=new Date,u.utimes(r,i,i,(function(){})),n}catch(e){if("ENOENT"===e.code)c=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),u.unlink(o,(function(e){e&&console.error("Deleting corrupted bundle "+o+" failed.")})),s=!0}}if(n=function(e,t){var n=a.translationsConfig[e.id];if(n){var r=f(n).contents,i=f(l.join(t,"nls.metadata.json")),o=Object.create(null);for(var s in i){var c=i[s],u=r[e.outDir+"/"+s];if(u){for(var d=[],p=0;p<c.keys.length;p++){var m=c.keys[p],g=u[h(m)?m:m.key];void 0===g&&(g=c.messages[p]),d.push(g)}o[s]=d}else o[s]=c.messages}return o}}(e,t),!n||s)return n;if(c)try{u.writeFileSync(o,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(a.languagePackSupport)return b(t);var r=function(e){for(var t=a.language;t;){var n=l.join(e,"nls.bundle."+t+".json");if(u.existsSync(n))return n;var r=t.lastIndexOf("-");t=r>0?t.substring(0,r):void 0}if(void 0===t&&(n=l.join(e,"nls.bundle.json"),u.existsSync(n)))return n}(t);if(r)try{return f(r)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=b(t)}return n}function w(e){if(!e)return y;var t=l.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),a.messageFormat===r.both||a.messageFormat===r.bundle){var n=function(e){for(var t,n=l.dirname(e);t=l.join(n,"nls.metadata.header.json"),!u.existsSync(t);){var r=l.dirname(n);if(r===n){t=void 0;break}n=r}return t}(e);if(n){var i=l.dirname(n),o=s[i];if(void 0===o)try{var d=JSON.parse(u.readFileSync(n,"utf8"));try{var h=S(d,i);o=v(i,h?{header:d,nlsBundle:h}:null)}catch(e){console.error("Failed to load nls bundle",e),o=v(i,null)}}catch(e){console.error("Failed to read header file",e),o=v(i,null)}if(o){var m=e.substr(i.length+1).replace(/\\/g,"/"),b=o.nlsBundle[m];return void 0===b?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):g(b)}}}if(a.messageFormat===r.both||a.messageFormat===r.file)try{var w=f(function(e){var t;if(a.cacheLanguageResolution&&t);else{if(c||!a.language)t=".nls.json";else for(var n=a.language;n;){var r=".nls."+n+".json";if(u.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}a.cacheLanguageResolution}return e+t}(e));return Array.isArray(w)?g(w):p(w.messages)&&p(w.keys)?g(w.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}!function(e){e.file="file",e.bundle="bundle",e.both="both"}(r=t.MessageFormat||(t.MessageFormat={})),function(e){e.standalone="standalone",e.languagePack="languagePack"}(i=t.BundleFormat||(t.BundleFormat={})),function(e){e.is=function(e){var t=e;return t&&p(t.key)&&p(t.comment)}}(o||(o={})),function(){if(a={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:r.bundle},h(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];h(n)&&(t=n)}if(h(e.locale)&&(a.locale=e.locale.toLowerCase()),void 0===t?a.language=a.locale:"en"!==t&&(a.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(a.languagePackSupport=e._languagePackSupport),h(e._cacheRoot)&&(a.cacheRoot=e._cacheRoot),h(e._languagePackId)&&(a.languagePackId=e._languagePackId),h(e._translationsConfigFile)){a.translationsConfigFile=e._translationsConfigFile;try{a.translationsConfig=f(a.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=l.dirname(e._corruptedFile);u.exists(i,(function(t){t&&u.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}c="pseudo"===a.locale,s=Object.create(null)}(),t.loadMessageBundle=w,t.config=function(e){return e&&(h(e.locale)&&(a.locale=e.locale.toLowerCase(),a.language=a.locale,s=Object.create(null)),void 0!==e.messageFormat&&(a.messageFormat=e.messageFormat),e.bundleFormat===i.standalone&&!0===a.languagePackSupport&&(a.languagePackSupport=!1)),c="pseudo"===a.locale,w}},2479:e=>{e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},9602:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4411:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;var s=[];for(r=0;o&&r<t;r++)s.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),r=0;r<n.length;r++)o=i(this,o,n[r]);return s},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(9602)(r)}catch(e){}},7766:(e,t,n)=>{var r=n(7147),i=n(9796),o=n(8913),s=n(2779),a=n(3837),c=n(2361).EventEmitter,l=n(2781).Transform,u=n(2781).PassThrough,d=n(2781).Writable;function p(e,t,n){"function"==typeof t&&(n=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!1),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==n&&(n=I),r.fstat(e,(function(r,i){if(r)return n(r);h(o.createFromFd(e,{autoClose:!0}),i.size,t,n)}))}function h(e,t,n,r){"function"==typeof n&&(r=n,n=null),null==n&&(n={}),null==n.autoClose&&(n.autoClose=!0),null==n.lazyEntries&&(n.lazyEntries=!1),null==n.decodeStrings&&(n.decodeStrings=!0);var i=!!n.decodeStrings;if(null==n.validateEntrySizes&&(n.validateEntrySizes=!0),null==n.strictFileNames&&(n.strictFileNames=!1),null==r&&(r=I),"number"!=typeof t)throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var o=Math.min(65557,t),s=E(o),a=t-s.length;S(e,s,0,o,a,(function(c){if(c)return r(c);for(var l=o-22;l>=0;l-=1)if(101010256===s.readUInt32LE(l)){var u=s.slice(l),d=u.readUInt16LE(4);if(0!==d)return r(new Error("multi-disk zip files are not supported: found disk number: "+d));var p=u.readUInt16LE(10),h=u.readUInt32LE(16),m=u.readUInt16LE(20),g=u.length-22;if(m!==g)return r(new Error("invalid comment length. expected: "+g+". found: "+m));var y=i?R(u,22,u.length,!1):u.slice(22);if(65535!==p&&4294967295!==h)return r(null,new f(e,h,t,p,y,n.autoClose,n.lazyEntries,i,n.validateEntrySizes,n.strictFileNames));var v=E(20),b=a+l-v.length;return void S(e,v,0,v.length,b,(function(o){if(o)return r(o);if(117853008!==v.readUInt32LE(0))return r(new Error("invalid zip64 end of central directory locator signature"));var s=x(v,8),a=E(56);S(e,a,0,a.length,s,(function(o){return o?r(o):101075792!==a.readUInt32LE(0)?r(new Error("invalid zip64 end of central directory record signature")):(p=x(a,32),h=x(a,48),r(null,new f(e,h,t,p,y,n.autoClose,n.lazyEntries,i,n.validateEntrySizes,n.strictFileNames)))}))}))}r(new Error("end of central directory record signature not found"))}))}function f(e,t,n,r,i,o,s,a,l,u){var d=this;c.call(d),d.reader=e,d.reader.on("error",(function(e){g(d,e)})),d.reader.once("close",(function(){d.emit("close")})),d.readEntryCursor=t,d.fileSize=n,d.entryCount=r,d.comment=i,d.entriesRead=0,d.autoClose=!!o,d.lazyEntries=!!s,d.decodeStrings=!!a,d.validateEntrySizes=!!l,d.strictFileNames=!!u,d.isOpen=!0,d.emittedError=!1,d.lazyEntries||d._readEntry()}function m(e,t){e.autoClose&&e.close(),g(e,t)}function g(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}function y(){}function v(e,t){return new Date(1980+(e>>9&127),(e>>5&15)-1,31&e,t>>11&31,t>>5&63,2*(31&t),0)}function b(e){return-1!==e.indexOf("\\")?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:-1!==e.split("/").indexOf("..")?"invalid relative path: "+e:null}function S(e,t,n,r,i,o){if(0===r)return setImmediate((function(){o(null,E(0))}));e.read(t,n,r,i,(function(e,t){return e?o(e):t<r?o(new Error("unexpected EOF")):void o()}))}function w(e){l.call(this),this.actualByteCount=0,this.expectedByteCount=e}function T(){c.call(this),this.refCount=0}function _(e){u.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}t.open=function(e,t,n){"function"==typeof t&&(n=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!0),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==n&&(n=I),r.open(e,"r",(function(e,i){if(e)return n(e);p(i,t,(function(e,t){e&&r.close(i,I),n(e,t)}))}))},t.fromFd=p,t.fromBuffer=function(e,t,n){"function"==typeof t&&(n=t,t=null),null==t&&(t={}),t.autoClose=!1,null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),h(o.createFromBuffer(e,{maxChunkSize:65536}),e.length,t,n)},t.fromRandomAccessReader=h,t.dosDateTimeToDate=v,t.validateFileName=b,t.ZipFile=f,t.Entry=y,t.RandomAccessReader=T,a.inherits(f,c),f.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())},f.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()},f.prototype._readEntry=function(){var e=this;if(e.entryCount!==e.entriesRead){if(!e.emittedError){var t=E(46);S(e.reader,t,0,t.length,e.readEntryCursor,(function(n){if(n)return m(e,n);if(!e.emittedError){var r=new y,i=t.readUInt32LE(0);if(33639248!==i)return m(e,new Error("invalid central directory file header signature: 0x"+i.toString(16)));if(r.versionMadeBy=t.readUInt16LE(4),r.versionNeededToExtract=t.readUInt16LE(6),r.generalPurposeBitFlag=t.readUInt16LE(8),r.compressionMethod=t.readUInt16LE(10),r.lastModFileTime=t.readUInt16LE(12),r.lastModFileDate=t.readUInt16LE(14),r.crc32=t.readUInt32LE(16),r.compressedSize=t.readUInt32LE(20),r.uncompressedSize=t.readUInt32LE(24),r.fileNameLength=t.readUInt16LE(28),r.extraFieldLength=t.readUInt16LE(30),r.fileCommentLength=t.readUInt16LE(32),r.internalFileAttributes=t.readUInt16LE(36),r.externalFileAttributes=t.readUInt32LE(38),r.relativeOffsetOfLocalHeader=t.readUInt32LE(42),64&r.generalPurposeBitFlag)return m(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=E(r.fileNameLength+r.extraFieldLength+r.fileCommentLength),S(e.reader,t,0,t.length,e.readEntryCursor,(function(n){if(n)return m(e,n);if(!e.emittedError){var i=0!=(2048&r.generalPurposeBitFlag);r.fileName=e.decodeStrings?R(t,0,r.fileNameLength,i):t.slice(0,r.fileNameLength);var o=r.fileNameLength+r.extraFieldLength,a=t.slice(r.fileNameLength,o);r.extraFields=[];for(var c=0;c<a.length-3;){var l=a.readUInt16LE(c+0),u=a.readUInt16LE(c+2),d=c+4,p=d+u;if(p>a.length)return m(e,new Error("extra field length exceeds extra field buffer size"));var h=E(u);a.copy(h,0,d,p),r.extraFields.push({id:l,data:h}),c=p}if(r.fileComment=e.decodeStrings?R(t,o,o+r.fileCommentLength,i):t.slice(o,o+r.fileCommentLength),r.comment=r.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,4294967295===r.uncompressedSize||4294967295===r.compressedSize||4294967295===r.relativeOffsetOfLocalHeader){var f=null;for(c=0;c<r.extraFields.length;c++)if(1===(y=r.extraFields[c]).id){f=y.data;break}if(null==f)return m(e,new Error("expected zip64 extended information extra field"));var g=0;if(4294967295===r.uncompressedSize){if(g+8>f.length)return m(e,new Error("zip64 extended information extra field does not include uncompressed size"));r.uncompressedSize=x(f,g),g+=8}if(4294967295===r.compressedSize){if(g+8>f.length)return m(e,new Error("zip64 extended information extra field does not include compressed size"));r.compressedSize=x(f,g),g+=8}if(4294967295===r.relativeOffsetOfLocalHeader){if(g+8>f.length)return m(e,new Error("zip64 extended information extra field does not include relative header offset"));r.relativeOffsetOfLocalHeader=x(f,g),g+=8}}if(e.decodeStrings)for(c=0;c<r.extraFields.length;c++){var y;if(28789===(y=r.extraFields[c]).id){if(y.data.length<6)continue;if(1!==y.data.readUInt8(0))continue;var v=y.data.readUInt32LE(1);if(s.unsigned(t.slice(0,r.fileNameLength))!==v)continue;r.fileName=R(y.data,5,y.data.length,!0);break}}if(e.validateEntrySizes&&0===r.compressionMethod){var S=r.uncompressedSize;if(r.isEncrypted()&&(S+=12),r.compressedSize!==S){var w="compressed/uncompressed size mismatch for stored file: "+r.compressedSize+" != "+r.uncompressedSize;return m(e,new Error(w))}}if(e.decodeStrings){e.strictFileNames||(r.fileName=r.fileName.replace(/\\/g,"/"));var T=b(r.fileName,e.validateFileNameOptions);if(null!=T)return m(e,new Error(T))}e.emit("entry",r),e.lazyEntries||e._readEntry()}}))}}))}}else setImmediate((function(){e.autoClose&&e.close(),e.emittedError||e.emit("end")}))},f.prototype.openReadStream=function(e,t,n){var r=this,o=0,s=e.compressedSize;if(null==n)n=t,t={};else{if(null!=t.decrypt){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(!1!==t.decrypt)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&!1!==t.decompress)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(null!=t.decompress){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!1!==t.decompress&&!0!==t.decompress)throw new Error("invalid options.decompress value: "+t.decompress)}if(null!=t.start||null!=t.end){if(e.isCompressed()&&!1!==t.decompress)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&!1!==t.decrypt)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(null!=t.start){if((o=t.start)<0)throw new Error("options.start < 0");if(o>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(null!=t.end){if((s=t.end)<0)throw new Error("options.end < 0");if(s>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(s<o)throw new Error("options.end < options.start")}}if(!r.isOpen)return n(new Error("closed"));if(e.isEncrypted()&&!1!==t.decrypt)return n(new Error("entry is encrypted, and options.decrypt !== false"));r.reader.ref();var a=E(30);S(r.reader,a,0,a.length,e.relativeOffsetOfLocalHeader,(function(c){try{if(c)return n(c);var l=a.readUInt32LE(0);if(67324752!==l)return n(new Error("invalid local file header signature: 0x"+l.toString(16)));var u,d=a.readUInt16LE(26),p=a.readUInt16LE(28),h=e.relativeOffsetOfLocalHeader+a.length+d+p;if(0===e.compressionMethod)u=!1;else{if(8!==e.compressionMethod)return n(new Error("unsupported compression method: "+e.compressionMethod));u=null==t.decompress||t.decompress}var f=h,m=f+e.compressedSize;if(0!==e.compressedSize&&m>r.fileSize)return n(new Error("file data overflows file bounds: "+f+" + "+e.compressedSize+" > "+r.fileSize));var g=r.reader.createReadStream({start:f+o,end:f+s}),y=g;if(u){var v=!1,b=i.createInflateRaw();g.on("error",(function(e){setImmediate((function(){v||b.emit("error",e)}))})),g.pipe(b),r.validateEntrySizes?(y=new w(e.uncompressedSize),b.on("error",(function(e){setImmediate((function(){v||y.emit("error",e)}))})),b.pipe(y)):y=b,y.destroy=function(){v=!0,b!==y&&b.unpipe(y),g.unpipe(b),g.destroy()}}n(null,y)}finally{r.reader.unref()}}))},y.prototype.getLastModDate=function(){return v(this.lastModFileDate,this.lastModFileTime)},y.prototype.isEncrypted=function(){return 0!=(1&this.generalPurposeBitFlag)},y.prototype.isCompressed=function(){return 8===this.compressionMethod},a.inherits(w,l),w.prototype._transform=function(e,t,n){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var r="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return n(new Error(r))}n(null,e)},w.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()},a.inherits(T,c),T.prototype.ref=function(){this.refCount+=1},T.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.close((function(t){if(t)return e.emit("error",t);e.emit("close")}))}},T.prototype.createReadStream=function(e){var t=e.start,n=e.end;if(t===n){var r=new u;return setImmediate((function(){r.end()})),r}var i=this._readStreamForRange(t,n),o=!1,s=new _(this);i.on("error",(function(e){setImmediate((function(){o||s.emit("error",e)}))})),s.destroy=function(){i.unpipe(s),s.unref(),i.destroy()};var a=new w(n-t);return s.on("error",(function(e){setImmediate((function(){o||a.emit("error",e)}))})),a.destroy=function(){o=!0,s.unpipe(a),s.destroy()},i.pipe(s).pipe(a)},T.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")},T.prototype.read=function(e,t,n,r,i){var o=this.createReadStream({start:r,end:r+n}),s=new d,a=0;s._write=function(n,r,i){n.copy(e,t+a,0,n.length),a+=n.length,i()},s.on("finish",i),o.on("error",(function(e){i(e)})),o.pipe(s)},T.prototype.close=function(e){setImmediate(e)},a.inherits(_,u),_.prototype._flush=function(e){this.unref(),e()},_.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var E,C="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function R(e,t,n,r){if(r)return e.toString("utf8",t,n);for(var i="",o=t;o<n;o++)i+=C[e[o]];return i}function x(e,t){var n=e.readUInt32LE(t);return 4294967296*e.readUInt32LE(t+4)+n}function I(e){if(e)throw e}E="function"==typeof Buffer.allocUnsafe?function(e){return Buffer.allocUnsafe(e)}:function(e){return new Buffer(e)}},9644:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AppInsightsCore:()=>ae,BaseCore:()=>ue,BaseTelemetryPlugin:()=>_e.i,CoreUtils:()=>re,DiagnosticLogger:()=>m.AQ,ESPromise:()=>fe,ESPromiseScheduler:()=>Se,EventHelper:()=>E.zB,EventLatency:()=>l,EventPersistence:()=>d,EventPropertyType:()=>u,EventsDiscardedReason:()=>Re.h,FullVersionString:()=>P,InternalAppInsightsCore:()=>v.F,InternalBaseCore:()=>ce.A,LoggingSeverity:()=>a.X,MinChannelPriorty:()=>Ce.p,NotificationManager:()=>Te.f,PerfEvent:()=>g.zn,PerfManager:()=>g.Jk,ProcessTelemetryContext:()=>Ee.Vi,TraceLevel:()=>p,Undefined:()=>C.jA,Utils:()=>ne,ValueKind:()=>c,ValueSanitizer:()=>we,Version:()=>O,_ExtendedInternalMessageId:()=>h,_InternalLogMessage:()=>m.lQ,_InternalMessageId:()=>a.v,__getRegisteredEvents:()=>R.um,_logInternalMessage:()=>m.L4,_throwInternal:()=>m.kP,_warnToConsole:()=>m.jV,addEventHandler:()=>R.Ib,addEventListeners:()=>R.yw,addPageHideEventListener:()=>R.TJ,addPageShowEventListener:()=>R.nD,addPageUnloadEventListener:()=>R.c9,areCookiesSupported:()=>_.p7,arrForEach:()=>s.tO,arrIndexOf:()=>s.UA,arrMap:()=>s.Mr,arrReduce:()=>s.Xz,attachEvent:()=>R.pZ,cookieAvailable:()=>_.p7,createCookieMgr:()=>_.Nz,createEnumStyle:()=>o.By,createGuid:()=>Q,createProcessTelemetryContext:()=>Ee.CD,createTraceParent:()=>Oe.SU,createUniqueNamespace:()=>xe.J,createUnloadHandlerContainer:()=>Ie.Y,dateNow:()=>s.m6,deleteCookie:()=>W,detachEvent:()=>R.pD,disableCookies:()=>G,disallowsSameSiteNone:()=>_.UY,doPerf:()=>g.Lm,dumpObj:()=>y.eU,eventOff:()=>R.QY,eventOn:()=>R.XO,extend:()=>J,findW3cTraceParent:()=>Oe.lq,formatTraceParent:()=>Oe.aR,generateW3CId:()=>E.DO,getCommonSchemaMetaData:()=>H,getConsole:()=>y.dr,getCookie:()=>$,getCookieValue:()=>K,getCrypto:()=>y.MX,getDocument:()=>y.Me,getExceptionName:()=>s.jj,getFieldValueType:()=>te,getGlobal:()=>I.Rd,getGlobalInst:()=>y.a8,getHistory:()=>y.s1,getIEVersion:()=>y.sA,getISOString:()=>s.Y6,getJSON:()=>y.xA,getLocation:()=>y.k$,getMsCrypto:()=>y.gz,getNavigator:()=>y.jW,getPerformance:()=>y.r,getSetValue:()=>s.qK,getTenantId:()=>F,getTime:()=>X,getWindow:()=>y.Jj,hasDocument:()=>y.Nv,hasHistory:()=>y.fE,hasJSON:()=>y.nS,hasNavigator:()=>y.d6,hasOwnProperty:()=>s.nr,hasWindow:()=>y.Ym,isArray:()=>s.kJ,isArrayValid:()=>Z,isBeaconsSupported:()=>y.MF,isBoolean:()=>s.jn,isChromium:()=>ie,isDate:()=>s.J_,isDocumentObjectAvailable:()=>q,isError:()=>s.VZ,isFetchSupported:()=>y.JO,isFunction:()=>s.mf,isIE:()=>y.w1,isLatency:()=>B,isNotTruthy:()=>s.F,isNullOrUndefined:()=>s.le,isNumber:()=>s.hj,isObject:()=>s.Kn,isReactNative:()=>y.b$,isSampledFlag:()=>Oe.Pn,isString:()=>s.HD,isTruthy:()=>s.fQ,isTypeof:()=>s.Ym,isUint8ArrayAvailable:()=>U,isUndefined:()=>s.o8,isValidSpanId:()=>Oe.Lc,isValidTraceId:()=>Oe.jN,isValidTraceParent:()=>Oe.J6,isValueAssigned:()=>L,isValueKind:()=>Y,isWindowObjectAvailable:()=>M,isXhrSupported:()=>y.Z3,mergeEvtNamespace:()=>R.jU,newGuid:()=>E.GW,newId:()=>x.pZ,normalizeJsName:()=>s.Gf,objCreate:()=>I.pu,objDefineAccessors:()=>s.l_,objForEachKey:()=>s.rW,objFreeze:()=>s.FL,objKeys:()=>s.FY,objSeal:()=>s.Xi,openXhr:()=>oe,optimizeObject:()=>s.Ax,parseTraceParent:()=>Oe.j_,perfNow:()=>E.Jj,proxyAssign:()=>s.cf,proxyFunctionAs:()=>s.Oi,proxyFunctions:()=>s.Vb,random32:()=>x._l,randomValue:()=>x.az,removeEventHandler:()=>R.C1,removeEventListeners:()=>R.nJ,removePageHideEventListener:()=>R.C9,removePageShowEventListener:()=>R.Yl,removePageUnloadEventListener:()=>R.JA,safeGetCookieMgr:()=>_.JP,safeGetLogger:()=>m.vH,sanitizeProperty:()=>z,setCookie:()=>V,setEnableEnvMocks:()=>y.dI,setProcessTelemetryTimings:()=>ee,setValue:()=>s.sO,strContains:()=>s._Q,strEndsWith:()=>s.Id,strFunction:()=>C.cb,strObject:()=>C.fK,strPrototype:()=>C.hB,strStartsWith:()=>s.xe,strTrim:()=>s.nd,strUndefined:()=>C.jA,throwError:()=>s._y,toISOString:()=>s.Y6,useXDomainRequest:()=>y.cp});var r,i=n(3298),o=n(1785),s=n(3161),a=n(8712),c=(0,o.By)({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,CustomerContent_GenericContent:32}),l=(0,o.By)({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),u=(0,o.By)({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),d=(0,o.By)({Normal:1,Critical:2}),p=(0,o.By)({NONE:0,ERROR:1,WARNING:2,INFORMATION:3}),h=(0,s.FL)((0,i.uc)((0,i.uc)({},a.v),(0,o.By)({AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}))),f=n(2314),m=n(547),g=n(2753),y=n(1167),v=n(8176),b="",S="https://browser.events.data.microsoft.com/OneCollector/1.0/",w="version",T="properties",_=n(8589),E=n(821),C=n(2589),R=n(1318),x=n(395),I=n(8785),O="3.2.13",P="1DS-Web-JS-"+O,D="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",A="withCredentials",N="timeout",k=((r={})[0]=0,r[2]=6,r[1]=1,r[3]=7,r[4098]=6,r[4097]=1,r[4099]=7,r),j=null,q=Boolean((0,y.Me)()),M=Boolean((0,y.Jj)());function L(e){return!(e===b||(0,s.le)(e))}function F(e){if(e){var t=e.indexOf("-");if(t>-1)return e.substring(0,t)}return b}function U(){return null===j&&(j=!(0,s.o8)(Uint8Array)&&!function(){var e=(0,y.jW)();if(!(0,s.o8)(e)&&e.userAgent){var t=e.userAgent.toLowerCase();if((t.indexOf("safari")>=0||t.indexOf("firefox")>=0)&&t.indexOf("chrome")<0)return!0}return!1}()&&!(0,y.b$)()),j}function B(e){return!!(e&&(0,s.hj)(e)&&e>=1&&e<=4)}function z(e,t,n){if(!t&&!L(t)||"string"!=typeof e)return null;var r=typeof t;if("string"===r||"number"===r||"boolean"===r||(0,s.kJ)(t))t={value:t};else if("object"!==r||C.CY.call(t,"value")){if((0,s.le)(t.value)||t.value===b||!(0,s.HD)(t.value)&&!(0,s.hj)(t.value)&&!(0,s.jn)(t.value)&&!(0,s.kJ)(t.value))return null}else t={value:n?JSON.stringify(t):t};if((0,s.kJ)(t.value)&&!Z(t.value))return null;if(!(0,s.le)(t.kind)){if((0,s.kJ)(t.value)||!Y(t.kind))return null;t.value=t.value.toString()}return t}function H(e,t,n){var r=-1;if(!(0,s.o8)(e))if(t>0&&(32===t?r=8192:t<=13&&(r=t<<5)),function(e){return e>=0&&e<=9}(n))-1===r&&(r=0),r|=n;else{var i=k[te(e)]||-1;-1!==r&&-1!==i?r|=i:6===i&&(r=i)}return r}function G(){(0,_.JP)(null).setEnabled(!1)}function V(e,t,n){(0,_.p7)(null)&&(0,_.JP)(null).set(e,t,86400*n,null,"/")}function W(e){(0,_.p7)(null)&&(0,_.JP)(null).del(e)}function $(e){return(0,_.p7)(null)?K((0,_.JP)(null),e):b}function K(e,t,n){var r;return void 0===n&&(n=!0),e&&(r=e.get(t),n&&r&&decodeURIComponent&&(r=decodeURIComponent(r))),r||b}function Q(e){void 0===e&&(e="D");var t=(0,E.GW)();return"B"===e?t="{"+t+"}":"P"===e?t="("+t+")":"N"===e&&(t=t.replace(/-/g,b)),t}function J(e,t,n,r,i){var o={},a=!1,c=0,l=arguments.length,u=arguments;for("[object Boolean]"===Object[C.hB].toString.call(u[0])&&(a=u[0],c++);c<l;c++)e=u[c],(0,s.rW)(e,(function(e,t){a&&t&&(0,s.Kn)(t)?(0,s.kJ)(t)?(o[e]=o[e]||[],(0,s.tO)(t,(function(t,n){t&&(0,s.Kn)(t)?o[e][n]=J(!0,o[e][n],t):o[e][n]=t}))):o[e]=J(!0,o[e],t):o[e]=t}));return o}var X=E.Jj;function Y(e){return 0===e||e>0&&e<=13||32===e}function Z(e){return e.length>0}function ee(e,t){var n=e;n.timings=n.timings||{},n.timings.processTelemetryStart=n.timings.processTelemetryStart||{},n.timings.processTelemetryStart[t]=X()}function te(e){var t=0;if(null!=e){var n=typeof e;"string"===n?t=1:"number"===n?t=2:"boolean"===n?t=3:n===C.fK&&(t=4,(0,s.kJ)(e)?(t=4096,e.length>0&&(t|=te(e[0]))):C.CY.call(e,"value")&&(t=8192|te(e.value)))}return t}var ne={Version:O,FullVersionString:P,strUndefined:C.jA,strObject:C.fK,Undefined:C.jA,arrForEach:s.tO,arrIndexOf:s.UA,arrMap:s.Mr,arrReduce:s.Xz,objKeys:s.FY,toISOString:s.Y6,isReactNative:y.b$,isString:s.HD,isNumber:s.hj,isBoolean:s.jn,isFunction:s.mf,isArray:s.kJ,isObject:s.Kn,strTrim:s.nd,isDocumentObjectAvailable:q,isWindowObjectAvailable:M,isValueAssigned:L,getTenantId:F,isBeaconsSupported:y.MF,isUint8ArrayAvailable:U,isLatency:B,sanitizeProperty:z,getISOString:s.Y6,useXDomainRequest:y.cp,getCommonSchemaMetaData:H,cookieAvailable:_.p7,disallowsSameSiteNone:_.UY,setCookie:V,deleteCookie:W,getCookie:$,createGuid:Q,extend:J,getTime:X,isValueKind:Y,isArrayValid:Z,objDefineAccessors:s.l_,addPageUnloadEventListener:R.c9,setProcessTelemetryTimings:ee,addEventHandler:R.Ib,getFieldValueType:te,strEndsWith:s.Id,objForEachKey:s.rW},re={_canUseCookies:void 0,isTypeof:s.Ym,isUndefined:s.o8,isNullOrUndefined:s.le,hasOwnProperty:s.nr,isFunction:s.mf,isObject:s.Kn,isDate:s.J_,isArray:s.kJ,isError:s.VZ,isString:s.HD,isNumber:s.hj,isBoolean:s.jn,toISOString:s.Y6,arrForEach:s.tO,arrIndexOf:s.UA,arrMap:s.Mr,arrReduce:s.Xz,strTrim:s.nd,objCreate:I.pu,objKeys:s.FY,objDefineAccessors:s.l_,addEventHandler:R.Ib,dateNow:s.m6,isIE:y.w1,disableCookies:G,newGuid:E.GW,perfNow:E.Jj,newId:x.pZ,randomValue:x.az,random32:x._l,mwcRandomSeed:x.CN,mwcRandom32:x.F6,generateW3CId:E.DO};function ie(){return!!(0,y.a8)("chrome")}function oe(e,t,n,r,i,o){function s(e,t,n){try{e[t]=n}catch(e){}}void 0===r&&(r=!1),void 0===i&&(i=!1);var a=new XMLHttpRequest;return r&&s(a,D,r),n&&s(a,A,n),a.open(e,t,!i),n&&s(a,A,n),!i&&o&&s(a,N,o),a}var se=function(e){function t(){var n=e.call(this)||this;return n.pluginVersionStringArr=[],(0,f.default)(t,n,(function(e,t){e.logger&&e.logger.queue||(e.logger=new m.AQ({loggingLevelConsole:1})),e.initialize=function(n,r,i,o){(0,g.Lm)(e,(function(){return"AppInsightsCore.initialize"}),(function(){var a=e.pluginVersionStringArr;if(n){n.endpointUrl||(n.endpointUrl=S);var c=n.propertyStorageOverride;!c||c.getProperty&&c.setProperty||(0,s._y)("Invalid property storage override passed."),n.channels&&(0,s.tO)(n.channels,(function(e){e&&(0,s.tO)(e,(function(e){if(e.identifier&&e.version){var t=e.identifier+"="+e.version;a.push(t)}}))}))}e.getWParam=function(){return"undefined"!=typeof document||n.enableWParam?0:-1},r&&(0,s.tO)(r,(function(e){if(e&&e.identifier&&e.version){var t=e.identifier+"="+e.version;a.push(t)}})),e.pluginVersionString=a.join(";"),e.pluginVersionStringArr=a;try{t.initialize(n,r,i,o),e.pollInternalLogs("InternalLog")}catch(t){var l=e.logger,u=(0,y.eU)(t);-1!==u.indexOf("channels")&&(u+="\n - Channels must be provided through config.channels only!"),(0,m.kP)(l,1,514,"SDK Initialization Failed - no telemetry will be sent: "+u)}}),(function(){return{config:n,extensions:r,logger:i,notificationManager:o}}))},e.track=function(n){(0,g.Lm)(e,(function(){return"AppInsightsCore.track"}),(function(){var r=n;if(r){r.timings=r.timings||{},r.timings.trackStart=X(),B(r.latency)||(r.latency=1);var i=r.ext=r.ext||{};i.sdk=i.sdk||{},i.sdk.ver=P;var o=r.baseData=r.baseData||{};o[T]=o[T]||{};var s=o[T];s[w]=s[w]||e.pluginVersionString||b}t.track(r)}),(function(){return{item:n}}),!n.sync)}})),n}return(0,i.ne)(t,e),t.__ieDyn=1,t}(v.F);const ae=se;var ce=n(4770),le=function(e){function t(){var n=e.call(this)||this;return(0,f.default)(t,n,(function(e,t){e.initialize=function(n,r,i,o){n&&!n.endpointUrl&&(n.endpointUrl=S),e.getWParam=function(){return q||n.enableWParam?0:-1};try{t.initialize(n,r,i,o)}catch(t){(0,m.kP)(e.logger,1,514,"Initialization Failed: "+(0,y.eU)(t)+"\n - Note: Channels must be provided through config.channels only")}},e.track=function(e){var n=e;if(n){var r=n.ext=n.ext||{};r.sdk=r.sdk||{},r.sdk.ver=P}t.track(n)}})),n}return(0,i.ne)(t,e),t.__ieDyn=1,t}(ce.A);const ue=le;var de=s.mf;function pe(e,t,n){return function(r){e[t]=r,n()}}var he=function(){function e(t){var n=0,r=null,i=[];function o(){if(i.length>0){var e=i.slice();i=[],setTimeout((function(){for(var t=0,n=e.length;t<n;++t)try{e[t]()}catch(e){}}),0)}}function s(e){0===n&&(r=e,n=1,o())}function a(e){0===n&&(r=e,n=2,o())}(0,f.default)(e,this,(function(t){t.then=function(t,s){return new e((function(a,c){!function(t,s,a,c){i.push((function(){var i;try{(i=1===n?de(t)?t(r):r:de(s)?s(r):r)instanceof e?i.then(a,c):2!==n||de(s)?a(i):c(i)}catch(e){return void c(e)}})),0!==n&&o()}(t,s,a,c)}))},t.catch=function(e){return t.then(null,e)}})),function(){if(!de(t))throw new TypeError("ESPromise: resolvedFunc argument is not a Function");try{t(s,a)}catch(e){a(e)}}()}return e.resolve=function(t){return t instanceof e?t:t&&de(t.then)?new e((function(e,n){try{t.then(e,n)}catch(e){n(e)}})):new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){if(t&&t.length)return new e((function(e,n){try{for(var r=[],i=0,o=0;o<t.length;o++){var s=t[o];s&&de(s.then)?(i++,s.then(pe(r,o,(function(){0==--i&&e(r)})),n)):r[o]=s}0===i&&setTimeout((function(){e(r)}),0)}catch(e){n(e)}}))},e.race=function(t){return new e((function(e,n){if(t&&t.length)try{for(var r=function(r){var i=t[r];i&&de(i.then)?i.then(e,n):setTimeout((function(){e(i)}),0)},i=0;i<t.length;i++)r(i)}catch(e){n(e)}}))},e}();const fe=he;var me=0,ge=[],ye=[],ve=[];function be(){return(new Date).getTime()}const Se=function(){function e(t,n){var r=0,i=(t||"<unnamed>")+"."+me;function o(e){var t=(0,I.Rd)();t&&t.QUnit&&console&&console.log("ESPromiseScheduler["+i+"] "+e)}function s(e){(0,m.jV)(n,"ESPromiseScheduler["+i+"] "+e)}me++,(0,f.default)(e,this,(function(e){var t=null,n=0;function a(e,t){for(var n=0;n<e.length;n++)if(e[n].id===t)return e.splice(n,1)[0];return null}e.scheduleEvent=function(e,c,l){var u=i+"."+n;n++,c&&(u+="-("+c+")");var d=u+"{"+r+"}";r++;var p,h,f,m={evt:null,tm:be(),id:d,isRunning:!1,isAborted:!1};return m.evt=t?(p=m,h=t,f=new fe((function(e,t){var n=be()-h.tm,r=h.id;o("["+u+"] is waiting for ["+r+":"+n+" ms] to complete before starting -- ["+ye.length+"] waiting and ["+ge.length+"] running"),p.abort=function(e){p.abort=null,a(ye,u),p.isAborted=!0,t(new Error(e))},h.evt.then((function(n){a(ye,u),w(p).then(e,t)}),(function(n){a(ye,u),w(p).then(e,t)}))})),ye.push(p),f):w(m),(t=m).evt._schId=d,m.evt;function g(e){for(var t=be(),n=t-6e5,r=e.length,i=0;i<r;){var o=e[i];if(o&&o.tm<n){var a=null;o.abort?(a="Aborting ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",o.abort(a)):a="Removing ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",s(a),e.splice(i,1),r--}else i++}}function y(e,n){var r=!1,i=a(ge,e);if(i||(i=a(ve,e),r=!0),i){i.to&&(clearTimeout(i.to),i.to=null);var c=be()-i.tm;n?r?s("Timed out event ["+e+"] finally complete -- "+c+" ms"):o("Promise ["+e+"] Complete -- "+c+" ms"):(ve.push(i),s("Event ["+e+"] Timed out and removed -- "+c+" ms"))}else o("Failed to remove ["+e+"] from running queue");t&&t.id===e&&(t=null),g(ge),g(ye),g(ve)}function v(e,t){return function(n){return y(e,!0),t&&t(n),n}}function b(e,t,n,r){t.then((function(t){return t instanceof fe?(o("Event ["+e+"] returned a promise -- waiting"),b(e,t,n,r),t):v(e,n)(t)}),v(e,r))}function S(e,t){var n=e.id;return new fe((function(r,i){o("Event ["+n+"] Starting -- waited for "+(e.wTm||"--")+" ms"),e.isRunning=!0,e.abort=function(t){e.abort=null,e.isAborted=!0,y(n,!1),i(new Error(t))};var s=t(n);s instanceof fe?(l&&(e.to=setTimeout((function(){y(n,!1),i(new Error("Timed out after ["+l+"] ms"))}),l)),b(n,s,(function(t){o("Event ["+n+"] Resolving after "+(be()-e.tm)+" ms"),r(t)}),i)):(o("Promise ["+n+"] Auto completed as the start action did not return a promise"),r())}))}function w(t){var n=be();return t.wTm=n-t.tm,t.tm=n,t.isAborted?fe.reject(new Error("["+u+"] was aborted")):(ge.push(t),S(t,e))}}}))}return e.incomplete=function(){return ge},e.waitingToStart=function(){return ye},e}();var we=function(){function e(e){var t=this,n={},r=[],i=[];function o(e,t){var o,a=n[e];if(a&&(o=a[t]),!o&&null!==o){if((0,s.HD)(e)&&(0,s.HD)(t))if(i.length>0){for(var c=0;c<i.length;c++)if(i[c].handleField(e,t)){o={canHandle:!0,fieldHandler:i[c]};break}}else 0===r.length&&(o={canHandle:!0});if(!o&&null!==o)for(o=null,c=0;c<r.length;c++)if(r[c].handleField(e,t)){o={canHandle:!0,handler:r[c],fieldHandler:null};break}a||(a=n[e]={}),a[t]=o}return o}function a(e,t,n,r,i,o){if(e.handler)return e.handler.property(t,n,i,o);if(!(0,s.le)(i.kind)){if(4096==(4096&r)||!Y(i.kind))return null;i.value=i.value.toString()}return l(e.fieldHandler,t,n,r,i)}function c(e,t,n){return L(n)?{value:n}:null}function l(e,n,r,i,o){if(o&&e){var a=e.getSanitizer(n,r,i,o.kind,o.propertyType);if(a)if(4===i){var u={},d=o.value;(0,s.rW)(d,(function(t,i){var o=n+"."+r;if(L(i)){var s=c(0,0,i);(s=l(e,o,t,te(i),s))&&(u[t]=s.value)}})),o.value=u}else{var p={path:n,name:r,type:i,prop:o,sanitizer:t};o=a.call(t,p)}}return o}e&&i.push(e),t.addSanitizer=function(e){e&&(r.push(e),n={})},t.addFieldSanitizer=function(e){e&&(i.push(e),n={})},t.handleField=function(e,t){var n=o(e,t);return!!n&&n.canHandle},t.value=function(e,t,n,r){var i=o(e,t);if(i&&i.canHandle){if(!i||!i.canHandle)return null;if(i.handler)return i.handler.value(e,t,n,r);if(!(0,s.HD)(t)||(0,s.le)(n)||n===b)return null;var l=null,u=te(n);if(8192==(8192&u)){var d=-8193&u;if(!L((l=n).value)||1!==d&&2!==d&&3!==d&&4096!=(4096&d))return null}else 1===u||2===u||3===u||4096==(4096&u)?l=c(0,0,n):4===u&&(l=c(0,0,r?JSON.stringify(n):n));if(l)return a(i,e,t,u,l,r)}return null},t.property=function(e,t,n,r){var i=o(e,t);if(!i||!i.canHandle)return null;if(!(0,s.HD)(t)||(0,s.le)(n)||!L(n.value))return null;var c=te(n.value);return 0===c?null:a(i,e,t,c,n,r)}}return e.getFieldType=te,e}(),Te=n(6329),_e=n(1549),Ee=n(877),Ce=n(978),Re=n(4641),xe=n(8530),Ie=n(6930),Oe=n(1579)},1785:(e,t,n)=>{"use strict";n.d(t,{By:()=>i,cc:()=>s,uj:()=>o});var r=n(3161);function i(e){var t={};return(0,r.rW)(e,(function(e,n){t[e]=n,t[n]=e})),(0,r._A)(t)}function o(e){var t={};return(0,r.rW)(e,(function(e,n){t[e]=e,t[n]=e})),(0,r._A)(t)}function s(e){var t={};return(0,r.rW)(e,(function(e,n){t[e]=n[1],t[n[0]]=n[1]})),(0,r._A)(t)}},4641:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var r=(0,n(1785).By)({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5})},8712:(e,t,n)=>{"use strict";n.d(t,{X:()=>S,v:()=>w});var r,i=n(1785),o="Failed",s=o+"MonitorAjax",a="Track",c="Start",l="Stop",u="Event",d="AuthContext",p="Exception",h="Local",f="Session",m="Storage",g="Browser",y="Cannot",v="Buffer",b="InstrumentationKey",S=(0,i.By)({CRITICAL:1,WARNING:2}),w=(0,i.By)(((r={})[g+"DoesNotSupport"+h+m]=0,r[g+y+"Read"+h+m]=1,r[g+y+"Read"+f+m]=2,r[g+y+"Write"+h+m]=3,r[g+y+"Write"+f+m]=4,r[g+o+"RemovalFrom"+h+m]=5,r[g+o+"RemovalFrom"+f+m]=6,r[y+"SendEmptyTelemetry"]=7,r.ClientPerformanceMathError=8,r["ErrorParsingAI"+f+"Cookie"]=9,r.ErrorPVCalc=10,r[p+"WhileLoggingError"]=11,r[o+"AddingTelemetryTo"+v]=12,r[s+"Abort"]=13,r[s+"Dur"]=14,r[s+"Open"]=15,r[s+"RSC"]=16,r[s+"Send"]=17,r[s+"GetCorrelationHeader"]=18,r[o+"ToAddHandlerForOnBeforeUnload"]=19,r[o+"ToSendQueuedTelemetry"]=20,r[o+"ToReportDataLoss"]=21,r["Flush"+o]=22,r.MessageLimitPerPVExceeded=23,r.MissingRequiredFieldSpecification=24,r.NavigationTimingNotSupported=25,r.OnError=26,r[f+"RenewalDateIsZero"]=27,r.SenderNotInitialized=28,r[c+a+u+o]=29,r[l+a+u+o]=30,r[c+a+o]=31,r[l+a+o]=32,r.TelemetrySampledAndNotSent=33,r[a+u+o]=34,r[a+p+o]=35,r[a+"Metric"+o]=36,r[a+"PV"+o]=37,r[a+"PV"+o+"Calc"]=38,r[a+"Trace"+o]=39,r["Transmission"+o]=40,r[o+"ToSet"+m+v]=41,r[o+"ToRestore"+m+v]=42,r.InvalidBackendResponse=43,r[o+"ToFixDepricatedValues"]=44,r.InvalidDurationValue=45,r.TelemetryEnvelopeInvalid=46,r.CreateEnvelopeError=47,r[y+"SerializeObject"]=48,r[y+"SerializeObjectNonSerializable"]=49,r.CircularReferenceDetected=50,r["Clear"+d+o]=51,r[p+"Truncated"]=52,r.IllegalCharsInName=53,r.ItemNotInArray=54,r.MaxAjaxPerPVExceeded=55,r.MessageTruncated=56,r.NameTooLong=57,r.SampleRateOutOfRange=58,r["Set"+d+o]=59,r["Set"+d+o+"AccountName"]=60,r.StringValueTooLong=61,r.StartCalledMoreThanOnce=62,r.StopCalledWithoutStart=63,r["TelemetryInitializer"+o]=64,r.TrackArgumentsNotSpecified=65,r.UrlTooLong=66,r[f+m+v+"Full"]=67,r[y+"AccessCookie"]=68,r.IdTooLong=69,r.InvalidEvent=70,r[s+"SetRequestHeader"]=71,r["Send"+g+"InfoOnUserInit"]=72,r["Plugin"+p]=73,r["Notification"+p]=74,r.SnippetScriptLoadFailure=99,r["Invalid"+b]=100,r[y+"ParseAiBlobValue"]=101,r.InvalidContentBlob=102,r[a+"PageAction"+u+o]=103,r[o+"AddingCustomDefinedRequestContext"]=104,r["InMemory"+m+v+"Full"]=105,r[b+"Deprecation"]=106,r))},978:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var r=100},8176:(e,t,n)=>{"use strict";n.d(t,{F:()=>p});var r=n(3298),i=n(9798),o=n(6474),s=n(4770),a=n(547),c=n(3161),l=n(9556),u=n(6329),d=n(2753),p=function(e){function t(){var n=e.call(this)||this;return(0,i.Z)(t,n,(function(e,t){function n(t){var n=e[o.tb]();n&&n[l.$F]([t],2)}e[o.VL]=function(e,n,r,i){t[o.VL](e,n,r||new a.AQ(e),i||new u.f(e))},e.track=function(r){(0,d.Lm)(e[l.kl](),(function(){return"AppInsightsCore:track"}),(function(){null===r&&(n(r),(0,c._y)("Invalid telemetry item")),function(e){(0,c.le)(e[o.I])&&(n(e),(0,c._y)("telemetry name required"))}(r),t.track(r)}),(function(){return{item:r}}),!r.sync)}})),n}return(0,r.ne)(t,e),t.__ieDyn=1,t}(s.A)},4770:(e,t,n)=>{"use strict";n.d(t,{A:()=>I});var r=n(3298),i=n(9798),o=n(8785),s=n(6474),a=n(3161),c=n(9556),l=n(877),u=n(3656),d=500;function p(e,t,n){t&&(0,a.kJ)(t)&&t[s.R5]>0&&(t=t.sort((function(e,t){return e[c.yi]-t[c.yi]})),(0,a.tO)(t,(function(e){e[c.yi]<d&&(0,a._y)("Channel has invalid priority - "+e[s.pZ])})),e[s.MW]({queue:(0,a.FL)(t),chain:(0,l.jV)(t,n[s.TC],n)}))}var h=n(8589),f=n(8530),m=n(7485),g=n(547),y=n(2753),v=n(1549),b=n(1167),S=function(e){function t(){var n,r,o=e.call(this)||this;function l(){n=0,r=[]}return o.identifier="TelemetryInitializerPlugin",o.priority=199,l(),(0,i.Z)(t,o,(function(e,t){e.addTelemetryInitializer=function(e){var t={id:n++,fn:e};return r[s.MW](t),{remove:function(){(0,a.tO)(r,(function(e,n){if(e.id===t.id)return r[s.cb](n,1),-1}))}}},e[c.hL]=function(t,n){for(var i=!1,o=r[s.R5],c=0;c<o;++c){var l=r[c];if(l)try{if(!1===l.fn[s.ZV](null,[t])){i=!0;break}}catch(e){(0,g.kP)(n[s.mc](),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+(0,a.jj)(e),{exception:(0,b.eU)(e)},!0)}}i||e[s.uL](t,n)},e[s.F3]=function(){l()}})),o}return(0,r.ne)(t,e),t.__ieDyn=1,t}(v.i),w=n(6930),T="Plugins must provide initialize method",_="_notificationManager",E="SDK is still unloading...",C={loggingLevelConsole:1};function R(e,t){return new y.Jk(t)}function x(e,t){var n=!1;return(0,a.tO)(t,(function(t){if(t===e)return n=!0,-1})),n}var I=function(){function e(){var t,n,v,b,I,O,P,D,A,N,k,j,q,M,L,F,U,B,z,H,G=0,V=!1;(0,i.Z)(e,this,(function(e){function i(n){if(!G&&!V&&(n||e[s.eZ]&&e[s.eZ].queue[s.R5]>0)){var r=(0,a.v4)(t.diagnosticLogInterval);r&&r>0||(r=1e4),G=setInterval((function(){clearInterval(G),G=0,Y()}),r)}return G}function W(){n=!1,t=(0,a.mm)(!0,{},C),e[s.TC]=t,e[s.eZ]=new g.AQ(t),e[s.iC]=[],L=new S,v=[],b=null,I=null,O=null,P=null,D=null,N=null,A=[],k=null,j=null,q=null,M=!1,F=null,U=(0,f.J)("AIBaseCore",!0),B=(0,w.Y)(),H=null}function $(){var n=(0,l.CD)(J(),t,e);return n[s.Fc](i),n}function K(n){var r=function(e,t,n){var r,i=[],o={};return(0,a.tO)(n,(function(t){((0,a.le)(t)||(0,a.le)(t[s.VL]))&&(0,a._y)(T);var n=t[c.yi],r=t[s.pZ];t&&n&&((0,a.le)(o[n])?o[n]=r:(0,g.jV)(e,"Two extensions have same priority #"+n+" - "+o[n]+", "+r)),(!n||n<500)&&i[s.MW](t)})),(r={all:n})[c.oV]=i,r}(e[s.eZ],0,A);N=r[c.oV],D=null;var o=r.all;if(q=(0,a.FL)(function(e,t,n){var r=[];if(e&&(0,a.tO)(e,(function(e){return p(r,e,n)})),t){var i=[];(0,a.tO)(t,(function(e){e[c.yi]>d&&i[s.MW](e)})),p(r,i,n)}return r}(j,o,e)),k){var h=(0,a.UA)(o,k);-1!==h&&o[s.cb](h,1),-1!==(h=(0,a.UA)(N,k))&&N[s.cb](h,1),k._setQueue(q)}else k=function(e,t){function n(){return(0,l.CD)(null,t[s.TC],t,null)}function r(e,t,n,r){var i=e?e[s.R5]+1:1;function o(){0==--i&&(r&&r(),r=null)}i>0&&(0,a.tO)(e,(function(e){if(e&&e.queue[s.R5]>0){var r=e.chain,a=t[s.zV](r);a[s.Fc](o),n(a)}else i--})),o()}var i=!1,o={identifier:"ChannelControllerPlugin",priority:d,initialize:function(t,n,r,o){i=!0,(0,a.tO)(e,(function(e){e&&e.queue[s.R5]>0&&(0,u.bP)((0,l.CD)(e.chain,t,n),r)}))},isInitialized:function(){return i},processTelemetry:function(t,i){r(e,i||n(),(function(e){e[s.uL](t)}),(function(){i[s.uL](t)}))},update:function(t,n){var i=n||{reason:0};return r(e,t,(function(e){e[s.uL](i)}),(function(){t[s.uL](i)})),!0},pause:function(){r(e,n(),(function(e){e.iterate((function(e){e.pause&&e.pause()}))}),null)},resume:function(){r(e,n(),(function(e){e.iterate((function(e){e.resume&&e.resume()}))}),null)},teardown:function(t,n){var o=n||{reason:0,isAsync:!1};return r(e,t,(function(e){e[s.uL](o)}),(function(){t[s.uL](o),i=!1})),!0},getChannel:function(t){var n=null;return e&&e[s.R5]>0&&(0,a.tO)(e,(function(e){if(e&&e.queue[s.R5]>0&&((0,a.tO)(e.queue,(function(e){if(e[s.pZ]===t)return n=e,-1})),n))return-1})),n},flush:function(t,i,o,a){var c=1,l=!1,u=null;function d(){c--,l&&0===c&&(u&&(clearTimeout(u),u=null),i&&i(l),i=null)}return a=a||5e3,r(e,n(),(function(e){e.iterate((function(e){if(e[s.kL]){c++;var n=!1;e[s.kL](t,(function(){n=!0,d()}),o)||n||(t&&null==u?u=setTimeout((function(){u=null,d()}),a):d())}}))}),(function(){l=!0,d()})),!0},_setQueue:function(t){e=t}};return o}(q,e);o[s.MW](k),N[s.MW](k),e[s.iC]=(0,u.AA)(o),k[s.VL](t,e,o);var f=$();(0,u.bP)(f,o),e[s.iC]=(0,a.FL)((0,u.AA)(N||[])).slice(),n&&function(t){var n=(0,l.xy)(J(),e);n[s.Fc](i),e._updateHook&&!0===e._updateHook(n,t)||n[s.uL](t)}(n)}function Q(t){var n,r=null,i=null;return(0,a.tO)(e[s.iC],(function(e){if(e[s.pZ]===t&&e!==k&&e!==L)return i=e,-1})),!i&&k&&(i=k.getChannel(t)),i&&((n={plugin:i})[s.$h]=function(e){(0,u.OY)(i)[c.mE]=!e},n.isEnabled=function(){var e=(0,u.OY)(i);return!e[s.fi]&&!e[c.mE]},n.remove=function(e,t){var n;void 0===e&&(e=!0);var r=[i],o=((n={reason:1})[s.d]=e,n);X(r,o,(function(e){e&&K({reason:32,removed:r}),t&&t(e)}))},r=n),r}function J(){if(!D){var n=(N||[]).slice();-1===(0,a.UA)(n,L)&&n[s.MW](L),D=(0,l.jV)((0,u.AA)(n),t,e)}return D}function X(n,r,o){if(n&&n[s.R5]>0){var c=(0,l.jV)(n,t,e),u=(0,l.Bt)(c,e);u[s.Fc]((function(){var e=!1,t=[];(0,a.tO)(A,(function(r,i){x(r,n)?e=!0:t[s.MW](r)})),A=t;var r=[];j&&((0,a.tO)(j,(function(t,i){var o=[];(0,a.tO)(t,(function(t){x(t,n)?e=!0:o[s.MW](t)})),r[s.MW](o)})),j=r),o&&o(e),i()})),u[s.uL](r)}else o(!1)}function Y(){if(e[s.eZ]&&e[s.eZ].queue){var n=e[s.eZ].queue.slice(0);e[s.eZ].queue[s.R5]=0,(0,a.tO)(n,(function(n){var r,i=((r={})[s.I]=F||"InternalMessageId: "+n[s.Gc],r.iKey=(0,a.v4)(t[s.p$]),r.time=(0,a.Y6)(new Date),r.baseType=g.lQ.dataType,r.baseData={message:n[s.gU]},r);e.track(i)}))}}function Z(e,t,n,r){return k?k[s.kL](e,t,n||6,r):(t&&t(!1),!0)}function ee(t){var n=e[s.eZ];n?((0,g.kP)(n,2,73,t),i()):(0,a._y)(t)}W(),e[s.yl]=function(){return n},e[s.VL]=function(i,o,l,u){var d,p;M&&(0,a._y)(E),e[s.yl]()&&(0,a._y)("Core should not be initialized more than once"),t=i||{},e[s.TC]=t,(0,a.le)(i[s.p$])&&(0,a._y)("Please provide instrumentation key"),b=u,e[_]=u,!0===(p=(0,a.v4)(t.disableDbgExt))&&z&&(b[s.n7](z),z=null),b&&!z&&!0!==p&&(z=(0,m.p)(t),b[s.g](z)),!(d=(0,a.v4)(t.enablePerfMgr))&&O&&(O=null),d&&(0,a.qK)(t,c.DN,R),(0,a.qK)(t,c.Zh,{}).NotificationManager=b,l&&(e[s.eZ]=l);var h=(0,a.qK)(t,c.js,[]);(A=[])[s.MW].apply(A,(0,r.$h)((0,r.$h)([],o,!1),h,!1)),j=(0,a.qK)(t,c.Z,[]),K(null),q&&0!==q[s.R5]||(0,a._y)("No "+c.Z+" available"),n=!0,e.releaseQueue()},e.getTransmissionControls=function(){var e=[];return q&&(0,a.tO)(q,(function(t){e[s.MW](t.queue)})),(0,a.FL)(e)},e.track=function(n){n.iKey=n.iKey||t[s.p$],n[s.Z_]=n[s.Z_]||(0,a.Y6)(new Date),n.ver=n.ver||"4.0",!M&&e[s.yl]()?$()[s.uL](n):v[s.MW](n)},e[s.SD]=$,e[s.tb]=function(){var t;return b||(b=(0,o.pu)(((t={})[s.g]=function(e){},t[s.n7]=function(e){},t[c.uC]=function(e){},t[c.$F]=function(e,t){},t[c.f_]=function(e,t){},t)),e[_]=b),b},e[s.g]=function(e){b&&b[s.g](e)},e[s.n7]=function(e){b&&b[s.n7](e)},e.getCookieMgr=function(){return P||(P=(0,h.Nz)(t,e[s.eZ])),P},e.setCookieMgr=function(e){P=e},e[c.kl]=function(){if(!I&&!O&&(0,a.v4)(t.enablePerfMgr)){var n=(0,a.v4)(t[c.DN]);(0,a.mf)(n)&&(O=n(e,e[s.tb]()))}return I||O||(0,y.j5)()},e.setPerfMgr=function(e){I=e},e.eventCnt=function(){return v[s.R5]},e.releaseQueue=function(){if(n&&v[s.R5]>0){var e=v;v=[],(0,a.tO)(e,(function(e){$()[s.uL](e)}))}},e.pollInternalLogs=function(e){return F=e||null,V=!1,G&&(clearInterval(G),G=null),i(!0)},e[s.LS]=function(){V=!0,G&&(clearInterval(G),G=0,Y())},(0,a.Vb)(e,(function(){return L}),["addTelemetryInitializer"]),e.unload=function(t,r,i){var o;void 0===t&&(t=!0),n||(0,a._y)("SDK is not initialized"),M&&(0,a._y)(E);var c=((o={reason:50})[s.d]=t,o.flushComplete=!1,o),u=(0,l.Bt)(J(),e);function d(t){c.flushComplete=t,M=!0,B.run(u,c),e[s.LS](),u[s.uL](c)}u[s.Fc]((function(){W(),r&&r(c)}),e),Y(),Z(t,d,6,i)||d(!1)},e[s.TO]=Q,e.addPlugin=function(e,t,n,r){if(!e)return r&&r(!1),void ee(T);var i=Q(e[s.pZ]);if(i&&!t)return r&&r(!1),void ee("Plugin ["+e[s.pZ]+"] is already loaded!");var o={reason:16};function a(t){A[s.MW](e),o.added=[e],K(o),r&&r(!0)}if(i){var c=[i.plugin];X(c,{reason:2,isAsync:!!n},(function(e){e?(o.removed=c,o.reason|=32,a()):r&&r(!1)}))}else a()},e.evtNamespace=function(){return U},e[s.kL]=Z,e.getTraceCtx=function(e){return H||(H=(0,u.Yn)()),H},e.setTraceCtx=function(e){H=e||null},(0,a.Oi)(e,"addUnloadCb",(function(){return B}),"add")}))}return e.__ieDyn=1,e}()},1549:(e,t,n)=>{"use strict";n.d(t,{i:()=>u});var r=n(9798),i=n(6474),o=n(3161),s=n(9556),a=n(877),c=n(6930),l="getPlugin",u=function(){function e(){var t,n,u,d,p,h=this;function f(e){void 0===e&&(e=null);var t=e;if(!t){var r=n||(0,a.CD)(null,{},h[s.oV]);t=u&&u[l]?r[i.zV](null,u[l]):r[i.zV](null,u)}return t}function m(e,t,r){e&&(0,o.sO)(e,s.Zh,[],null,o.le),!r&&t&&(r=t[i.SD]()[i.W2]());var c=u;u&&u[l]&&(c=u[l]()),h[s.oV]=t,n=(0,a.CD)(r,e,t,c)}function g(){t=!1,h[s.oV]=null,n=null,u=null,p=[],d=(0,c.Y)()}g(),(0,r.Z)(e,h,(function(e){e[i.VL]=function(e,n,r,i){m(e,n,i),t=!0},e[i.fi]=function(t,n){var r,c=e[s.oV];if(c&&(!t||c===t[s.oV]())){var h,f=!1,m=t||(0,a.Bt)(null,c,u&&u[l]?u[l]():u),y=n||((r={reason:0})[i.d]=!1,r);return e[i.F3]&&!0===e[i.F3](m,y,v)?h=!0:v(),h}function v(){if(!f){f=!0,d.run(m,n);var e=p;p=[],(0,o.tO)(e,(function(e){e.rm()})),!0===h&&m[i.uL](y),g()}}},e[i.Tu]=function(t,n){var r=e[s.oV];if(r&&(!t||r===t[s.oV]())){var o,c=!1,d=t||(0,a.xy)(null,r,u&&u[l]?u[l]():u),p=n||{reason:0};return e._doUpdate&&!0===e._doUpdate(d,p,h)?o=!0:h(),o}function h(){c||(c=!0,m(d.getCfg(),d.core(),d[i.W2]()))}},e._addHook=function(e){e&&((0,o.kJ)(e)?p=p.concat(e):p[i.MW](e))},(0,o.Oi)(e,"_addUnloadCb",(function(){return d}),"add")})),h[i.mc]=function(e){return f(e)[i.mc]()},h[i.yl]=function(){return t},h.setInitialized=function(e){t=e},h[i.Jd]=function(e){u=e},h[i.uL]=function(e,t){t?t[i.uL](e):u&&(0,o.mf)(u[s.hL])&&u[s.hL](e,null)},h._getTelCtx=f}return e.__ieDyn=1,e}()},8589:(e,t,n)=>{"use strict";n.d(t,{JP:()=>C,Nz:()=>R,UY:()=>N,kj:()=>T,p7:()=>x});var r=n(6474),i=n(547),o=n(1167),s=n(3161),a=n(9556),c="toGMTString",l="toUTCString",u="cookie",d="expires",p="enabled",h="isCookieUseDisabled",f="disableCookiesUsage",m="_ckMgr",g=null,y=null,v=null,b=(0,o.Me)(),S={},w={};function T(e,t){var n=R[m]||w[m];return n||(n=R[m]=R(e,t),w[m]=n),n}function _(e){return!e||e.isEnabled()}function E(e,t){return!!(t&&e&&(0,s.kJ)(e.ignoreCookies))&&-1!==e.ignoreCookies[r.ou](t)}function C(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var i=t[r.Lk];n=i[m]?i[m]:R(t)}return n||(n=T(t,(e||{})[r.eZ])),n}function R(e,t){var n,i=function(e){var t=e[r.Lk]=e[r.Lk]||{};if((0,s.sO)(t,"domain",e.cookieDomain,s.BX,s.le),(0,s.sO)(t,"path",e.cookiePath||"/",null,s.le),(0,s.le)(t[p])){var n=void 0;(0,s.o8)(e[h])||(n=!e[h]),(0,s.o8)(e[f])||(n=!e[f]),t[p]=n}return t}(e||w),u=i.path||"/",g=i.domain,v=!1!==i[p],b=((n={isEnabled:function(){var e=v&&x(t),n=w[m];return e&&n&&b!==n&&(e=_(n)),e}})[r.$h]=function(e){v=!1!==e},n.set=function(e,t,n,p,h){var f=!1;if(_(b)&&!function(e,t){return!!(t&&e&&(0,s.kJ)(e.blockedCookies)&&-1!==e.blockedCookies[r.ou](t))||E(e,t)}(i,e)){var m={},v=(0,s.nd)(t||a.qS),S=v[r.ou](";");if(-1!==S&&(v=(0,s.nd)(t[r.zc](0,S)),m=I(t[r.zc](S+1))),(0,s.sO)(m,"domain",p||g,s.fQ,s.o8),!(0,s.le)(n)){var w=(0,o.w1)();if((0,s.o8)(m[d])){var T=(0,s.m6)()+1e3*n;if(T>0){var C=new Date;C.setTime(T),(0,s.sO)(m,d,O(C,w?c:l)||O(C,w?c:l)||a.qS,s.fQ)}}w||(0,s.sO)(m,"max-age",a.qS+n,null,s.o8)}var R=(0,o.k$)();R&&"https:"===R.protocol&&((0,s.sO)(m,"secure",null,null,s.o8),null===y&&(y=!N(((0,o.jW)()||{})[r.qV])),y&&(0,s.sO)(m,"SameSite","None",null,s.o8)),(0,s.sO)(m,"path",h||u,null,s.o8),(i.setCookie||A)(e,P(v,m)),f=!0}return f},n.get=function(e){var t=a.qS;return _(b)&&!E(i,e)&&(t=(i.getCookie||D)(e)),t},n.del=function(e,t){var n=!1;return _(b)&&(n=b.purge(e,t)),n},n.purge=function(e,n){var r,s=!1;if(x(t)){var c=((r={}).path=n||"/",r[d]="Thu, 01 Jan 1970 00:00:01 GMT",r);(0,o.w1)()||(c["max-age"]="0"),(i.delCookie||A)(e,P(a.qS,c)),s=!0}return s},n);return b[m]=b,b}function x(e){if(null===g){g=!1;try{g=void 0!==(b||{})[u]}catch(t){(0,i.kP)(e,2,68,"Cannot access document.cookie - "+(0,s.jj)(t),{exception:(0,o.eU)(t)})}}return g}function I(e){var t={};if(e&&e[r.R5]){var n=(0,s.nd)(e)[r.w6](";");(0,s.tO)(n,(function(e){if(e=(0,s.nd)(e||a.qS)){var n=e[r.ou]("=");-1===n?t[e]=null:t[(0,s.nd)(e[r.zc](0,n))]=(0,s.nd)(e[r.zc](n+1))}}))}return t}function O(e,t){return(0,s.mf)(e[t])?e[t]():null}function P(e,t){var n=e||a.qS;return(0,s.rW)(t,(function(e,t){n+="; "+e+((0,s.le)(t)?a.qS:"="+t)})),n}function D(e){var t=a.qS;if(b){var n=b[u]||a.qS;v!==n&&(S=I(n),v=n),t=(0,s.nd)(S[e]||a.qS)}return t}function A(e,t){b&&(b[u]=e+"="+t)}function N(e){return!(!(0,s.HD)(e)||!(0,s._Q)(e,"CPU iPhone OS 12")&&!(0,s._Q)(e,"iPad; CPU OS 12")&&!((0,s._Q)(e,"Macintosh; Intel Mac OS X 10_14")&&(0,s._Q)(e,"Version/")&&(0,s._Q)(e,"Safari"))&&(!(0,s._Q)(e,"Macintosh; Intel Mac OS X 10_14")||!(0,s.Id)(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))&&!(0,s._Q)(e,"Chrome/5")&&!(0,s._Q)(e,"Chrome/6")&&(!(0,s._Q)(e,"UnrealEngine")||(0,s._Q)(e,"Chrome"))&&!(0,s._Q)(e,"UCBrowser/12")&&!(0,s._Q)(e,"UCBrowser/11"))}},821:(e,t,n)=>{"use strict";n.d(t,{DO:()=>y,GW:()=>m,Jj:()=>g,Px:()=>f,Tr:()=>v,d8:()=>E,ej:()=>_,kT:()=>C,oF:()=>w,pP:()=>S,vn:()=>T,zB:()=>b});var r,i=n(2589),o=n(8785),s=n(6474),a=n(8589),c=n(1167),l=n(1318),u=n(3161),d=n(9556),p=n(395),h=null,f=i.jA;function m(){var e=y();return e[s.zc](0,8)+"-"+e[s.zc](8,12)+"-"+e[s.zc](12,16)+"-"+e[s.zc](16,20)+"-"+e[s.zc](20)}function g(){var e=(0,c.r)();return e&&e.now?e.now():(0,u.m6)()}function y(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=d.qS,r=0;r<4;r++)n+=t[15&(e=(0,p._l)())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+(3&(0,p._l)())|0];return n[s.Jn](0,8)+n[s.Jn](9,4)+"4"+n[s.Jn](13,3)+i+n[s.Jn](16,3)+n[s.Jn](19,12)}var v={_canUseCookies:void 0,isTypeof:u.Ym,isUndefined:u.o8,isNullOrUndefined:u.le,hasOwnProperty:u.nr,isFunction:u.mf,isObject:u.Kn,isDate:u.J_,isArray:u.kJ,isError:u.VZ,isString:u.HD,isNumber:u.hj,isBoolean:u.jn,toISOString:u.Y6,arrForEach:u.tO,arrIndexOf:u.UA,arrMap:u.Mr,arrReduce:u.Xz,strTrim:u.nd,objCreate:o.pu,objKeys:u.FY,objDefineAccessors:u.l_,addEventHandler:l.Ib,dateNow:u.m6,isIE:c.w1,disableCookies:w,newGuid:m,perfNow:g,newId:p.pZ,randomValue:p.az,random32:p._l,mwcRandomSeed:p.CN,mwcRandom32:p.F6,generateW3CId:y},b={Attach:l.pZ,AttachEvent:l.pZ,Detach:l.pD,DetachEvent:l.pD};function S(e,t){var n=(0,a.kj)(e,t),i=v._canUseCookies;return null===h&&(h=[],r=i,(0,u.l_)(v,"_canUseCookies",(function(){return r}),(function(e){r=e,(0,u.tO)(h,(function(t){t[s.$h](e)}))}))),-1===(0,u.UA)(h,n)&&h[s.MW](n),(0,u.jn)(i)&&n[s.$h](i),(0,u.jn)(r)&&n[s.$h](r),n}function w(){S()[s.$h](!1)}function T(e){return S(null,e).isEnabled()}function _(e,t){return S(null,e).get(t)}function E(e,t,n,r){S(null,e).set(t,n,null,r)}function C(e,t){return S(null,e).del(t)}},8530:(e,t,n)=>{"use strict";n.d(t,{J:()=>h,K:()=>f});var r=n(2589),i=n(6474),o=n(3161),s=n(9556),a=n(395),c=r.RJ,l="2.8.15",u="."+(0,a.pZ)(6),d=0;function p(e){return 1===e[i.xv]||9===e[i.xv]||!+e[i.xv]}function h(e,t){return void 0===t&&(t=!1),(0,o.Gf)(e+d+++(t?"."+l:s.qS)+u)}function f(e){var t={id:h("_aiData-"+(e||s.qS)+"."+l),accept:function(e){return p(e)},get:function(e,n,r,i){var s=e[t.id];return s?s[(0,o.Gf)(n)]:(i&&((s=function(e,t){var n=t[e.id];if(!n){n={};try{p(t)&&(function(e,t,n){if(c)try{return c(e,t,{value:n,enumerable:!1,configurable:!0}),!0}catch(e){}return!1}(t,e.id,n)||(t[e.id]=n))}catch(e){}}return n}(t,e))[(0,o.Gf)(n)]=r),r)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch(e){}}};return t}},7485:(e,t,n)=>{"use strict";n.d(t,{j:()=>l,p:()=>u});var r,i=n(6474),o=n(1167),s=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],a=null;function c(e,t){return function(){var n=arguments,r=l(t);if(r){var o=r.listener;o&&o[e]&&o[e][i.ZV](o,n)}}}function l(e){var t,n=a;return n||!0===e.disableDbgExt||(n=a||((t=(0,o.a8)("Microsoft"))&&(a=t.ApplicationInsights),a)),n?n.ChromeDbgExt:null}function u(e){if(!r){r={};for(var t=0;t<s[i.R5];t++)r[s[t]]=c(s[t],e)}return r}},547:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>h,L4:()=>y,jV:()=>g,kP:()=>m,lQ:()=>d,vH:()=>p});var r=n(9798),i=n(6474),o=n(7485),s=n(1167),a=n(3161),c=n(9556);function l(e){return e?'"'+e[i.i7](/\"/g,c.qS)+'"':c.qS}function u(e,t){var n=(0,s.dr)();if(n){var r="log";n[e]&&(r=e),(0,a.mf)(n[r])&&n[r](t)}}var d=function(){function e(e,t,n,r){void 0===n&&(n=!1);var o=this;o[i.Gc]=e,o[i.gU]=(n?"AI: ":"AI (Internal): ")+e;var a=c.qS;(0,s.nS)()&&(a=(0,s.xA)().stringify(r));var u=(t?" message:"+l(t):c.qS)+(r?" props:"+l(a):c.qS);o[i.gU]+=u}return e.dataType="MessageData",e}();function p(e,t){return(e||{})[i.eZ]||new h(t)}var h=function(){function e(t){this.identifier="DiagnosticLogger",this.queue=[];var n,l,p,h,f=0,m={};(0,r.Z)(e,this,(function(e){function r(t,n){if(!(f>=p)){var r=!0,o="AITR_"+n[i.Gc];if(m[o]?r=!1:m[o]=!0,r&&(t<=l&&(e.queue[i.MW](n),f++,g(1===t?"error":"warn",n)),f===p)){var s="Internal events throttle limit per PageView reached for this app.",a=new d(23,s,!1);e.queue[i.MW](a),1===t?e[c.ys](s):e[c.cL](s)}}}function g(e,n){var r=(0,o.j)(t||{});r&&r[i.mc]&&r[i.mc](e,n)}!function(e){n=(0,a.v4)(e.loggingLevelConsole,0),l=(0,a.v4)(e.loggingLevelTelemetry,1),p=(0,a.v4)(e.maxMessageLimit,25),h=(0,a.v4)(e.enableDebug,(0,a.v4)(e[i.Fr],!1))}(t||{}),e.consoleLoggingLevel=function(){return n},e.telemetryLoggingLevel=function(){return l},e.maxInternalMessageLimit=function(){return p},e[i.Fr]=function(){return h},e.throwInternal=function(t,o,l,u,p){void 0===p&&(p=!1);var f=new d(o,l,p,u);if(h)throw(0,s.eU)(f);var y=1===t?c.ys:c.cL;if((0,a.o8)(f[i.gU]))g("throw"+(1===t?"Critical":"Warning"),f);else{if(p){var v=+f[i.Gc];!m[v]&&n>=t&&(e[y](f[i.gU]),m[v]=!0)}else n>=t&&e[y](f[i.gU]);r(t,f)}},e[c.cL]=function(e){u("warn",e),g("warning",e)},e[c.ys]=function(e){u("error",e),g("error",e)},e.resetInternalMessageCount=function(){f=0,m={}},e[i.jk]=r}))}return e.__ieDyn=1,e}();function f(e){return e||new h}function m(e,t,n,r,i,o){void 0===o&&(o=!1),f(e).throwInternal(t,n,r,i,o)}function g(e,t){f(e)[c.cL](t)}function y(e,t,n){f(e)[i.jk](t,n)}},1167:(e,t,n)=>{"use strict";n.d(t,{G6:()=>J,JO:()=>Y,Jj:()=>A,Kf:()=>se,MF:()=>X,MX:()=>G,Me:()=>k,Nd:()=>oe,Nu:()=>ie,Nv:()=>N,Ym:()=>D,Z3:()=>ee,a8:()=>P,b$:()=>W,cp:()=>Z,d6:()=>j,dI:()=>O,dr:()=>U,eU:()=>Q,ed:()=>ne,fE:()=>M,gz:()=>V,jW:()=>q,k$:()=>F,nS:()=>z,pI:()=>re,r:()=>B,s1:()=>L,sA:()=>K,w1:()=>$,xA:()=>H});var r=n(2589),i=n(8785),o=n(6474),s=n(3161),a=n(9556),c="window",l="document",u="documentMode",d="navigator",p="history",h="location",f="console",m="performance",g="JSON",y="crypto",v="msCrypto",b="ReactNative",S="msie",w="trident/",T="XMLHttpRequest",_=null,E=null,C=!1,R=null,x=null;function I(e,t){var n=!1;if(e){try{if(!(n=t in e)){var i=e[r.hB];i&&(n=t in i)}}catch(e){}if(!n)try{var o=new e;n=!(0,s.o8)(o[t])}catch(e){}}return n}function O(e){C=e}function P(e){var t=(0,i.Rd)();return t&&t[e]?t[e]:e===c&&D()?window:null}function D(){return Boolean(typeof window===r.fK&&window)}function A(){return D()?window:P(c)}function N(){return Boolean(typeof document===r.fK&&document)}function k(){return N()?document:P(l)}function j(){return Boolean(typeof navigator===r.fK&&navigator)}function q(){return j()?navigator:P(d)}function M(){return Boolean(typeof history===r.fK&&history)}function L(){return M()?history:P(p)}function F(e){if(e&&C){var t=P("__mockLocation");if(t)return t}return typeof location===r.fK&&location?location:P(h)}function U(){return typeof console!==r.jA?console:P(f)}function B(){return P(m)}function z(){return Boolean(typeof JSON===r.fK&&JSON||null!==P(g))}function H(){return z()?JSON||P(g):null}function G(){return P(y)}function V(){return P(v)}function W(){var e=q();return!(!e||!e.product)&&e.product===b}function $(){var e=q();if(e&&(e[o.qV]!==E||null===_)){var t=((E=e[o.qV])||a.qS)[o.T1]();_=(0,s._Q)(t,S)||(0,s._Q)(t,w)}return _}function K(e){if(void 0===e&&(e=null),!e){var t=q()||{};e=t?(t[o.qV]||a.qS)[o.T1]():a.qS}var n=(e||a.qS)[o.T1]();if((0,s._Q)(n,S)){var r=k()||{};return Math.max(parseInt(n[o.w6](S)[1]),r[u]||0)}if((0,s._Q)(n,w)){var i=parseInt(n[o.w6](w)[1]);if(i)return i+4}return null}function Q(e){var t=Object[r.hB].toString[o._S](e),n=a.qS;return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e[o.I]+"'":z()&&(n=H().stringify(e)),t+n}function J(e){if(!e||!(0,s.HD)(e)){var t=q()||{};e=t?(t[o.qV]||a.qS)[o.T1]():a.qS}return(e||a.qS)[o.T1]()[o.ou]("safari")>=0}function X(){return null===x&&(x=j()&&Boolean(q().sendBeacon)),x}function Y(e){var t=!1;try{t=!!P("fetch");var n=P("Request");t&&e&&n&&(t=I(n,"keepalive"))}catch(e){}return t}function Z(){return null===R&&(R=typeof XDomainRequest!==r.jA)&&ee()&&(R=R&&!I(P(T),"withCredentials")),R}function ee(){var e=!1;try{e=!!P(T)}catch(e){}return e}function te(e,t){if(e)for(var n=0;n<e[o.R5];n++){var r=e[n];if(r[o.I]&&r[o.I]===t)return r}return{}}function ne(e){var t=k();return t&&e?te(t.querySelectorAll("meta"),e).content:null}function re(e){var t,n=B();if(n){var r=n.getEntriesByType("navigation")||[];t=te((r[o.R5]>0?r[0]:{}).serverTiming,e).description}return t}function ie(e,t){return!!(e&&e.dispatchEvent&&t)&&(e.dispatchEvent(t),!0)}function oe(e,t){var n=null,r={detail:t||null};if((0,s.mf)(CustomEvent))n=new CustomEvent(e,r);else{var i=k();i&&i.createEvent&&(n=i.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,r)}return n}function se(e,t,n){var r=(0,i.Rd)();if(r&&r.CustomEvent)try{return ie(r,oe(e,{cfg:t||null,customDetails:n||null}))}catch(e){}return!1}},1318:(e,t,n)=>{"use strict";n.d(t,{C1:()=>L,C9:()=>V,Ib:()=>M,JA:()=>H,QY:()=>k,TJ:()=>G,XO:()=>N,Yl:()=>$,c9:()=>z,jU:()=>A,nD:()=>W,nJ:()=>B,pD:()=>q,pZ:()=>j,um:()=>I,yw:()=>U});var r=n(6474),i=n(8530),o=n(1167),s=n(3161),a=n(9556),c="on",l="attachEvent",u="addEventListener",d="detachEvent",p="removeEventListener",h="events",f="visibilitychange",m="pagehide",g="pageshow",y="unload",v="beforeunload",b=(0,i.J)("aiEvtPageHide"),S=(0,i.J)("aiEvtPageShow"),w=/\.[\.]+/g,T=/[\.]+$/,_=1,E=(0,i.K)("events"),C=/^([^.]*)(?:\.(.+)|)/;function R(e){return e&&e[r.i7]?e[r.i7](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,a.qS):e}function x(e,t){var n;if(t){var i=a.qS;(0,s.kJ)(t)?(i=a.qS,(0,s.tO)(t,(function(e){(e=R(e))&&("."!==e[0]&&(e="."+e),i+=e)}))):i=R(t),i&&("."!==i[0]&&(i="."+i),e=(e||a.qS)+i)}var o=C.exec(e||a.qS)||[];return(n={})[r.P6]=o[1],n.ns=(o[2]||a.qS).replace(w,".").replace(T,a.qS)[r.w6](".").sort().join("."),n}function I(e,t,n){var i=[],o=E.get(e,h,{},!1),c=x(t,n);return(0,s.rW)(o,(function(e,t){(0,s.tO)(t,(function(e){var t;c[r.P6]&&c[r.P6]!==e.evtName[r.P6]||c.ns&&c.ns!=c.ns||i[r.MW](((t={})[r.I]=e.evtName[r.P6]+(e.evtName.ns?"."+e.evtName.ns:a.qS),t.handler=e[r.Kn],t))}))})),i}function O(e,t,n){void 0===n&&(n=!0);var r=E.get(e,h,{},n),i=r[t];return i||(i=r[t]=[]),i}function P(e,t,n,i){e&&t&&t[r.P6]&&(e[p]?e[p](t[r.P6],n,i):e[d]&&e[d](c+t[r.P6],n))}function D(e,t,n,i){for(var o=t[r.R5];o--;){var s=t[o];s&&(n.ns&&n.ns!==s.evtName.ns||i&&!i(s)||(P(e,s.evtName,s[r.Kn],s.capture),t[r.cb](o,1)))}}function A(e,t){return t?x("xx",(0,s.kJ)(t)?[e].concat(t):[e,t]).ns[r.w6]("."):e}function N(e,t,n,i,o){var s;void 0===o&&(o=!1);var a=!1;if(e)try{var d=x(t,i);if(a=function(e,t,n,i){var o=!1;return e&&t&&t[r.P6]&&n&&(e[u]?(e[u](t[r.P6],n,i),o=!0):e[l]&&(e[l](c+t[r.P6],n),o=!0)),o}(e,d,n,o),a&&E.accept(e)){var p=((s={guid:_++,evtName:d})[r.Kn]=n,s.capture=o,s);O(e,d.type)[r.MW](p)}}catch(e){}return a}function k(e,t,n,i,o){if(void 0===o&&(o=!1),e)try{var a=x(t,i),c=!1;!function(e,t,n){if(t[r.P6])D(e,O(e,t[r.P6]),t,n);else{var i=E.get(e,h,{});(0,s.rW)(i,(function(r,i){D(e,i,t,n)})),0===(0,s.FY)(i)[r.R5]&&E.kill(e,h)}}(e,a,(function(e){return!((!a.ns||n)&&e[r.Kn]!==n||(c=!0,0))})),c||P(e,a,n,o)}catch(e){}}function j(e,t,n,r){return void 0===r&&(r=!1),N(e,t,n,null,r)}function q(e,t,n,r){void 0===r&&(r=!1),k(e,t,n,null,r)}function M(e,t,n){var r=!1,i=(0,o.Jj)();i&&(r=N(i,e,t,n),r=N(i.body,e,t,n)||r);var s=(0,o.Me)();return s&&(r=N(s,e,t,n)||r),r}function L(e,t,n){var r=(0,o.Jj)();r&&(k(r,e,t,n),k(r.body,e,t,n));var i=(0,o.Me)();i&&k(i,e,t,n)}function F(e,t,n,i){var o=!1;return t&&e&&e[r.R5]>0&&(0,s.tO)(e,(function(e){e&&(n&&-1!==(0,s.UA)(n,e)||(o=M(e,t,i)||o))})),o}function U(e,t,n,i){var o=!1;return t&&e&&(0,s.kJ)(e)&&!(o=F(e,t,n,i))&&n&&n[r.R5]>0&&(o=F(e,t,null,i)),o}function B(e,t,n){e&&(0,s.kJ)(e)&&(0,s.tO)(e,(function(e){e&&L(e,t,n)}))}function z(e,t,n){return U([v,y,m],e,t,n)}function H(e,t){B([v,y,m],e,t)}function G(e,t,n){var r=A(b,n),i=F([m],e,t,r);return t&&-1!==(0,s.UA)(t,f)||(i=F([f],(function(t){var n=(0,o.Me)();e&&n&&"hidden"===n.visibilityState&&e(t)}),t,r)||i),!i&&t&&(i=G(e,null,n)),i}function V(e,t){var n=A(b,t);B([m],e,n),B([f],null,n)}function W(e,t,n){var r=A(S,n),i=F([g],e,t,r);return!(i=F([f],(function(t){var n=(0,o.Me)();e&&n&&"visible"===n.visibilityState&&e(t)}),t,r)||i)&&t&&(i=W(e,null,n)),i}function $(e,t){var n=A(S,t);B([g],e,n),B([f],null,n)}},3161:(e,t,n)=>{"use strict";n.d(t,{Ax:()=>Pe,BX:()=>U,F:()=>Te,FL:()=>me,FY:()=>de,Gf:()=>G,HD:()=>Y,Hb:()=>k,Id:()=>W,J_:()=>Q,Kn:()=>z,Mr:()=>se,Mu:()=>j,Oi:()=>xe,PO:()=>ne,UA:()=>oe,VZ:()=>X,Vb:()=>Ie,Xi:()=>ge,Xz:()=>ae,Y6:()=>re,Ym:()=>q,_A:()=>fe,_Q:()=>K,_y:()=>Ee,cf:()=>Re,fQ:()=>_e,hj:()=>Z,hl:()=>Oe,jj:()=>ve,jn:()=>ee,kJ:()=>J,l_:()=>pe,le:()=>F,m6:()=>ye,mf:()=>H,mm:()=>De,nd:()=>ce,nr:()=>B,o8:()=>M,pT:()=>L,qK:()=>Se,rW:()=>V,sO:()=>be,tO:()=>ie,v4:()=>we,xe:()=>$,yk:()=>te});var r=n(2589),i=n(8785),o=n(6474),s=n(9556),a="toISOString",c="endsWith",l="startsWith",u="indexOf",d="map",p="reduce",h="trim",f="toString",m="__proto__",g="constructor",y=r.RJ,v=r.Pw.freeze,b=r.Pw.seal,S=r.Pw.keys,w=String[r.hB],T=w[h],_=w[c],E=w[l],C=Date[r.hB][a],R=Array.isArray,x=r.V4[f],I=r.CY[f],O=I[o._S](r.Pw),P=/-([a-z])/g,D=/([^\w\d_$])/g,A=/^(\d+[\w\d_$])/,N=Object.getPrototypeOf;function k(e){if(e){if(N)return N(e);var t=e[m]||e[r.hB]||e[g];if(t)return t}return null}function j(e){return x[o._S](e)}function q(e,t){return typeof e===t}function M(e){return void 0===e||typeof e===r.jA}function L(e){return!M(e)}function F(e){return null===e||M(e)}function U(e){return!F(e)}function B(e,t){return!(!e||!r.CY[o._S](e,t))}function z(e){return!(!e||typeof e!==r.fK)}function H(e){return!(!e||typeof e!==r.cb)}function G(e){var t=e;return t&&Y(t)&&(t=(t=(t=t[o.i7](P,(function(e,t){return t.toUpperCase()})))[o.i7](D,"_"))[o.i7](A,(function(e,t){return"_"+t}))),t}function V(e,t){if(e)for(var n in e)r.CY[o._S](e,n)&&t[o._S](e,n,e[n])}function W(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=_?e[c](t):function(e,t){var n=!1,r=t?t[o.R5]:0,i=e?e[o.R5]:0;if(r&&i&&i>=r&&!(n=e===t)){for(var s=i-1,a=r-1;a>=0;a--){if(e[s]!=t[a])return!1;s--}n=!0}return n}(e,t)),n}function $(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=E?e[l](t):function(e,t){var n=!1,r=t?t[o.R5]:0;if(e&&r&&e[o.R5]>=r&&!(n=e===t)){for(var i=0;i<r;i++)if(e[i]!==t[i])return!1;n=!0}return n}(e,t)),n}function K(e,t){return!(!e||!t)&&-1!==e[o.ou](t)}function Q(e){return!(!e||"[object Date]"!==x[o._S](e))}var J=R||function(e){return!(!e||"[object Array]"!==x[o._S](e))};function X(e){return!(!e||"[object Error]"!==x[o._S](e))}function Y(e){return"string"==typeof e}function Z(e){return"number"==typeof e}function ee(e){return"boolean"==typeof e}function te(e){return"symbol"==typeof e}function ne(e){var t=!1;if(e&&"object"==typeof e){var n=N?N(e):k(e);n?(n[g]&&r.CY[o._S](n,g)&&(n=n[g]),t=typeof n===r.cb&&I[o._S](n)===O):t=!0}return t}function re(e){if(e)return C?e[a]():function(e){if(e&&e.getUTCFullYear){var t=function(e){var t=String(e);return 1===t[o.R5]&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(e)}function ie(e,t,n){var r=e[o.R5];try{for(var i=0;i<r&&(!(i in e)||-1!==t[o._S](n||e,e[i],i,e));i++);}catch(e){}}function oe(e,t,n){if(e){if(e[u])return e[u](t,n);var r=e[o.R5],i=n||0;try{for(var s=Math.max(i>=0?i:r-Math.abs(i),0);s<r;s++)if(s in e&&e[s]===t)return s}catch(e){}}return-1}function se(e,t,n){var r;if(e){if(e[d])return e[d](t,n);var i=e[o.R5],s=n||e;r=new Array(i);try{for(var a=0;a<i;a++)a in e&&(r[a]=t[o._S](s,e[a],e))}catch(e){}}return r}function ae(e,t,n){var r;if(e){if(e[p])return e[p](t,n);var i=e[o.R5],s=0;if(arguments[o.R5]>=3)r=arguments[2];else{for(;s<i&&!(s in e);)s++;r=e[s++]}for(;s<i;)s in e&&(r=t(r,e[s],s,e)),s++}return r}function ce(e){return e&&(e=T&&e[h]?e[h]():e[o.i7]?e[o.i7](/^\s+|(?=\s)\s+$/g,s.qS):e),e}var le=!{toString:null}.propertyIsEnumerable("toString"),ue=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function de(e){var t=typeof e;if(t===r.cb||t===r.fK&&null!==e||(0,i.ZU)("objKeys called on non-object"),!le&&S)return S(e);var n=[];for(var s in e)e&&r.CY[o._S](e,s)&&n[o.MW](s);if(le)for(var a=ue[o.R5],c=0;c<a;c++)e&&r.CY[o._S](e,ue[c])&&n[o.MW](ue[c]);return n}function pe(e,t,n,r){if(y)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),y(e,t,i),!0}catch(e){}return!1}function he(e){return e}function fe(e){return v&&V(e,(function(e,t){(J(t)||z(t))&&v(t)})),me(e)}var me=v||he,ge=b||he;function ye(){var e=Date;return e.now?e.now():(new e).getTime()}function ve(e){return X(e)?e[o.I]:s.qS}function be(e,t,n,r,i){var o=n;return e&&((o=e[t])===n||i&&!i(o)||r&&!r(n)||(o=n,e[t]=o)),o}function Se(e,t,n){var r;return e?!(r=e[t])&&F(r)&&(r=M(n)?{}:n,e[t]=r):r=M(n)?{}:n,r}function we(e,t){return F(e)?t:e}function Te(e){return!e}function _e(e){return!!e}function Ee(e){throw new Error(e)}function Ce(e,t){var n=null,r=null;return H(e)?n=e:r=e,function(){var e=arguments;if(n&&(r=n()),r)return r[t][o.ZV](r,e)}}function Re(e,t,n){if(e&&t&&z(e)&&z(t)){var r=function(r){if(Y(r)){var i=t[r];H(i)?n&&!n(r,!0,t,e)||(e[r]=Ce(t,r)):n&&!n(r,!1,t,e)||(B(e,r)&&delete e[r],pe(e,r,(function(){return t[r]}),(function(e){t[r]=e}))||(e[r]=i))}};for(var i in t)r(i)}return e}function xe(e,t,n,r,i){e&&t&&n&&(!1!==i||M(e[t]))&&(e[t]=Ce(n,r))}function Ie(e,t,n,r){return e&&t&&z(e)&&J(n)&&ie(n,(function(n){Y(n)&&xe(e,n,t,n,r)})),e}function Oe(e){return function(){var t=this;e&&V(e,(function(e,n){t[e]=n}))}}function Pe(e){return e&&r.rl&&(e=(0,r.Pw)((0,r.rl)({},e))),e}function De(e,t,n,i,s,a){var c=arguments,l=c[0]||{},u=c[o.R5],d=!1,p=1;for(u>0&&ee(l)&&(d=l,l=c[p]||{},p++),z(l)||(l={});p<u;p++){var h=c[p],f=J(h),m=z(h);for(var g in h)if(f&&g in h||m&&r.CY[o._S](h,g)){var y=h[g],v=void 0;if(d&&y&&((v=J(y))||ne(y))){var b=l[g];v?J(b)||(b=[]):ne(b)||(b={}),y=De(d,b,y)}void 0!==y&&(l[g]=y)}}return l}},9556:(e,t,n)=>{"use strict";n.d(t,{$F:()=>h,C$:()=>m,DN:()=>s,Z:()=>i,Zh:()=>c,cL:()=>y,f_:()=>f,hL:()=>u,js:()=>l,kl:()=>v,mE:()=>a,oV:()=>o,qS:()=>r,uC:()=>p,yi:()=>d,ys:()=>g});var r="",i="channels",o="core",s="createPerfMgr",a="disabled",c="extensionConfig",l="extensions",u="processTelemetry",d="priority",p="eventsSent",h="eventsDiscarded",f="eventsSendRequest",m="perfEvent",g="errorToConsole",y="warnToConsole",v="getPerfMgr"},6329:(e,t,n)=>{"use strict";n.d(t,{f:()=>c});var r=n(9798),i=n(6474),o=n(3161),s=n(9556);function a(e,t,n,r){(0,o.tO)(e,(function(e){if(e&&e[t])if(n)setTimeout((function(){return r(e)}),0);else try{r(e)}catch(e){}}))}var c=function(){function e(t){this.listeners=[];var n=!!(t||{}).perfEvtsSendAll;(0,r.Z)(e,this,(function(e){e[i.g]=function(t){e.listeners[i.MW](t)},e[i.n7]=function(t){for(var n=(0,o.UA)(e[i.dE],t);n>-1;)e.listeners[i.cb](n,1),n=(0,o.UA)(e[i.dE],t)},e[s.uC]=function(t){a(e[i.dE],s.uC,!0,(function(e){e[s.uC](t)}))},e[s.$F]=function(t,n){a(e[i.dE],s.$F,!0,(function(e){e[s.$F](t,n)}))},e[s.f_]=function(t,n){a(e[i.dE],s.f_,n,(function(e){e[s.f_](t,n)}))},e[s.C$]=function(t){t&&(!n&&t[i.PL]()||a(e[i.dE],s.C$,!1,(function(e){t[i.d]?setTimeout((function(){return e[s.C$](t)}),0):e[s.C$](t)})))}}))}return e.__ieDyn=1,e}()},2753:(e,t,n)=>{"use strict";n.d(t,{Jk:()=>p,Lm:()=>f,j5:()=>g,tQ:()=>m,zn:()=>d});var r=n(9798),i=n(6474),o=n(3161),s=n(9556),a="ctx",c="ParentContextKey",l="ChildrenContextKey",u=null,d=function(){function e(t,n,r){var s,u=this,d=!1;u.start=(0,o.m6)(),u[i.I]=t,u[i.d]=r,u[i.PL]=function(){return!1},(0,o.mf)(n)&&(d=(0,o.l_)(u,"payload",(function(){return!s&&(0,o.mf)(n)&&(s=n(),n=null),s}))),u[i.T]=function(t){return t?t===e[c]||t===e[l]?u[t]:(u[a]||{})[t]:null},u[i.wu]=function(t,n){t&&(t===e[c]?(u[t]||(u[i.PL]=function(){return!0}),u[t]=n):t===e[l]?u[t]=n:(u[a]=u[a]||{})[t]=n)},u[i.Km]=function(){var t=0,r=u[i.T](e[l]);if((0,o.kJ)(r))for(var s=0;s<r[i.R5];s++){var a=r[s];a&&(t+=a[i.Z_])}u[i.Z_]=(0,o.m6)()-u.start,u.exTime=u[i.Z_]-t,u[i.Km]=function(){},!d&&(0,o.mf)(n)&&(u.payload=n())}}return e.ParentContextKey="parent",e.ChildrenContextKey="childEvts",e}(),p=function(){function e(t){this.ctx={},(0,r.Z)(e,this,(function(e){e.create=function(e,t,n){return new d(e,t,n)},e.fire=function(e){e&&(e[i.Km](),t&&(0,o.mf)(t[s.C$])&&t[s.C$](e))},e[i.wu]=function(t,n){t&&((e[a]=e[a]||{})[t]=n)},e[i.T]=function(t){return(e[a]||{})[t]}}))}return e.__ieDyn=1,e}(),h="CoreUtils.doPerf";function f(e,t,n,r,o){if(e){var a=e;if(a[s.kl]&&(a=a[s.kl]()),a){var u=void 0,p=a[i.T](h);try{if(u=a.create(t(),r,o)){if(p&&u[i.wu]&&(u[i.wu](d[c],p),p[i.T]&&p[i.wu])){var f=p[i.T](d[l]);f||(f=[],p[i.wu](d[l],f)),f[i.MW](u)}return a[i.wu](h,u),n(u)}}catch(e){u&&u[i.wu]&&u[i.wu]("exception",e)}finally{u&&a.fire(u),a[i.wu](h,p)}}}return n()}function m(e){u=e}function g(){return u}},877:(e,t,n)=>{"use strict";n.d(t,{Bt:()=>g,CD:()=>m,Vi:()=>b,jV:()=>v,xy:()=>y});var r=n(6474),i=n(547),o=n(1167),s=n(3161),a=n(9556),c=n(2753),l=n(3656),u="TelemetryPluginChain",d="_hasRun",p="_getTelCtx",h=0;function f(e,t,n,c){var l=null,u=[];null!==c&&(l=c?function(e,t,n){for(;e;){if(e[r.TO]()===n)return e;e=e[r.W2]()}return v([n],t[r.TC]||{},t)}(e,n,c):e);var d={_next:function(){var e=l;if(l=e?e[r.W2]():null,!e){var t=u;t&&t[r.R5]>0&&((0,s.tO)(t,(function(e){try{e.func[r._S](e.self,e.args)}catch(e){(0,i.kP)(n[r.eZ],2,73,"Unexpected Exception during onComplete - "+(0,o.eU)(e))}})),u=[])}return e},ctx:{core:function(){return n},diagLog:function(){return(0,i.vH)(n,t)},getCfg:function(){return t},getExtCfg:p,getConfig:function(e,n,r){void 0===r&&(r=!1);var i,o=p(e,null);return o&&!(0,s.le)(o[n])?i=o[n]:t&&!(0,s.le)(t[n])&&(i=t[n]),(0,s.le)(i)?r:i},hasNext:function(){return!!l},getNext:function(){return l},setNext:function(e){l=e},iterate:function(e){for(var t;t=d._next();){var n=t[r.TO]();n&&e(n)}},onComplete:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];e&&u[r.MW]({func:e,self:(0,s.o8)(t)?d.ctx:t,args:n})}}};function p(e,n,r){var i;if(void 0===n&&(n={}),void 0===r&&(r=0),t){var o=t[a.Zh];o&&e&&(i=o[e])}if(i){if((0,s.Kn)(n)&&0!==r){var c=(0,s.mm)(!0,n,i);t&&2===r&&(0,s.rW)(n,(function(e){if((0,s.le)(c[e])){var n=t[e];(0,s.le)(n)||(c[e]=n)}})),i=c}}else i=n;return i}return d}function m(e,t,n,i){var o=f(e,t,n,i),c=o.ctx;return c[r.uL]=function(e){var t=o._next();return t&&t[a.hL](e,c),!t},c[r.zV]=function(e,i){return void 0===e&&(e=null),(0,s.kJ)(e)&&(e=v(e,t,n,i)),m(e||c[r.W2](),t,n,i)},c}function g(e,t,n){var i=t[r.TC]||{},o=f(e,i,t,n),a=o.ctx;return a[r.uL]=function(e){var t=o._next();return t&&t.unload(a,e),!t},a[r.zV]=function(e,n){return void 0===e&&(e=null),(0,s.kJ)(e)&&(e=v(e,i,t,n)),g(e||a[r.W2](),t,n)},a}function y(e,t,n){var i=t[r.TC]||{},o=f(e,i,t,n).ctx;return o[r.uL]=function(e){return o.iterate((function(t){(0,s.mf)(t[r.Tu])&&t[r.Tu](o,e)}))},o[r.zV]=function(e,n){return void 0===e&&(e=null),(0,s.kJ)(e)&&(e=v(e,i,t,n)),y(e||o[r.W2](),t,n)},o}function v(e,t,n,f){var g=null,y=!f;if((0,s.kJ)(e)&&e[r.R5]>0){var b=null;(0,s.tO)(e,(function(e){if(y||f!==e||(y=!0),y&&e&&(0,s.mf)(e[a.hL])){var v=function(e,t,n){var f,g=null,y=(0,s.mf)(e[a.hL]),v=(0,s.mf)(e[r.Jd]),b={getPlugin:function(){return e},getNext:function(){return g},processTelemetry:function(i,o){S(o=o||function(){var r;return e&&(0,s.mf)(e[p])&&(r=e[p]()),r||(r=m(b,t,n)),r}(),(function(t){if(!e||!y)return!1;var n=(0,l.OY)(e);return!n[r.fi]&&!n[a.mE]&&(v&&e[r.Jd](g),e[a.hL](i,t),!0)}),"processTelemetry",(function(){return{item:i}}),!i.sync)||o[r.uL](i)},unload:function(t,n){S(t,(function(){var i=!1;if(e){var o=(0,l.OY)(e),s=e[a.oV]||o[a.oV];!e||s&&s!==t.core()||o[r.fi]||(o[a.oV]=null,o[r.fi]=!0,o[r.yl]=!1,e[r.fi]&&!0===e[r.fi](t,n)&&(i=!0))}return i}),"unload",(function(){}),n[r.d])||t[r.uL](n)},update:function(t,n){S(t,(function(){var i=!1;if(e){var o=(0,l.OY)(e),s=e[a.oV]||o[a.oV];!e||s&&s!==t.core()||o[r.fi]||e[r.Tu]&&!0===e[r.Tu](t,n)&&(i=!0)}return i}),"update",(function(){}),!1)||t[r.uL](n)},_id:f=e?e[r.pZ]+"-"+e[a.yi]+"-"+h++:"Unknown-0-"+h++,_setNext:function(e){g=e}};function S(t,n,s,l,p){var h=!1,m=e?e[r.pZ]:u,y=t[d];return y||(y=t[d]={}),t.setNext(g),e&&(0,c.Lm)(t[a.oV](),(function(){return m+":"+s}),(function(){y[f]=!0;try{var e=g?g._id:a.qS;e&&(y[e]=!1),h=n(t)}catch(e){var c=!g||y[g._id];c&&(h=!0),g&&c||(0,i.kP)(t[r.mc](),1,73,"Plugin ["+m+"] failed during "+s+" - "+(0,o.eU)(e)+", run flags: "+(0,o.eU)(y))}}),l,p),h}return(0,s.FL)(b)}(e,t,n);g||(g=v),b&&b._setNext(v),b=v}}))}return f&&!g?v([f],t,n):g}var b=function(e,t,n,r){var i=m(e,t,n,r);(0,s.Vb)(this,i,(0,s.FY)(i))}},395:(e,t,n)=>{"use strict";n.d(t,{CN:()=>g,F6:()=>y,_l:()=>m,az:()=>f,pZ:()=>v});var r=n(6474),i=n(1167),o=n(3161),s=n(9556),a=4294967296,c=4294967295,l=!1,u=123456789,d=987654321;function p(e){e<0&&(e>>>=0),u=123456789+e&c,d=987654321-e&c,l=!0}function h(){try{var e=2147483647&(0,o.m6)();p((Math.random()*a^e)+e)}catch(e){}}function f(e){return e>0?Math.floor(m()/c*(e+1))>>>0:0}function m(e){var t=0,n=(0,i.MX)()||(0,i.gz)();return n&&n.getRandomValues&&(t=n.getRandomValues(new Uint32Array(1))[0]&c),0===t&&(0,i.w1)()&&(l||h(),t=y()&c),0===t&&(t=Math.floor(a*Math.random()|0)),e||(t>>>=0),t}function g(e){e?p(e):h()}function y(e){var t=((d=36969*(65535&d)+(d>>16)&c)<<16)+(65535&(u=18e3*(65535&u)+(u>>16)&c))>>>0&c|0;return e||(t>>>=0),t}function v(e){void 0===e&&(e=22);for(var t=m()>>>0,n=0,i=s.qS;i[r.R5]<e;)n++,i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&t),t>>>=6,5===n&&(t=(m()<<2&4294967295|3&t)>>>0,n=0);return i}},3656:(e,t,n)=>{"use strict";n.d(t,{AA:()=>d,HD:()=>p,OY:()=>l,Yn:()=>h,bP:()=>u});var r=n(6474),i=n(8530),o=n(3161),s=n(9556),a=n(1579),c=(0,i.K)("plugin");function l(e){return c.get(e,"state",{},!0)}function u(e,t){for(var n,i=[],a=null,c=e[r.W2]();c;){var u=c[r.TO]();u&&(a&&(0,o.mf)(a[r.Jd])&&(0,o.mf)(u[s.hL])&&a[r.Jd](u),((0,o.mf)(u[r.yl])?u[r.yl]():(n=l(u))[r.yl])||i[r.MW](u),a=u,c=c[r.W2]())}(0,o.tO)(i,(function(i){var o=e[s.oV]();i[r.VL](e.getCfg(),o,t,e[r.W2]()),n=l(i),i[s.oV]||n[s.oV]||(n[s.oV]=o),n[r.yl]=!0,delete n[r.fi]}))}function d(e){return e.sort((function(e,t){var n=0;if(t){var r=(0,o.mf)(t[s.hL]);(0,o.mf)(e[s.hL])?n=r?e[s.yi]-t[s.yi]:1:r&&(n=-1)}else n=e?1:-1;return n}))}function p(e,t,n,i){var s=0;return function i(){for(;s<e[r.R5];){var a=e[s++];if(a){var c=a._doUnload||a[r.F3];if((0,o.mf)(c)&&!0===c[r._S](a,t,n,i))return!0}}}()}function h(e){var t={};return{getName:function(){return t[r.I]},setName:function(n){e&&e.setName(n),t[r.I]=n},getTraceId:function(){return t[r.nY]},setTraceId:function(n){e&&e.setTraceId(n),(0,a.jN)(n)&&(t[r.nY]=n)},getSpanId:function(){return t[r._d]},setSpanId:function(n){e&&e.setSpanId(n),(0,a.Lc)(n)&&(t[r._d]=n)},getTraceFlags:function(){return t[r.T0]},setTraceFlags:function(n){e&&e.setTraceFlags(n),t[r.T0]=n}}}},6930:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(6474),i=n(547),o=n(1167),s=n(3161);function a(){var e=[];return{add:function(t){t&&e[r.MW](t)},run:function(t,n){(0,s.tO)(e,(function(e){try{e(t,n)}catch(e){(0,i.kP)(t[r.mc](),2,73,"Unexpected error calling unload handler - "+(0,o.eU)(e))}})),e=[]}}}},1579:(e,t,n)=>{"use strict";n.d(t,{J6:()=>S,Lc:()=>b,Pn:()=>w,SU:()=>g,aR:()=>T,jN:()=>v,j_:()=>y,lq:()=>_});var r=n(6474),i=n(821),o=n(1167),s=n(3161),a=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]*)?$/,c="00",l="ff",u="00000000000000000000000000000000",d="0000000000000000",p=1;function h(e,t,n){return!(!e||e[r.R5]!==t||e===n||!e.match(/^[\da-f]*$/))}function f(e,t,n){return h(e,t)?e:n}function m(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t[r.R5]<2;)t="0"+t;return t}function g(e,t,n,o){var s;return(s={})[r.PA]=h(o,2,l)?o:c,s[r.nY]=v(e)?e:(0,i.DO)(),s.spanId=b(t)?t:(0,i.DO)()[r.Jn](0,16),s.traceFlags=n>=0&&n<=255?n:1,s}function y(e){var t;if(!e)return null;if((0,s.kJ)(e)&&(e=e[0]||""),!e||!(0,s.HD)(e)||e[r.R5]>8192)return null;var n=a.exec((0,s.nd)(e));return n&&n[1]!==l&&n[2]!==u&&n[3]!==d?((t={})[r.PA]=n[1],t[r.nY]=n[2],t[r._d]=n[3],t[r.T0]=parseInt(n[4],16),t):null}function v(e){return h(e,32,u)}function b(e){return h(e,16,d)}function S(e){return!!(e&&h(e[r.PA],2,l)&&h(e[r.nY],32,u)&&h(e[r._d],16,d)&&h(m(e[r.T0]),2))}function w(e){return!!S(e)&&(e[r.T0]&p)===p}function T(e){if(e){var t=m(e[r.T0]);h(t,2)||(t="01");var n=e[r.PA]||c;return"00"!==n&&"ff"!==n&&(n=c),"".concat(n,"-").concat(f(e.traceId,32,u),"-").concat(f(e.spanId,16,d),"-").concat(t)}return""}function _(){var e="traceparent",t=y((0,o.ed)(e));return t||(t=y((0,o.pI)(e))),t}},6474:(e,t,n)=>{"use strict";n.d(t,{$h:()=>F,F3:()=>I,Fc:()=>b,Fr:()=>G,Gc:()=>C,I:()=>i,Jd:()=>A,Jn:()=>U,Km:()=>ee,Kn:()=>Q,LS:()=>v,Lk:()=>k,MW:()=>a,P6:()=>K,PA:()=>ie,PL:()=>X,R5:()=>p,SD:()=>m,T:()=>Y,T0:()=>re,T1:()=>W,TC:()=>l,TO:()=>S,Tu:()=>O,VL:()=>r,W2:()=>P,ZV:()=>z,Z_:()=>h,_S:()=>$,_d:()=>ne,cb:()=>_,d:()=>x,dE:()=>J,eZ:()=>d,fi:()=>E,g:()=>g,gU:()=>R,i7:()=>H,iC:()=>T,jk:()=>V,kL:()=>w,mc:()=>D,n7:()=>y,nY:()=>te,ou:()=>j,p$:()=>u,pZ:()=>s,qV:()=>M,tb:()=>o,uL:()=>f,w6:()=>L,wu:()=>Z,xv:()=>B,yl:()=>c,zV:()=>N,zc:()=>q});var r="initialize",i="name",o="getNotifyMgr",s="identifier",a="push",c="isInitialized",l="config",u="instrumentationKey",d="logger",p="length",h="time",f="processNext",m="getProcessTelContext",g="addNotificationListener",y="removeNotificationListener",v="stopPollingInternalLogs",b="onComplete",S="getPlugin",w="flush",T="_extensions",_="splice",E="teardown",C="messageId",R="message",x="isAsync",I="_doTeardown",O="update",P="getNext",D="diagLog",A="setNextPlugin",N="createNew",k="cookieCfg",j="indexOf",q="substring",M="userAgent",L="split",F="setEnabled",U="substr",B="nodeType",z="apply",H="replace",G="enableDebugExceptions",V="logInternalMessage",W="toLowerCase",$="call",K="type",Q="handler",J="listeners",X="isChildEvt",Y="getCtx",Z="setCtx",ee="complete",te="traceId",ne="spanId",re="traceFlags",ie="version"},4719:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AppInsightsCore:()=>o.F,BaseCore:()=>s.A,BaseTelemetryPlugin:()=>a.i,CoreUtils:()=>l.Tr,DiagnosticLogger:()=>v.AQ,EventHelper:()=>l.zB,EventsDiscardedReason:()=>i.h,InstrumentEvent:()=>N,InstrumentFunc:()=>D,InstrumentFuncs:()=>A,InstrumentProto:()=>I,InstrumentProtos:()=>O,LoggingSeverity:()=>w.X,MinChannelPriorty:()=>r.p,NotificationManager:()=>g.f,PerfEvent:()=>y.zn,PerfManager:()=>y.Jk,ProcessTelemetryContext:()=>b.Vi,Undefined:()=>l.Px,_InternalLogMessage:()=>v.lQ,_InternalMessageId:()=>w.v,__getRegisteredEvents:()=>p.um,_legacyCookieMgr:()=>l.pP,_logInternalMessage:()=>v.L4,_throwInternal:()=>v.kP,_warnToConsole:()=>v.jV,addEventHandler:()=>p.Ib,addEventListeners:()=>p.yw,addPageHideEventListener:()=>p.TJ,addPageShowEventListener:()=>p.nD,addPageUnloadEventListener:()=>p.c9,areCookiesSupported:()=>k.p7,arrForEach:()=>u.tO,arrIndexOf:()=>u.UA,arrMap:()=>u.Mr,arrReduce:()=>u.Xz,attachEvent:()=>p.pZ,canUseCookies:()=>l.vn,createClassFromInterface:()=>u.hl,createCookieMgr:()=>k.Nz,createCustomDomEvent:()=>h.Nd,createEnumMap:()=>d.uj,createEnumStyle:()=>d.By,createProcessTelemetryContext:()=>b.CD,createTraceParent:()=>L.SU,createUniqueNamespace:()=>q.J,createUnloadHandlerContainer:()=>M.Y,createValueMap:()=>d.cc,dateNow:()=>u.m6,deepFreeze:()=>u._A,deleteCookie:()=>l.kT,detachEvent:()=>p.pD,disableCookies:()=>l.oF,dispatchEvent:()=>h.Nu,doPerf:()=>y.Lm,dumpObj:()=>h.eU,eventOff:()=>p.QY,eventOn:()=>p.XO,findMetaTag:()=>h.ed,findNamedServerTiming:()=>h.pI,findW3cTraceParent:()=>L.lq,formatTraceParent:()=>L.aR,generateW3CId:()=>l.DO,getConsole:()=>h.dr,getCookie:()=>l.ej,getCrypto:()=>h.MX,getDebugExt:()=>j.j,getDebugListener:()=>j.p,getDocument:()=>h.Me,getExceptionName:()=>u.jj,getGblPerfMgr:()=>y.j5,getGlobal:()=>f.Rd,getGlobalInst:()=>h.a8,getHistory:()=>h.s1,getIEVersion:()=>h.sA,getJSON:()=>h.xA,getLocation:()=>h.k$,getMsCrypto:()=>h.gz,getNavigator:()=>h.jW,getPerformance:()=>h.r,getSetValue:()=>u.qK,getWindow:()=>h.Jj,hasDocument:()=>h.Nv,hasHistory:()=>h.fE,hasJSON:()=>h.nS,hasNavigator:()=>h.d6,hasOwnProperty:()=>u.nr,hasWindow:()=>h.Ym,initializePlugins:()=>S.bP,isArray:()=>u.kJ,isBeaconsSupported:()=>h.MF,isBoolean:()=>u.jn,isDate:()=>u.J_,isError:()=>u.VZ,isFetchSupported:()=>h.JO,isFunction:()=>u.mf,isIE:()=>h.w1,isNotNullOrUndefined:()=>u.BX,isNotTruthy:()=>u.F,isNotUndefined:()=>u.pT,isNullOrUndefined:()=>u.le,isNumber:()=>u.hj,isObject:()=>u.Kn,isPlainObject:()=>u.PO,isReactNative:()=>h.b$,isSafari:()=>h.G6,isSampledFlag:()=>L.Pn,isString:()=>u.HD,isSymbol:()=>u.yk,isTruthy:()=>u.fQ,isTypeof:()=>u.Ym,isUndefined:()=>u.o8,isValidSpanId:()=>L.Lc,isValidTraceId:()=>L.jN,isValidTraceParent:()=>L.J6,isXhrSupported:()=>h.Z3,mergeEvtNamespace:()=>p.jU,mwcRandom32:()=>c.F6,mwcRandomSeed:()=>c.CN,newGuid:()=>l.GW,newId:()=>c.pZ,normalizeJsName:()=>u.Gf,objCreate:()=>f.pu,objDefineAccessors:()=>u.l_,objExtend:()=>u.mm,objForEachKey:()=>u.rW,objFreeze:()=>u.FL,objKeys:()=>u.FY,objSeal:()=>u.Xi,objToString:()=>u.Mu,optimizeObject:()=>u.Ax,parseTraceParent:()=>L.j_,perfNow:()=>l.Jj,proxyAssign:()=>u.cf,proxyFunctionAs:()=>u.Oi,proxyFunctions:()=>u.Vb,random32:()=>c._l,randomValue:()=>c.az,removeEventHandler:()=>p.C1,removeEventListeners:()=>p.nJ,removePageHideEventListener:()=>p.C9,removePageShowEventListener:()=>p.Yl,removePageUnloadEventListener:()=>p.JA,safeGetCookieMgr:()=>k.JP,safeGetLogger:()=>v.vH,sendCustomEvent:()=>h.Kf,setCookie:()=>l.d8,setEnableEnvMocks:()=>h.dI,setGblPerfMgr:()=>y.tQ,setValue:()=>u.sO,sortPlugins:()=>S.AA,strContains:()=>u._Q,strEndsWith:()=>u.Id,strFunction:()=>m.cb,strObject:()=>m.fK,strPrototype:()=>m.hB,strStartsWith:()=>u.xe,strTrim:()=>u.nd,strUndefined:()=>m.jA,throwError:()=>u._y,toISOString:()=>u.Y6,uaDisallowsSameSiteNone:()=>k.UY,unloadComponents:()=>S.HD,useXDomainRequest:()=>h.cp});var r=n(978),i=n(4641),o=n(8176),s=n(4770),a=n(1549),c=n(395),l=n(821),u=n(3161),d=n(1785),p=n(1318),h=n(1167),f=n(8785),m=n(2589),g=n(6329),y=n(2753),v=n(547),b=n(877),S=n(3656),w=n(8712),T=n(6474),_="_aiHooks",E=["req","rsp","hkErr","fnErr"];function C(e,t){if(e)for(var n=0;n<e[T.R5]&&!t(e[n],n);n++);}function R(e,t,n,r,i){i>=0&&i<=2&&C(e,(function(e,o){var s=e.cbks,a=s[E[i]];if(a){t.ctx=function(){return r[o]=r[o]||{}};try{a[T.ZV](t.inst,n)}catch(e){var c=t.err;try{var l=s[E[2]];l&&(t.err=e,l[T.ZV](t.inst,n))}catch(e){}finally{t.err=c}}}}))}function x(e,t,n,r){var i=null;return e&&((0,u.nr)(e,t)?i=e:n&&(i=x((0,u.Hb)(e),t,r,!1))),i}function I(e,t,n){return e?D(e[m.hB],t,n,!1):null}function O(e,t,n){return e?A(e[m.hB],t,n,!1):null}function P(e,t,n,r){var i=n&&n[_];if(!i){var o=function(e){return function(){var t,n=arguments,r=e.h,i=((t={})[T.I]=e.n,t.inst=this,t.ctx=null,t.set=function(e,t){(n=a([],n))[e]=t,s=a([i],n)},t),o=[],s=a([i],n);function a(e,t){return C(t,(function(t){e[T.MW](t)})),e}i.evt=(0,h.a8)("event"),R(r,i,s,o,0);var c=e.f;if(c)try{i.rslt=c[T.ZV](this,n)}catch(e){throw i.err=e,R(r,i,s,o,3),e}return R(r,i,s,o,1),i.rslt}}(i={i:0,n:t,f:n,h:[]});o[_]=i,e[t]=o}var s={id:i.i,cbks:r,rm:function(){var e=this.id;C(i.h,(function(t,n){if(t.id===e)return i.h[T.cb](n,1),1}))}};return i.i++,i.h[T.MW](s),s}function D(e,t,n,r,i){if(void 0===r&&(r=!0),e&&t&&n){var o=x(e,t,r,i);if(o){var s=o[t];if(typeof s===m.cb)return P(o,t,s,n)}}return null}function A(e,t,n,r,i){void 0===r&&(r=!0);var o=null;return C(t,(function(t){var s=D(e,t,n,r,i);s&&(o||(o=[]),o[T.MW](s))})),o}function N(e,t,n,r,i){if(e&&t&&n){var o=x(e,t,r,i)||e;if(o)return P(o,t,o[t],n)}return null}var k=n(8589),j=n(7485),q=n(8530),M=n(6930),L=n(1579)},9798:(e,t,n)=>{"use strict";var r;n.d(t,{Z:()=>L});var i,o="undefined",s="constructor",a="prototype",c="function",l="_dynInstFuncs",u="_isDynProxy",d="_dynClass",p="_dynCls$",h="_dynInstChk",f=h,m="_dfOpts",g="_unknown_",y="__proto__",v="_dyn"+y,b="__dynProto$Gbl",S="_dynInstProto",w="useBaseInst",T="setInstFuncs",_=Object,E=_.getPrototypeOf,C=_.getOwnPropertyNames,R=(typeof globalThis!==o&&(i=globalThis),i||typeof self===o||(i=self),i||typeof window===o||(i=window),i||typeof global===o||(i=global),i||{}),x=R[b]||(R[b]={o:(r={},r[T]=!0,r[w]=!0,r),n:1e3});function I(e,t){return e&&_[a].hasOwnProperty.call(e,t)}function O(e){return e&&(e===_[a]||e===Array[a])}function P(e){return O(e)||e===Function[a]}function D(e){var t;if(e){if(E)return E(e);var n=e[y]||e[a]||(e[s]?e[s][a]:null);t=e[v]||n,I(e,v)||(delete e[S],t=e[v]=e[S]||e[v],e[S]=n)}return t}function A(e,t){var n=[];if(C)n=C(e);else for(var r in e)"string"==typeof r&&I(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function N(e,t,n){return t!==s&&typeof e[t]===c&&(n||I(e,t))}function k(e){throw new TypeError("DynamicProto: "+e)}function j(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function q(e,t,n,r,i){if(!O(e)){var o=n[l]=n[l]||{},s=o[t]=o[t]||{};!1!==o[f]&&(o[f]=!!i),A(n,(function(t){N(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!I(e,t)||e[t]&&!e[t][u])&&(e[t]=function(e,t){var n=function(){var r=function(e,t,n,r){var i=null;if(e&&I(n,d)){var o=e[l]||{};if((i=(o[n[d]]||{})[t])||k("Missing ["+t+"] "+c),!i[h]&&!1!==o[f]){for(var s=!I(e,t),a=D(e),u=[];s&&a&&!P(a)&&!j(u,a);){var p=a[t];if(p){s=p===r;break}u.push(a),a=D(a)}try{s&&(e[t]=i),i[h]=1}catch(e){o[f]=!1}}}return i}(this,t,e,n)||function(e,t,n){var r=t[e];return r===n&&(r=D(t)[e]),typeof r!==c&&k("["+e+"] is not a "+c),r}(t,e,n);return r.apply(this,arguments)};return n[u]=1,n}(e,t)))}))}}function M(e,t){return I(e,a)?e.name||t||g:((e||{})[s]||{}).name||t||g}function L(e,t,n,r){I(e,a)||k("theClass is an invalid class definition.");var i=e[a];(function(e,t){if(E){for(var n=[],r=D(t);r&&!P(r)&&!j(n,r);){if(r===e)return!0;n.push(r),r=D(r)}return!1}return!0})(i,t)||k("["+M(e)+"] not in hierarchy of ["+M(t)+"]");var o=null;I(i,d)?o=i[d]:(o=p+M(e,"_")+"$"+x.n,x.n++,i[d]=o);var s=L[m],c=!!s[w];c&&r&&void 0!==r[w]&&(c=!!r[w]);var h=function(e){var t={};return A(e,(function(n){!t[n]&&N(e,n,!1)&&(t[n]=e[n])})),t}(t),g=function(e,t,n,r){function i(e,t,n){var i=t[n];if(i[u]&&r){var o=e[l]||{};!1!==o[f]&&(i=(o[t[d]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var o={};A(n,(function(e){o[e]=i(t,n,e)}));for(var s=D(e),a=[];s&&!P(s)&&!j(a,s);)A(s,(function(e){!o[e]&&N(s,e,!E)&&(o[e]=i(t,s,e))})),a.push(s),s=D(s);return o}(i,t,h,c);n(t,g);var y=!!E&&!!s[T];y&&r&&(y=!!r[T]),q(i,o,t,h,!1!==y)}L[m]=x.o},2589:(e,t,n)=>{"use strict";n.d(t,{CY:()=>f,Pw:()=>l,RJ:()=>h,V4:()=>u,ak:()=>c,bO:()=>a,cb:()=>r,fK:()=>i,hB:()=>s,jA:()=>o,rl:()=>d,yu:()=>p});var r="function",i="object",o="undefined",s="prototype",a="hasOwnProperty",c="default",l=Object,u=l[s],d=l.assign,p=l.create,h=l.defineProperty,f=u[a]},8785:(e,t,n)=>{"use strict";n.d(t,{Rd:()=>o,ZU:()=>s,pu:()=>a});var r=n(2589),i=null;function o(e){void 0===e&&(e=!0);var t=!1===e?null:i;return t||(typeof globalThis!==r.jA&&(t=globalThis),t||typeof self===r.jA||(t=self),t||typeof window===r.jA||(t=window),t||typeof global===r.jA||(t=global),i=t),t}function s(e){throw new TypeError(e)}function a(e){var t=r.yu;if(t)return t(e);if(null==e)return{};var n=typeof e;function i(){}return n!==r.fK&&n!==r.cb&&s("Object prototype may only be an Object:"+e),i[r.hB]=e,new i}},3298:(e,t,n)=>{"use strict";n.d(t,{$h:()=>E,Cj:()=>w,DJ:()=>b,EU:()=>v,KG:()=>R,Lv:()=>m,V0:()=>y,an:()=>S,hw:()=>C,i9:()=>T,l9:()=>g,m:()=>x,ne:()=>f,uc:()=>p,zg:()=>_});var r=n(2589),i=n(8785),o=((0,i.Rd)()||{}).Symbol,s=((0,i.Rd)()||{}).Reflect,a=!!s,c="decorate",l="metadata",u="getOwnPropertySymbols",d="iterator",p=r.rl||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])r.V4[r.bO].call(t,o)&&(e[o]=t[o]);return e},h=function(e,t){return h=r.Pw.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[r.bO](n)&&(e[n]=t[n])},h(e,t)};function f(e,t){function n(){this.constructor=e}typeof t!==r.cb&&null!==t&&(0,i.ZU)("Class extends value "+String(t)+" is not a constructor or null"),h(e,t),e[r.hB]=null===t?(0,i.pu)(t):(n[r.hB]=t[r.hB],new n)}function m(e,t){var n={};for(var i in e)r.CY.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&typeof r.Pw[u]===r.cb)for(var o=0,s=r.Pw[u](e);o<s.length;o++)t.indexOf(s[o])<0&&r.V4.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n}function g(e,t,n,i){var o,l=arguments.length,u=l<3?t:null===i?i=r.Pw.getOwnPropertyDescriptor(t,n):i;if(a&&typeof s[c]===r.cb)u=s[c](e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(u=(l<3?o(u):l>3?o(t,n,u):o(t,n))||u);return l>3&&u&&(0,r.RJ)(t,n,u),u}function y(e,t){return function(n,r){t(n,r,e)}}function v(e,t){if(a&&s[l]===r.cb)return s[l](e,t)}function b(e,t){for(var n in e)n===r.ak||r.CY.call(t,n)||S(t,e,n)}function S(e,t,n,i){void 0===i&&(i=n),r.yu?(0,r.RJ)(e,i,{enumerable:!0,get:function(){return t[n]}}):e[i]=t[n]}function w(e){var t=typeof o===r.cb&&o[d],n=t&&e[t],s=0;return n?n.call(e):e&&"number"==typeof e.length?{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}}:void(0,i.ZU)(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function T(e,t){var n=typeof o===r.cb&&e[o[d]];if(!n)return e;var i,s,a=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)c.push(i.value)}catch(e){s={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return c}function _(){for(var e=arguments,t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;var i=Array(t),o=0;for(n=0;n<r;n++)for(var s=e[n],a=0,c=s.length;a<c;a++,o++)i[o]=s[a];return i}function E(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}function C(e,t){return r.RJ?(0,r.RJ)(e,"raw",{value:t}):e.raw=t,e}function R(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)n!==r.ak&&Object.prototype.hasOwnProperty.call(e,n)&&S(t,e,n);return r.yu?(0,r.RJ)(t,r.ak,{enumerable:!0,value:e}):t[r.ak]=e,t}function x(e){return e&&e.__esModule?e:{strDefault:e}}},623:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ObjAssign:()=>r.rl,ObjClass:()=>r.Pw,ObjCreate:()=>r.yu,ObjDefineProperty:()=>r.RJ,ObjHasOwnProperty:()=>r.CY,ObjProto:()=>r.V4,__assignFn:()=>o.uc,__createBindingFn:()=>o.an,__decorateFn:()=>o.l9,__exportStarFn:()=>o.DJ,__exposeGlobalTsLib:()=>s,__extendsFn:()=>o.ne,__importDefaultFn:()=>o.m,__importStarFn:()=>o.KG,__makeTemplateObjectFn:()=>o.hw,__metadataFn:()=>o.EU,__paramFn:()=>o.V0,__readFn:()=>o.i9,__restFn:()=>o.Lv,__spreadArrayFn:()=>o.$h,__spreadArraysFn:()=>o.zg,__valuesFn:()=>o.Cj,getGlobal:()=>i.Rd,objCreateFn:()=>i.pu,strDefault:()=>r.ak,strShimFunction:()=>r.cb,strShimHasOwnProperty:()=>r.bO,strShimObject:()=>r.fK,strShimPrototype:()=>r.hB,strShimUndefined:()=>r.jA,throwTypeError:()=>i.ZU});var r=n(2589),i=n(8785),o=n(3298);function s(){var e,t,n,s,a=(0,i.Rd)()||{};e=a,t=o.uc,n=o.ne,s=o.an,e.__assign||(e.__assign=r.rl||t),e.__extends||(e.__extends=n),e.__createBinding||(e.__createBinding=s),__assign||(__assign=a.__assign),__extends||(__extends=a.__extends),__createBinding||(__createBinding=a.__createBinding)}},2314:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{default:()=>L});var i,o="undefined",s="constructor",a="prototype",c="function",l="_dynInstFuncs",u="_isDynProxy",d="_dynClass",p="_dynCls$",h="_dynInstChk",f=h,m="_dfOpts",g="_unknown_",y="__proto__",v="_dyn"+y,b="__dynProto$Gbl",S="_dynInstProto",w="useBaseInst",T="setInstFuncs",_=Object,E=_.getPrototypeOf,C=_.getOwnPropertyNames,R=(typeof globalThis!==o&&(i=globalThis),i||typeof self===o||(i=self),i||typeof window===o||(i=window),i||typeof global===o||(i=global),i||{}),x=R[b]||(R[b]={o:(r={},r[T]=!0,r[w]=!0,r),n:1e3});function I(e,t){return e&&_[a].hasOwnProperty.call(e,t)}function O(e){return e&&(e===_[a]||e===Array[a])}function P(e){return O(e)||e===Function[a]}function D(e){var t;if(e){if(E)return E(e);var n=e[y]||e[a]||(e[s]?e[s][a]:null);t=e[v]||n,I(e,v)||(delete e[S],t=e[v]=e[S]||e[v],e[S]=n)}return t}function A(e,t){var n=[];if(C)n=C(e);else for(var r in e)"string"==typeof r&&I(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function N(e,t,n){return t!==s&&typeof e[t]===c&&(n||I(e,t))}function k(e){throw new TypeError("DynamicProto: "+e)}function j(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function q(e,t,n,r,i){if(!O(e)){var o=n[l]=n[l]||{},s=o[t]=o[t]||{};!1!==o[f]&&(o[f]=!!i),A(n,(function(t){N(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!I(e,t)||e[t]&&!e[t][u])&&(e[t]=function(e,t){var n=function(){var r=function(e,t,n,r){var i=null;if(e&&I(n,d)){var o=e[l]||{};if((i=(o[n[d]]||{})[t])||k("Missing ["+t+"] "+c),!i[h]&&!1!==o[f]){for(var s=!I(e,t),a=D(e),u=[];s&&a&&!P(a)&&!j(u,a);){var p=a[t];if(p){s=p===r;break}u.push(a),a=D(a)}try{s&&(e[t]=i),i[h]=1}catch(e){o[f]=!1}}}return i}(this,t,e,n)||function(e,t,n){var r=t[e];return r===n&&(r=D(t)[e]),typeof r!==c&&k("["+e+"] is not a "+c),r}(t,e,n);return r.apply(this,arguments)};return n[u]=1,n}(e,t)))}))}}function M(e,t){return I(e,a)?e.name||t||g:((e||{})[s]||{}).name||t||g}function L(e,t,n,r){I(e,a)||k("theClass is an invalid class definition.");var i=e[a];(function(e,t){if(E){for(var n=[],r=D(t);r&&!P(r)&&!j(n,r);){if(r===e)return!0;n.push(r),r=D(r)}return!1}return!0})(i,t)||k("["+M(e)+"] not in hierarchy of ["+M(t)+"]");var o=null;I(i,d)?o=i[d]:(o=p+M(e,"_")+"$"+x.n,x.n++,i[d]=o);var s=L[m],c=!!s[w];c&&r&&void 0!==r[w]&&(c=!!r[w]);var h=function(e){var t={};return A(e,(function(n){!t[n]&&N(e,n,!1)&&(t[n]=e[n])})),t}(t),g=function(e,t,n,r){function i(e,t,n){var i=t[n];if(i[u]&&r){var o=e[l]||{};!1!==o[f]&&(i=(o[t[d]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var o={};A(n,(function(e){o[e]=i(t,n,e)}));for(var s=D(e),a=[];s&&!P(s)&&!j(a,s);)A(s,(function(e){!o[e]&&N(s,e,!E)&&(o[e]=i(t,s,e))})),a.push(s),s=D(s);return o}(i,t,h,c);n(t,g);var y=!!E&&!!s[T];y&&r&&(y=!!r[T]),q(i,o,t,h,!1!==y)}L[m]=x.o},2236:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppContext=void 0,t.AppContext=class{constructor(e){this.extensionContext=e,this.serviceMap=new Map}getService(e){const t=this.serviceMap.get(e);return t||console.warn("Service ",e," is not registered"),t}registerService(e,t){this.serviceMap.has(e)?console.warn("Multiple services ",e," registered!"):this.serviceMap.set(e,t)}}},7694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AzureBlobService=void 0;const r=n(6825),i=n(5868);class o extends i.BaseService{constructor(e){super(e)}async createSas(e,t,n,i,o){const s={ownerUri:e,blobContainerUri:t,blobContainerKey:n,storageAccountName:i,expirationDate:o};return this.runWithErrorHandling(r.CreateSasRequest.type,s)}}t.AzureBlobService=o},4309:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CmsService=void 0;const r=n(8129),i=n(6825),o=n(8682),s=n(5868);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){o.ensure(e,"cms").cms=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.CmsService,this)}async createCmsServer(e,t,n,r){const o={registeredServerName:e,registeredServerDescription:t,connectParams:{ownerUri:r,connection:n}};return this.runWithErrorHandling(i.CreateCentralManagementServerRequest.type,o)}async getRegisteredServers(e,t){const n={parentOwnerUri:e,relativePath:t};return this.runWithErrorHandling(i.ListRegisteredServersRequest.type,n)}async addRegisteredServer(e,t,n,r,o){const s={parentOwnerUri:e,relativePath:t,registeredServerName:n,registeredServerDescription:r,registeredServerConnectionDetails:o};return this.runWithErrorHandling(i.AddRegisteredServerRequest.type,s)}async removeRegisteredServer(e,t,n){const r={parentOwnerUri:e,relativePath:t,registeredServerName:n};return this.runWithErrorHandling(i.RemoveRegisteredServerRequest.type,r)}async addServerGroup(e,t,n,r){const o={parentOwnerUri:e,relativePath:t,groupName:n,groupDescription:r};return this.runWithErrorHandling(i.AddServerGroupRequest.type,o)}async removeServerGroup(e,t,n){const r={parentOwnerUri:e,relativePath:t,groupName:n};return this.runWithErrorHandling(i.RemoveServerGroupRequest.type,r)}dispose(){}}t.CmsService=a},149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerConnectionCommands=void 0;const r=n(9496),i=n(2173);t.registerConnectionCommands=function(e){e.extensionContext.subscriptions.push(r.commands.registerCommand("mssql.clearPooledConnections",(async()=>{await function(e){return e.getService(i.ConnectionService)}(e).clearPooledConnections()})))}},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionService=void 0;const r=n(2173),i=n(6825),o=n(5868);class s extends o.BaseService{static asFeature(e){return class extends s{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){}}}constructor(e,t){super(t),e.registerService(r.ConnectionService,this)}async clearPooledConnections(){return this.runWithErrorHandling(i.ClearPooledConnectionsRequest.type,{})}}t.ConnectionService=s},2173:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionService=void 0,t.ConnectionService="ConnectionService"},8129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cmdObjectExplorerDisableGroupBySchemaTitleCommand=t.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand=t.cmdObjectExplorerDisableGroupBySchemaCommand=t.cmdObjectExplorerEnableGroupBySchemaCommand=t.configHttpProxyStrictSSL=t.configHttpProxy=t.configEnableConnectionPoolingName=t.configEnableSqlAuthenticationProviderName=t.configParallelMessageProcessingLimitName=t.configParallelMessageProcessingName=t.configObjectExplorerGroupBySchemaFlagName=t.QueryStoreService=t.ObjectManagementService=t.AzureBlobService=t.NotebookConvertService=t.SqlAssessmentService=t.objectExplorerPrefix=t.LanguageExtensionService=t.SchemaCompareService=t.SqlProjectsService=t.DacFxService=t.CmsService=t.ObjectExplorerService=t.sqlProviderName=t.packageName=t.queryEditorConfigSectionName=t.telemetryConfigSectionName=t.extensionConfigSectionName=t.serviceCrashLink=t.providerId=t.serviceName=void 0,t.serviceName="SQL Tools Service",t.providerId="MSSQL",t.serviceCrashLink="https://github.com/Microsoft/vscode-mssql/wiki/SqlToolsService-Known-Issues",t.extensionConfigSectionName="mssql",t.telemetryConfigSectionName="telemetry",t.queryEditorConfigSectionName="queryEditor",t.packageName="Microsoft.mssql",t.sqlProviderName="MSSQL",t.ObjectExplorerService="objectexplorer",t.CmsService="cmsService",t.DacFxService="dacfxService",t.SqlProjectsService="sqlProjectsService",t.SchemaCompareService="schemaCompareService",t.LanguageExtensionService="languageExtensionService",t.objectExplorerPrefix="objectexplorer://",t.SqlAssessmentService="sqlAssessmentService",t.NotebookConvertService="notebookConvertService",t.AzureBlobService="azureBlobService",t.ObjectManagementService="objectManagementService",t.QueryStoreService="queryStoreService",t.configObjectExplorerGroupBySchemaFlagName="mssql.objectExplorer.groupBySchema",t.configParallelMessageProcessingName="mssql.parallelMessageProcessing",t.configParallelMessageProcessingLimitName="mssql.parallelMessageProcessingLimit",t.configEnableSqlAuthenticationProviderName="mssql.enableSqlAuthenticationProvider",t.configEnableConnectionPoolingName="mssql.enableConnectionPooling",t.configHttpProxy="http.proxy",t.configHttpProxyStrictSSL="http.proxyStrictSSL",t.cmdObjectExplorerEnableGroupBySchemaCommand="mssql.enableGroupBySchema",t.cmdObjectExplorerDisableGroupBySchemaCommand="mssql.disableGroupBySchema",t.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand="mssql.enableGroupBySchemaTitle",t.cmdObjectExplorerDisableGroupBySchemaTitleCommand="mssql.disableGroupBySchemaTitle"},4817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496),i=n(9072),o=n(2938);var s,a;!function(e){e.SetContext="setContext"}(s||(s={})),function(e){e.ISCLOUD="mssql:iscloud",e.EDITIONID="mssql:engineedition",e.SERVERMAJORVERSION="mssql:servermajorversion"}(a||(a={}));const c=[i.DatabaseEngineEdition.SqlDatabase,i.DatabaseEngineEdition.SqlDataWarehouse,i.DatabaseEngineEdition.SqlOnDemand];function l(e,t){return r.commands.executeCommand(s.SetContext,e,t)}t.default=class{constructor(){this._disposables=new Array,this._disposables.push(i.workspace.onDidOpenDashboard(this.onDashboardOpen,this)),this._disposables.push(i.workspace.onDidChangeToDashboard(this.onDashboardOpen,this))}onDashboardOpen(e){let t,n,r=!1;"mssql"!==e.profile.providerName.toLowerCase()||o.isUndefinedOrNull(e.serverInfo)||o.isUndefinedOrNull(e.serverInfo.engineEditionId)||(r=c.some((t=>t===e.serverInfo.engineEditionId)),t=e.serverInfo.engineEditionId,n=e.serverInfo.serverMajorVersion),!0!==r&&!1!==r||l(a.ISCLOUD,r),o.isUndefinedOrNull(t)||l(a.EDITIONID,t),o.isUndefinedOrNull(n)||l(a.SERVERMAJORVERSION,n)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}}},6825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetOptionsFromProfileRequest=t.GenerateDeployPlanRequest=t.GenerateDeployScriptRequest=t.DeployRequest=t.ExtractRequest=t.ImportRequest=t.ExportRequest=t.TaskExecutionMode=t.DeleteAgentJobScheduleRequest=t.UpdateAgentJobScheduleRequest=t.CreateAgentJobScheduleRequest=t.AgentJobSchedulesRequest=t.AgentCredentialsRequest=t.DeleteAgentProxyRequest=t.UpdateAgentProxyRequest=t.CreateAgentProxyRequest=t.AgentProxiesRequest=t.DeleteAgentOperatorRequest=t.UpdateAgentOperatorRequest=t.CreateAgentOperatorRequest=t.AgentOperatorsRequest=t.DeleteAgentAlertRequest=t.UpdateAgentAlertRequest=t.CreateAgentAlertRequest=t.AgentAlertsRequest=t.UpdateAgentNotebookRequest=t.DeleteAgentNotebookRequest=t.CreateAgentNotebookRequest=t.AgentNotebookTemplateRequest=t.UpdateAgentNotebookRunPinRequest=t.DeleteMaterializedNotebookRequest=t.UpdateAgentNotebookRunNameRequest=t.AgentNotebookMaterializedRequest=t.AgentNotebookHistoryRequest=t.AgentNotebooksRequest=t.DeleteAgentJobStepRequest=t.UpdateAgentJobStepRequest=t.CreateAgentJobStepRequest=t.AgentJobDefaultsRequest=t.DeleteAgentJobRequest=t.UpdateAgentJobRequest=t.CreateAgentJobRequest=t.AgentJobActionRequest=t.AgentJobHistoryRequest=t.AgentJobsRequest=t.TokenRefreshedNotification=t.RefreshTokenNotification=t.SecurityTokenRequest=t.TelemetryParams=t.TelemetryNotification=void 0,t.RemoveRegisteredServerRequest=t.AddRegisteredServerRequest=t.ListRegisteredServersRequest=t.CreateCentralManagementServerRequest=t.GetDatabaseReferencesRequest=t.DeleteDatabaseReferenceRequest=t.AddNugetPackageReferenceRequest=t.AddSystemDatabaseReferenceRequest=t.AddSqlProjectReferenceRequest=t.AddDacpacReferenceRequest=t.GetSqlCmdVariablesRequest=t.UpdateSqlCmdVariableRequest=t.DeleteSqlCmdVariableRequest=t.AddSqlCmdVariableRequest=t.MoveNoneItemRequest=t.GetNoneItemsRequest=t.ExcludeNoneItemRequest=t.DeleteNoneItemRequest=t.AddNoneItemRequest=t.GetPreDeploymentScriptsRequest=t.MovePreDeploymentScriptRequest=t.MovePostDeploymentScriptRequest=t.ExcludePreDeploymentScriptRequest=t.GetPostDeploymentScriptsRequest=t.ExcludePostDeploymentScriptRequest=t.DeletePreDeploymentScriptRequest=t.DeletePostDeploymentScriptRequest=t.AddPreDeploymentScriptRequest=t.AddPostDeploymentScriptRequest=t.GetFoldersRequest=t.DeleteFolderRequest=t.AddFolderRequest=t.MoveFolderRequest=t.ExcludeFolderRequest=t.GetSqlObjectScriptsRequest=t.MoveSqlObjectScriptRequest=t.ExcludeSqlObjectScriptRequest=t.DeleteSqlObjectScriptRequest=t.AddSqlObjectScriptRequest=t.SetDatabaseSchemaProviderRequest=t.SetDatabaseSourceRequest=t.GetProjectPropertiesRequest=t.UpdateProjectForCrossPlatformRequest=t.GetCrossPlatformCompatibilityRequest=t.CloseSqlProjectRequest=t.OpenSqlProjectRequest=t.CreateSqlProjectRequest=t.SavePublishProfileRequest=t.ParseTSqlScriptRequest=t.ValidateStreamingJobRequest=void 0,t.DetachDatabaseRequest=t.SearchObjectRequest=t.DropObjectRequest=t.RenameObjectRequest=t.DisposeViewRequest=t.ScriptObjectRequest=t.SaveObjectRequest=t.InitializeViewRequest=t.GetServerContextualizationRequest=t.ExecutionPlanComparisonRequest=t.GetExecutionPlanRequest=t.CreateSasRequest=t.DisposeTableDesignerRequest=t.TableDesignerGenerateChangePreviewReportRequest=t.TableDesignerGenerateScriptRequest=t.PublishTableDesignerChangesRequest=t.ProcessTableDesignerEditRequest=t.InitializeTableDesignerRequest=t.ProfilerSessionCreatedNotification=t.ProfilerSessionStoppedNotification=t.ProfilerEventsAvailableNotification=t.DisconnectSessionRequest=t.GetXEventSessionsRequest=t.PauseProfilingRequest=t.StopProfilingRequest=t.StartProfilingRequest=t.CreateXEventSessionRequest=t.ConvertSqlToNotebookRequest=t.ConvertNotebookToSqlRequest=t.CompletionExtLoadRequest=t.CompletionExtensionParams=t.SerializeDataContinueRequest=t.SerializeDataStartRequest=t.GenerateSqlAssessmentScriptRequest=t.GetSqlAssessmentItemsRequest=t.SqlAssessmentInvokeRequest=t.SchemaCompareCancellationRequest=t.SchemaCompareSaveScmpRequest=t.SchemaCompareOpenScmpRequest=t.SchemaCompareIncludeExcludeNodeRequest=t.SchemaCompareGetDefaultOptionsRequest=t.SchemaComparePublishProjectChangesRequest=t.SchemaComparePublishDatabaseChangesRequest=t.SchemaCompareGenerateScriptRequest=t.SchemaCompareRequest=t.LanguageExtensibilityUpdateRequest=t.LanguageExtensibilityDeleteRequest=t.LanguageExtensibilityListRequest=t.RemoveServerGroupRequest=t.AddServerGroupRequest=void 0,t.GetOverallResourceConsumptionReportRequest=t.GetForcedPlanQueriesReportRequest=t.GetForcedPlanRequest=t.GetPlanSummaryGridViewRequest=t.GetPlanSummaryChartViewRequest=t.GetTopResourceConsumersDetailedSummaryWithWaitStatsRequest=t.GetTopResourceConsumersDetailedSummaryRequest=t.GetTopResourceConsumersSummaryRequest=t.GetHighVariationQueriesDetailedSummaryWithWaitStatsRequest=t.GetHighVariationQueriesDetailedSummaryRequest=t.GetHighVariationQueriesSummaryRequest=t.GetTrackedQueriesReportRequest=t.GetRegressedQueriesDetailedSummaryRequest=t.GetRegressedQueriesSummaryRequest=t.ClearPooledConnectionsRequest=t.EncryptionKeysChangedNotification=t.DidChangeEncryptionIVKeyParams=t.PurgeQueryStoreDataRequest=t.GetAssociatedFilesRequest=t.GetBackupFolderRequest=t.GetDataFolderRequest=t.AttachDatabaseRequest=t.DropDatabaseRequest=void 0;const r=n(3056);var i,o,s,a,c,l,u,d,p,h,f,m,g,y,v,b,S,w,T,_,E,C,R,x,I,O,P,D,A,N,k,j,q,M,L,F,U,B,z,H,G,V,W,$,K,Q,J,X,Y,Z,ee,te,ne,re,ie,oe,se,ae,ce,le,ue,de,pe,he,fe,me,ge,ye,ve,be,Se,we,Te,_e,Ee,Ce,Re,xe,Ie,Oe,Pe,De,Ae,Ne,ke,je,qe,Me,Le,Fe,Ue,Be,ze,He,Ge,Ve,We,$e,Ke,Qe,Je,Xe,Ye,Ze,et,tt,nt,rt,it,ot,st,at,ct,lt,ut,dt,pt,ht,ft,mt,gt,yt,vt,bt,St,wt,Tt,_t,Et,Ct,Rt,xt,It,Ot,Pt,Dt,At,Nt,kt,jt,qt,Mt,Lt,Ft,Ut,Bt,zt,Ht,Gt,Vt,Wt,$t,Kt,Qt,Jt,Xt,Yt,Zt,en,tn,nn,rn,on,sn,an,cn,ln,un,dn,pn;!function(e){e.type=new r.NotificationType("telemetry/sqlevent")}(i||(t.TelemetryNotification=i={})),t.TelemetryParams=class{},function(e){e.type=new r.RequestType("account/securityTokenRequest")}(o||(t.SecurityTokenRequest=o={})),function(e){e.type=new r.NotificationType("account/refreshToken")}(s||(t.RefreshTokenNotification=s={})),function(e){e.type=new r.NotificationType("account/tokenRefreshed")}(a||(t.TokenRefreshedNotification=a={})),function(e){e.type=new r.RequestType("agent/jobs")}(c||(t.AgentJobsRequest=c={})),function(e){e.type=new r.RequestType("agent/jobhistory")}(l||(t.AgentJobHistoryRequest=l={})),function(e){e.type=new r.RequestType("agent/jobaction")}(u||(t.AgentJobActionRequest=u={})),function(e){e.type=new r.RequestType("agent/createjob")}(d||(t.CreateAgentJobRequest=d={})),function(e){e.type=new r.RequestType("agent/updatejob")}(p||(t.UpdateAgentJobRequest=p={})),function(e){e.type=new r.RequestType("agent/deletejob")}(h||(t.DeleteAgentJobRequest=h={})),function(e){e.type=new r.RequestType("agent/jobdefaults")}(f||(t.AgentJobDefaultsRequest=f={})),function(e){e.type=new r.RequestType("agent/createjobstep")}(m||(t.CreateAgentJobStepRequest=m={})),function(e){e.type=new r.RequestType("agent/updatejobstep")}(g||(t.UpdateAgentJobStepRequest=g={})),function(e){e.type=new r.RequestType("agent/deletejobstep")}(y||(t.DeleteAgentJobStepRequest=y={})),function(e){e.type=new r.RequestType("agent/notebooks")}(v||(t.AgentNotebooksRequest=v={})),function(e){e.type=new r.RequestType("agent/notebookhistory")}(b||(t.AgentNotebookHistoryRequest=b={})),function(e){e.type=new r.RequestType("agent/notebookmaterialized")}(S||(t.AgentNotebookMaterializedRequest=S={})),function(e){e.type=new r.RequestType("agent/updatenotebookname")}(w||(t.UpdateAgentNotebookRunNameRequest=w={})),function(e){e.type=new r.RequestType("agent/deletematerializednotebook")}(T||(t.DeleteMaterializedNotebookRequest=T={})),function(e){e.type=new r.RequestType("agent/updatenotebookpin")}(_||(t.UpdateAgentNotebookRunPinRequest=_={})),function(e){e.type=new r.RequestType("agent/notebooktemplate")}(E||(t.AgentNotebookTemplateRequest=E={})),function(e){e.type=new r.RequestType("agent/createnotebook")}(C||(t.CreateAgentNotebookRequest=C={})),function(e){e.type=new r.RequestType("agent/deletenotebook")}(R||(t.DeleteAgentNotebookRequest=R={})),function(e){e.type=new r.RequestType("agent/updatenotebook")}(x||(t.UpdateAgentNotebookRequest=x={})),function(e){e.type=new r.RequestType("agent/alerts")}(I||(t.AgentAlertsRequest=I={})),function(e){e.type=new r.RequestType("agent/createalert")}(O||(t.CreateAgentAlertRequest=O={})),function(e){e.type=new r.RequestType("agent/updatealert")}(P||(t.UpdateAgentAlertRequest=P={})),function(e){e.type=new r.RequestType("agent/deletealert")}(D||(t.DeleteAgentAlertRequest=D={})),function(e){e.type=new r.RequestType("agent/operators")}(A||(t.AgentOperatorsRequest=A={})),function(e){e.type=new r.RequestType("agent/createoperator")}(N||(t.CreateAgentOperatorRequest=N={})),function(e){e.type=new r.RequestType("agent/updateoperator")}(k||(t.UpdateAgentOperatorRequest=k={})),function(e){e.type=new r.RequestType("agent/deleteoperator")}(j||(t.DeleteAgentOperatorRequest=j={})),function(e){e.type=new r.RequestType("agent/proxies")}(q||(t.AgentProxiesRequest=q={})),function(e){e.type=new r.RequestType("agent/createproxy")}(M||(t.CreateAgentProxyRequest=M={})),function(e){e.type=new r.RequestType("agent/updateproxy")}(L||(t.UpdateAgentProxyRequest=L={})),function(e){e.type=new r.RequestType("agent/deleteproxy")}(F||(t.DeleteAgentProxyRequest=F={})),function(e){e.type=new r.RequestType("security/credentials")}(U||(t.AgentCredentialsRequest=U={})),function(e){e.type=new r.RequestType("agent/schedules")}(B||(t.AgentJobSchedulesRequest=B={})),function(e){e.type=new r.RequestType("agent/createschedule")}(z||(t.CreateAgentJobScheduleRequest=z={})),function(e){e.type=new r.RequestType("agent/updateschedule")}(H||(t.UpdateAgentJobScheduleRequest=H={})),function(e){e.type=new r.RequestType("agent/deleteschedule")}(G||(t.DeleteAgentJobScheduleRequest=G={})),function(e){e[e.execute=0]="execute",e[e.script=1]="script",e[e.executeAndScript=2]="executeAndScript"}(V||(t.TaskExecutionMode=V={})),function(e){e.type=new r.RequestType("dacfx/export")}(W||(t.ExportRequest=W={})),function(e){e.type=new r.RequestType("dacfx/import")}($||(t.ImportRequest=$={})),function(e){e.type=new r.RequestType("dacfx/extract")}(K||(t.ExtractRequest=K={})),function(e){e.type=new r.RequestType("dacfx/deploy")}(Q||(t.DeployRequest=Q={})),function(e){e.type=new r.RequestType("dacfx/generateDeploymentScript")}(J||(t.GenerateDeployScriptRequest=J={})),function(e){e.type=new r.RequestType("dacfx/generateDeployPlan")}(X||(t.GenerateDeployPlanRequest=X={})),function(e){e.type=new r.RequestType("dacfx/getOptionsFromProfile")}(Y||(t.GetOptionsFromProfileRequest=Y={})),function(e){e.type=new r.RequestType("dacfx/validateStreamingJob")}(Z||(t.ValidateStreamingJobRequest=Z={})),function(e){e.type=new r.RequestType("dacfx/parseTSqlScript")}(ee||(t.ParseTSqlScriptRequest=ee={})),function(e){e.type=new r.RequestType("dacfx/savePublishProfile")}(te||(t.SavePublishProfileRequest=te={})),function(e){e.type=new r.RequestType("sqlProjects/createProject")}(ne||(t.CreateSqlProjectRequest=ne={})),function(e){e.type=new r.RequestType("sqlProjects/openProject")}(re||(t.OpenSqlProjectRequest=re={})),function(e){e.type=new r.RequestType("sqlProjects/closeProject")}(ie||(t.CloseSqlProjectRequest=ie={})),function(e){e.type=new r.RequestType("sqlProjects/getCrossPlatformCompatibility")}(oe||(t.GetCrossPlatformCompatibilityRequest=oe={})),function(e){e.type=new r.RequestType("sqlProjects/updateProjectForCrossPlatform")}(se||(t.UpdateProjectForCrossPlatformRequest=se={})),function(e){e.type=new r.RequestType("sqlProjects/getProjectProperties")}(ae||(t.GetProjectPropertiesRequest=ae={})),function(e){e.type=new r.RequestType("sqlProjects/setDatabaseSource")}(ce||(t.SetDatabaseSourceRequest=ce={})),function(e){e.type=new r.RequestType("sqlProjects/setDatabaseSchemaProvider")}(le||(t.SetDatabaseSchemaProviderRequest=le={})),function(e){e.type=new r.RequestType("sqlProjects/addSqlObjectScript")}(ue||(t.AddSqlObjectScriptRequest=ue={})),function(e){e.type=new r.RequestType("sqlProjects/deleteSqlObjectScript")}(de||(t.DeleteSqlObjectScriptRequest=de={})),function(e){e.type=new r.RequestType("sqlProjects/excludeSqlObjectScript")}(pe||(t.ExcludeSqlObjectScriptRequest=pe={})),function(e){e.type=new r.RequestType("sqlProjects/moveSqlObjectScript")}(he||(t.MoveSqlObjectScriptRequest=he={})),function(e){e.type=new r.RequestType("sqlProjects/getSqlObjectScripts")}(fe||(t.GetSqlObjectScriptsRequest=fe={})),function(e){e.type=new r.RequestType("sqlProjects/excludeFolder")}(me||(t.ExcludeFolderRequest=me={})),function(e){e.type=new r.RequestType("sqlProjects/moveFolder")}(ge||(t.MoveFolderRequest=ge={})),function(e){e.type=new r.RequestType("sqlProjects/addFolder")}(ye||(t.AddFolderRequest=ye={})),function(e){e.type=new r.RequestType("sqlProjects/deleteFolder")}(ve||(t.DeleteFolderRequest=ve={})),function(e){e.type=new r.RequestType("sqlProjects/getFolders")}(be||(t.GetFoldersRequest=be={})),function(e){e.type=new r.RequestType("sqlProjects/addPostDeploymentScript")}(Se||(t.AddPostDeploymentScriptRequest=Se={})),function(e){e.type=new r.RequestType("sqlProjects/addPreDeploymentScript")}(we||(t.AddPreDeploymentScriptRequest=we={})),function(e){e.type=new r.RequestType("sqlProjects/deletePostDeploymentScript")}(Te||(t.DeletePostDeploymentScriptRequest=Te={})),function(e){e.type=new r.RequestType("sqlProjects/deletePreDeploymentScript")}(_e||(t.DeletePreDeploymentScriptRequest=_e={})),function(e){e.type=new r.RequestType("sqlProjects/excludePostDeploymentScript")}(Ee||(t.ExcludePostDeploymentScriptRequest=Ee={})),function(e){e.type=new r.RequestType("sqlProjects/getPostDeploymentScripts")}(Ce||(t.GetPostDeploymentScriptsRequest=Ce={})),function(e){e.type=new r.RequestType("sqlProjects/excludePreDeploymentScript")}(Re||(t.ExcludePreDeploymentScriptRequest=Re={})),function(e){e.type=new r.RequestType("sqlProjects/movePostDeploymentScript")}(xe||(t.MovePostDeploymentScriptRequest=xe={})),function(e){e.type=new r.RequestType("sqlProjects/movePreDeploymentScript")}(Ie||(t.MovePreDeploymentScriptRequest=Ie={})),function(e){e.type=new r.RequestType("sqlProjects/getPreDeploymentScripts")}(Oe||(t.GetPreDeploymentScriptsRequest=Oe={})),function(e){e.type=new r.RequestType("sqlProjects/addNoneItem")}(Pe||(t.AddNoneItemRequest=Pe={})),function(e){e.type=new r.RequestType("sqlProjects/deleteNoneItem")}(De||(t.DeleteNoneItemRequest=De={})),function(e){e.type=new r.RequestType("sqlProjects/excludeNoneItem")}(Ae||(t.ExcludeNoneItemRequest=Ae={})),function(e){e.type=new r.RequestType("sqlProjects/getNoneItems")}(Ne||(t.GetNoneItemsRequest=Ne={})),function(e){e.type=new r.RequestType("sqlProjects/moveNoneItem")}(ke||(t.MoveNoneItemRequest=ke={})),function(e){e.type=new r.RequestType("sqlProjects/addSqlCmdVariable")}(je||(t.AddSqlCmdVariableRequest=je={})),function(e){e.type=new r.RequestType("sqlProjects/deleteSqlCmdVariable")}(qe||(t.DeleteSqlCmdVariableRequest=qe={})),function(e){e.type=new r.RequestType("sqlProjects/updateSqlCmdVariable")}(Me||(t.UpdateSqlCmdVariableRequest=Me={})),function(e){e.type=new r.RequestType("sqlProjects/getSqlCmdVariables")}(Le||(t.GetSqlCmdVariablesRequest=Le={})),function(e){e.type=new r.RequestType("sqlprojects/addDacpacReference")}(Fe||(t.AddDacpacReferenceRequest=Fe={})),function(e){e.type=new r.RequestType("sqlprojects/addSqlProjectReference")}(Ue||(t.AddSqlProjectReferenceRequest=Ue={})),function(e){e.type=new r.RequestType("sqlprojects/addSystemDatabaseReference")}(Be||(t.AddSystemDatabaseReferenceRequest=Be={})),function(e){e.type=new r.RequestType("sqlprojects/addNugetPackageReference")}(ze||(t.AddNugetPackageReferenceRequest=ze={})),function(e){e.type=new r.RequestType("sqlprojects/deleteDatabaseReference")}(He||(t.DeleteDatabaseReferenceRequest=He={})),function(e){e.type=new r.RequestType("sqlProjects/getDatabaseReferences")}(Ge||(t.GetDatabaseReferencesRequest=Ge={})),function(e){e.type=new r.RequestType("cms/createCms")}(Ve||(t.CreateCentralManagementServerRequest=Ve={})),function(e){e.type=new r.RequestType("cms/listRegisteredServers")}(We||(t.ListRegisteredServersRequest=We={})),function(e){e.type=new r.RequestType("cms/addRegisteredServer")}($e||(t.AddRegisteredServerRequest=$e={})),function(e){e.type=new r.RequestType("cms/removeRegisteredServer")}(Ke||(t.RemoveRegisteredServerRequest=Ke={})),function(e){e.type=new r.RequestType("cms/addCmsServerGroup")}(Qe||(t.AddServerGroupRequest=Qe={})),function(e){e.type=new r.RequestType("cms/removeCmsServerGroup")}(Je||(t.RemoveServerGroupRequest=Je={})),function(e){e.type=new r.RequestType("languageExtension/list")}(Xe||(t.LanguageExtensibilityListRequest=Xe={})),function(e){e.type=new r.RequestType("languageExtension/delete")}(Ye||(t.LanguageExtensibilityDeleteRequest=Ye={})),function(e){e.type=new r.RequestType("languageExtension/update")}(Ze||(t.LanguageExtensibilityUpdateRequest=Ze={})),function(e){e.type=new r.RequestType("schemaCompare/compare")}(et||(t.SchemaCompareRequest=et={})),function(e){e.type=new r.RequestType("schemaCompare/generateScript")}(tt||(t.SchemaCompareGenerateScriptRequest=tt={})),function(e){e.type=new r.RequestType("schemaCompare/publishDatabase")}(nt||(t.SchemaComparePublishDatabaseChangesRequest=nt={})),function(e){e.type=new r.RequestType("schemaCompare/publishProject")}(rt||(t.SchemaComparePublishProjectChangesRequest=rt={})),function(e){e.type=new r.RequestType("schemaCompare/getDefaultOptions")}(it||(t.SchemaCompareGetDefaultOptionsRequest=it={})),function(e){e.type=new r.RequestType("schemaCompare/includeExcludeNode")}(ot||(t.SchemaCompareIncludeExcludeNodeRequest=ot={})),function(e){e.type=new r.RequestType("schemaCompare/openScmp")}(st||(t.SchemaCompareOpenScmpRequest=st={})),function(e){e.type=new r.RequestType("schemaCompare/saveScmp")}(at||(t.SchemaCompareSaveScmpRequest=at={})),function(e){e.type=new r.RequestType("schemaCompare/cancel")}(ct||(t.SchemaCompareCancellationRequest=ct={})),function(e){e.type=new r.RequestType("assessment/invoke")}(lt||(t.SqlAssessmentInvokeRequest=lt={})),function(e){e.type=new r.RequestType("assessment/getAssessmentItems")}(ut||(t.GetSqlAssessmentItemsRequest=ut={})),function(e){e.type=new r.RequestType("assessment/generateScript")}(dt||(t.GenerateSqlAssessmentScriptRequest=dt={})),function(e){e.type=new r.RequestType("serialize/start")}(pt||(t.SerializeDataStartRequest=pt={})),function(e){e.type=new r.RequestType("serialize/continue")}(ht||(t.SerializeDataContinueRequest=ht={})),t.CompletionExtensionParams=class{},function(e){e.type=new r.RequestType("completion/extLoad")}(ft||(t.CompletionExtLoadRequest=ft={})),function(e){e.type=new r.RequestType("notebookconvert/convertnotebooktosql")}(mt||(t.ConvertNotebookToSqlRequest=mt={})),function(e){e.type=new r.RequestType("notebookconvert/convertsqltonotebook")}(gt||(t.ConvertSqlToNotebookRequest=gt={})),function(e){e.type=new r.RequestType("profiler/createsession")}(yt||(t.CreateXEventSessionRequest=yt={})),function(e){e.type=new r.RequestType("profiler/start")}(vt||(t.StartProfilingRequest=vt={})),function(e){e.type=new r.RequestType("profiler/stop")}(bt||(t.StopProfilingRequest=bt={})),function(e){e.type=new r.RequestType("profiler/pause")}(St||(t.PauseProfilingRequest=St={})),function(e){e.type=new r.RequestType("profiler/getsessions")}(wt||(t.GetXEventSessionsRequest=wt={})),function(e){e.type=new r.RequestType("profiler/disconnect")}(Tt||(t.DisconnectSessionRequest=Tt={})),function(e){e.type=new r.NotificationType("profiler/eventsavailable")}(_t||(t.ProfilerEventsAvailableNotification=_t={})),function(e){e.type=new r.NotificationType("profiler/sessionstopped")}(Et||(t.ProfilerSessionStoppedNotification=Et={})),function(e){e.type=new r.NotificationType("profiler/sessioncreated")}(Ct||(t.ProfilerSessionCreatedNotification=Ct={})),function(e){e.type=new r.RequestType("tabledesigner/initialize")}(Rt||(t.InitializeTableDesignerRequest=Rt={})),function(e){e.type=new r.RequestType("tabledesigner/processedit")}(xt||(t.ProcessTableDesignerEditRequest=xt={})),function(e){e.type=new r.RequestType("tabledesigner/publish")}(It||(t.PublishTableDesignerChangesRequest=It={})),function(e){e.type=new r.RequestType("tabledesigner/script")}(Ot||(t.TableDesignerGenerateScriptRequest=Ot={})),function(e){e.type=new r.RequestType("tabledesigner/generatepreviewreport")}(Pt||(t.TableDesignerGenerateChangePreviewReportRequest=Pt={})),function(e){e.type=new r.RequestType("tabledesigner/dispose")}(Dt||(t.DisposeTableDesignerRequest=Dt={})),function(e){e.type=new r.RequestType("blob/createSas")}(At||(t.CreateSasRequest=At={})),function(e){e.type=new r.RequestType("queryExecutionPlan/getExecutionPlan")}(Nt||(t.GetExecutionPlanRequest=Nt={})),function(e){e.type=new r.RequestType("queryExecutionPlan/compareExecutionPlanGraph")}(kt||(t.ExecutionPlanComparisonRequest=kt={})),function(e){e.type=new r.RequestType("metadata/getServerContext")}(jt||(t.GetServerContextualizationRequest=jt={})),function(e){e.type=new r.RequestType("objectManagement/initializeView")}(qt||(t.InitializeViewRequest=qt={})),function(e){e.type=new r.RequestType("objectManagement/save")}(Mt||(t.SaveObjectRequest=Mt={})),function(e){e.type=new r.RequestType("objectManagement/script")}(Lt||(t.ScriptObjectRequest=Lt={})),function(e){e.type=new r.RequestType("objectManagement/disposeView")}(Ft||(t.DisposeViewRequest=Ft={})),function(e){e.type=new r.RequestType("objectManagement/rename")}(Ut||(t.RenameObjectRequest=Ut={})),function(e){e.type=new r.RequestType("objectManagement/drop")}(Bt||(t.DropObjectRequest=Bt={})),function(e){e.type=new r.RequestType("objectManagement/search")}(zt||(t.SearchObjectRequest=zt={})),function(e){e.type=new r.RequestType("objectManagement/detachDatabase")}(Ht||(t.DetachDatabaseRequest=Ht={})),function(e){e.type=new r.RequestType("objectManagement/dropDatabase")}(Gt||(t.DropDatabaseRequest=Gt={})),function(e){e.type=new r.RequestType("objectManagement/attachDatabase")}(Vt||(t.AttachDatabaseRequest=Vt={})),function(e){e.type=new r.RequestType("admin/getdatafolder")}(Wt||(t.GetDataFolderRequest=Wt={})),function(e){e.type=new r.RequestType("admin/getbackupfolder")}($t||(t.GetBackupFolderRequest=$t={})),function(e){e.type=new r.RequestType("admin/getassociatedfiles")}(Kt||(t.GetAssociatedFilesRequest=Kt={})),function(e){e.type=new r.RequestType("objectManagement/purgeQueryStoreData")}(Qt||(t.PurgeQueryStoreDataRequest=Qt={})),t.DidChangeEncryptionIVKeyParams=class{},function(e){e.type=new r.NotificationType("connection/encryptionKeysChanged")}(Jt||(t.EncryptionKeysChangedNotification=Jt={})),function(e){e.type=new r.RequestType("connection/clearpooledconnections")}(Xt||(t.ClearPooledConnectionsRequest=Xt={})),function(e){e.type=new r.RequestType("queryStore/getRegressedQueriesSummary")}(Yt||(t.GetRegressedQueriesSummaryRequest=Yt={})),function(e){e.type=new r.RequestType("queryStore/getRegressedQueriesDetailedSummary")}(Zt||(t.GetRegressedQueriesDetailedSummaryRequest=Zt={})),function(e){e.type=new r.RequestType("queryStore/getTrackedQueriesReport")}(en||(t.GetTrackedQueriesReportRequest=en={})),function(e){e.type=new r.RequestType("queryStore/getHighVariationQueriesSummary")}(tn||(t.GetHighVariationQueriesSummaryRequest=tn={})),function(e){e.type=new r.RequestType("queryStore/getHighVariationQueriesDetailedSummary")}(nn||(t.GetHighVariationQueriesDetailedSummaryRequest=nn={})),function(e){e.type=new r.RequestType("queryStore/getHighVariationQueriesDetailedSummaryWithWaitStats")}(rn||(t.GetHighVariationQueriesDetailedSummaryWithWaitStatsRequest=rn={})),function(e){e.type=new r.RequestType("queryStore/getTopResourceConsumersSummary")}(on||(t.GetTopResourceConsumersSummaryRequest=on={})),function(e){e.type=new r.RequestType("queryStore/getTopResourceConsumersDetailedSummary")}(sn||(t.GetTopResourceConsumersDetailedSummaryRequest=sn={})),function(e){e.type=new r.RequestType("queryStore/getTopResourceConsumersDetailedSummaryWithWaitStats")}(an||(t.GetTopResourceConsumersDetailedSummaryWithWaitStatsRequest=an={})),function(e){e.type=new r.RequestType("queryStore/getPlanSummaryChartView")}(cn||(t.GetPlanSummaryChartViewRequest=cn={})),function(e){e.type=new r.RequestType("queryStore/getPlanSummaryGridView")}(ln||(t.GetPlanSummaryGridViewRequest=ln={})),function(e){e.type=new r.RequestType("queryStore/getForcedPlan")}(un||(t.GetForcedPlanRequest=un={})),function(e){e.type=new r.RequestType("queryStore/getForcedPlanQueriesReport")}(dn||(t.GetForcedPlanQueriesReportRequest=dn={})),function(e){e.type=new r.RequestType("queryStore/getOverallResourceConsumptionReport")}(pn||(t.GetOverallResourceConsumptionReportRequest=pn={}))},4826:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerId=t.serviceName=void 0,t.serviceName="SerilizationProvider",t.providerId="serilizationProvider"},8311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteCredentialRequest=t.SaveCredentialRequest=t.ReadCredentialRequest=void 0;const r=n(3056);var i,o,s;!function(e){e.type=new r.RequestType("credential/read")}(i||(t.ReadCredentialRequest=i={})),function(e){e.type=new r.RequestType("credential/save")}(o||(t.SaveCredentialRequest=o={})),function(e){e.type=new r.RequestType("credential/delete")}(s||(t.DeleteCredentialRequest=s={}))},1863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CredentialStore=void 0;const r=n(5868),i=n(3056),o=n(4826),s=n(8682),a=n(7035);t.CredentialStore=class{constructor(e,t){this.context=e,t&&(this._config=JSON.parse(JSON.stringify(t)),this._config.executableFiles=["MicrosoftSqlToolsCredentials.exe","MicrosoftSqlToolsCredentials"]),this.context=e,this._logPath=this.context.extensionContext.logPath}async start(){let e={providerId:o.providerId,features:[a.SqlCredentialService.asFeature(this.context)]};const t=await s.getOrDownloadServer(this._config),n=this.generateServerOptions(t);this._client=new r.SqlOpsDataClient(o.serviceName,n,e),this._client.start()}async dispose(){this._client&&await this._client.stop()}generateServerOptions(e){return{command:e,args:s.getCommonLaunchArgsAndCleanupOldLogFiles(this._logPath,"credentialstore.log",e),transport:i.TransportKind.stdio}}}},7035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlCredentialService=void 0;const r=n(5868),i=n(8682),o=n(8311),s=n(9072),a=n(4489);class c extends r.SqlOpsFeature{static asFeature(e){return class extends c{constructor(t){super(e,t),this._secretStorage=e.extensionContext.secrets}fillClientCapabilities(e){i.ensure(i.ensure(e,"credentials"),"credentials").dynamicRegistration=!0}async initialize(e){this.register(this.messages,{id:a.generateUuid(),registerOptions:void 0})}registerProvider(e){return s.credentials.registerProvider({deleteCredential:async e=>{if(i.isLinux)try{return await this._secretStorage.delete(e),!0}catch(e){console.log("credential does not exist in native secret store")}return this._client.sendRequest(o.DeleteCredentialRequest.type,{credentialId:e})},readCredential:async e=>i.isLinux?{credentialId:e,password:await this._secretStorage.get(e)||""}:this._client.sendRequest(o.ReadCredentialRequest.type,{credentialId:e}),saveCredential:async(e,t)=>i.isLinux?(await this._secretStorage.store(e,t),!0):this._client.sendRequest(o.SaveCredentialRequest.type,{credentialId:e,password:t}),handle:0})}}}fillClientCapabilities(e){}initialize(e){}registerProvider(e){return{dispose:()=>{}}}constructor(e,t){super(t,c.messagesTypes),this.client=t}}t.SqlCredentialService=c,c.messagesTypes=[o.DeleteCredentialRequest.type,o.SaveCredentialRequest.type,o.ReadCredentialRequest.type]},2862:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DacFxService=void 0;const r=n(8129),i=n(8682),o=n(6825),s=n(5868);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"dacfx").dacfx=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.DacFxService,this)}async exportBacpac(e,t,n,r){const i={databaseName:e,packageFilePath:t,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.ExportRequest.type,i)}async importBacpac(e,t,n,r){const i={packageFilePath:e,databaseName:t,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.ImportRequest.type,i)}async extractDacpac(e,t,n,r,i,s){const a={databaseName:e,packageFilePath:t,applicationName:n,applicationVersion:r,ownerUri:i,extractTarget:0,taskExecutionMode:s};return this.runWithErrorHandling(o.ExtractRequest.type,a)}async createProjectFromDatabase(e,t,n,r,i,s,a,c){const l={databaseName:e,packageFilePath:t,applicationName:n,applicationVersion:r,ownerUri:i,extractTarget:s,taskExecutionMode:a,includePermissions:c};return this.runWithErrorHandling(o.ExtractRequest.type,l)}async deployDacpac(e,t,n,r,i,s,a){const c={packageFilePath:e,databaseName:t,upgradeExisting:n,sqlCommandVariableValues:s?Object.fromEntries(s):void 0,deploymentOptions:a,ownerUri:r,taskExecutionMode:i};return this.runWithErrorHandling(o.DeployRequest.type,c)}async generateDeployScript(e,t,n,r,i,s){const a={packageFilePath:e,databaseName:t,sqlCommandVariableValues:i?Object.fromEntries(i):void 0,deploymentOptions:s,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.GenerateDeployScriptRequest.type,a)}async generateDeployPlan(e,t,n,r){const i={packageFilePath:e,databaseName:t,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.GenerateDeployPlanRequest.type,i)}async getOptionsFromProfile(e){const t={profilePath:e};return this.runWithErrorHandling(o.GetOptionsFromProfileRequest.type,t)}async validateStreamingJob(e,t){const n={packageFilePath:e,createStreamingJobTsql:t};return this.runWithErrorHandling(o.ValidateStreamingJobRequest.type,n)}async parseTSqlScript(e,t){const n={filePath:e,databaseSchemaProvider:t};return this.runWithErrorHandling(o.ParseTSqlScriptRequest.type,n)}async savePublishProfile(e,t,n,r,i){const s={profilePath:e,databaseName:t,connectionString:n,sqlCommandVariableValues:r?Object.fromEntries(r):void 0,deploymentOptions:i};return this.runWithErrorHandling(o.SavePublishProfileRequest.type,s)}}t.DacFxService=a},8742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBookExtensionContributions=void 0;const r=n(9496),i=n(1017),o=n(6447),s=n(7274);var a;!function(e){e.merge=function(e,t){return e?t?e.concat(t):e:t},e.equal=function(e,t){return e.name===t.name&&e.path===t.path&&e.when===t.when},e.fromExtension=function(e){const t=e.packageJSON?.contributes;return t?function(e,t){return e["notebook.books"]?((e,t)=>{if(!t)return[];Array.isArray(t)||(t=[t]);let n=t.map((t=>{try{t.path=((e,t)=>r.Uri.file(i.join(e.extensionPath,t)))(e,t.path).fsPath}catch(e){}return t}));return n})(t,e["notebook.books"]):[]}(t,e):[]}}(a||(a={}));class c extends s.Disposable{constructor(e){super(),this.extensionPath=e,this._contributionCommands=[],this._onContributionsChanged=this._register(new r.EventEmitter),this.onContributionsChanged=this._onContributionsChanged.event,r.extensions.onDidChange((async()=>{const e=this.getCurrentContributions(),t=this._contributions||void 0;t&&o.equals(t,e,a.equal)||(await this.unregisterCommands(),this._contributions=e,await this.registerCommands(),this._onContributionsChanged.fire(this))}),void 0,this._disposables),this.registerCommands().catch((e=>console.log(`Error registering contributed book commands : ${e}`)))}get contributions(){return this._contributions||(this._contributions=this.getCurrentContributions()),this._contributions}getCurrentContributions(){return r.extensions.all.map(a.fromExtension).reduce(a.merge,[])}async registerCommands(){await Promise.all(this.contributions.map((async e=>{let t=i.basename(e.path);await r.commands.executeCommand("setContext",t,!0),this._contributionCommands.push(r.commands.registerCommand("books."+t,(async t=>{await r.commands.executeCommand("bookTreeView.openBook",e.path,!0,t)})))})))}async unregisterCommands(){this._contributionCommands.forEach((e=>e.dispose())),this._contributionCommands=[],await Promise.all(this.contributions.map((async e=>{let t=i.basename(e.path);await r.commands.executeCommand("setContext",t,!1)})))}}t.getBookExtensionContributions=function(e){return new c(e.extensionPath)}},4831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerBooksWidget=void 0;const r=n(9496),i=n(9072);t.registerBooksWidget=function(e){i.ui.registerModelViewProvider("books-widget",(async t=>{const n=t.modelBuilder.flexContainer().withLayout({flexFlow:"column",width:"100%",height:"100%"}).component(),i=t.modelBuilder.flexContainer().withLayout({flexFlow:"column",width:"270px",height:"100%",position:"absolute"}).component();let o=e.contributions.map((e=>{const n=t.modelBuilder.flexContainer().withLayout({flexFlow:"row"}).component(),i=t.modelBuilder.button().withProps({label:e.name,title:e.name,secondary:!0}).component();return i.onDidClick((()=>{var t;t=r.Uri.file(e.path),r.commands.executeCommand("bookTreeView.openBook",t.fsPath,!0,void 0)})),n.addItem(i,{CSSStyles:{width:"100%",color:"#0078d4","text-decoration":"underline","padding-top":"10px","text-align":"left"}}),n}));n.addItems(o,{CSSStyles:{"padding-left":"10px","border-top":"solid 1px #ccc","box-sizing":"border-box","user-select":"text"}}),i.addItem(n,{CSSStyles:{"padding-top":"25px","padding-left":"5px"}}),await t.initializeModel(i)}))}},9782:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TSC_ReadMoreLink=t.TSC_InstructionText=t.TSC_EnableTrustServerCert=t.TSC_OptionName=t.TSC_ActionId=t.ConnectionErrorDialogTitle=t.MssqlConnectionTelemetryView=t.MssqlCertValidationFailedErrorCode=t.MssqlPasswordResetErrorCode=void 0;const r=n(3403).loadMessageBundle(n(1017).join(__dirname,"errorDiagnostics\\errorDiagnosticsConstants.ts"));t.MssqlPasswordResetErrorCode=[18488,18487],t.MssqlCertValidationFailedErrorCode=-2146893019,t.MssqlConnectionTelemetryView="MssqlConnectionErrorDialog",t.ConnectionErrorDialogTitle=r(0,null),t.TSC_ActionId="enableTrustServerCertificate",t.TSC_OptionName="trustServerCertificate",t.TSC_EnableTrustServerCert=r(1,null),t.TSC_InstructionText=r(2,null),t.TSC_ReadMoreLink="https://learn.microsoft.com/sql/database-engine/configure-windows/enable-encrypted-connections-to-the-database-engine"},368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDiagnosticsProvider=void 0;const r=n(9072),i=n(5868),o=n(4489),s=n(8129),a=n(9782),c=n(8682);class l extends i.SqlOpsFeature{static asFeature(e){return class extends l{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}convertToIConnectionProfile(e){return{providerName:e.providerId,id:e.connectionId,connectionName:e.connectionName,serverName:e.serverName,databaseName:e.databaseName,userName:e.userName,password:e.password,authenticationType:e.authenticationType,savePassword:e.savePassword,groupFullName:e.groupFullName,groupId:e.groupId,saveProfile:e.savePassword,azureTenantId:e.azureTenantId,options:e.options}}registerProvider(e){return r.diagnostics.registerDiagnosticsProvider({targetProviderId:s.providerId},{handleConnectionError:async(e,t)=>{let n=this.convertToIConnectionProfile(t);return a.MssqlPasswordResetErrorCode.includes(e.errorCode)?((0,c.logDebug)(`ErrorDiagnosticsProvider: Error Code ${e.errorCode} requires user to change their password, launching change password dialog.`),await this.handleChangePassword(n)):e.errorCode===a.MssqlCertValidationFailedErrorCode?((0,c.logDebug)(`ErrorDiagnosticsProvider: Error Code ${e.errorCode} indicates certificate validation has failed, launching error dialog with instructionText.`),await this.showCertValidationDialog(n,e.errorMessage,e.messageDetails)):((0,c.logDebug)(`ErrorDiagnosticsProvider: No error handler found for errorCode ${e.errorCode}.`),{handled:!1})}})}async showCertValidationDialog(e,t,n){try{let i=[],o={id:a.TSC_ActionId,label:a.TSC_EnableTrustServerCert,isPrimary:!0};return i.push(o),await r.window.openCustomErrorDialog({severity:r.window.MessageLevel.Error,headerTitle:a.ConnectionErrorDialogTitle,message:t,messageDetails:n,telemetryView:a.MssqlConnectionTelemetryView,instructionText:a.TSC_InstructionText,readMoreLink:a.TSC_ReadMoreLink,actions:i})===a.TSC_ActionId?(e.options[a.TSC_OptionName]=!0,{handled:!0,reconnect:!0,options:e.options}):{handled:!0,reconnect:!1}}catch(e){console.error(`Unexpected exception occurred when showing certificate validation custom dialog: ${e}`)}return{handled:!1}}async handleChangePassword(e){try{const t=await r.connection.openChangePasswordDialog(e);if(t)return e.options.password=t,{handled:!0,reconnect:!0,options:e.options}}catch(e){console.error(`Change password failed unexpectedly with error: ${e}`)}return{handled:!1}}}}fillClientCapabilities(e){}initialize(e){}constructor(e,t){super(t,l.messagesTypes),this.client=t}registerProvider(e){return{dispose:()=>{}}}}t.ErrorDiagnosticsProvider=l,l.messagesTypes=[]},7476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerContextualizationServiceFeature=t.ExecutionPlanServiceFeature=t.TableDesignerFeature=t.ProfilerFeature=t.SqlAssessmentServicesFeature=t.SerializationFeature=t.AgentServicesFeature=t.AccountFeature=t.TelemetryFeature=void 0;const r=n(3403),i=n(5868),o=n(9496),s=n(7475),a=n(6825),c=n(9072),l=n(8682),u=n(4489),d=n(7326),p=n(5760),h=r.loadMessageBundle(n(1017).join(__dirname,"features.ts"));t.TelemetryFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){l.ensure(e,"telemetry").telemetry=!0}initialize(){this._client.onNotification(a.TelemetryNotification.type,(e=>{s.TelemetryReporter.sendTelemetryEvent(e.params.eventName,e.params.properties,e.params.measures)}))}};class f{constructor(e){this._client=e}fillClientCapabilities(e){}initialize(){this.tokenCache=new d.DataItemCache(this.getToken,10),this._client.onRequest(a.SecurityTokenRequest.type,(async e=>await this.tokenCache.getData(e))),this._client.onNotification(a.RefreshTokenNotification.type,(async e=>{let t=await this.refreshToken(e);if(!t)throw o.window.showErrorMessage(p.tokenRefreshFailed("autocompletion")),console.log(`Token Refresh Failed ${e.toString()}`),Error(p.tokenRefreshFailed("autocompletion"));this._client.sendNotification(a.TokenRefreshedNotification.type,t)}))}async getToken(e){const t=await c.accounts.getAllAccounts();let n;if(t.length<1)return void o.window.showErrorMessage(h(0,null));if(t.length>1){let e={ignoreFocusOut:!0,placeHolder:h(1,null)},r=t.map((e=>new f.AccountQuickPickItem(e))),i=await o.window.showQuickPick(r,e);if(!i)return void o.window.showErrorMessage(h(2,null));n=i.account}else n=t[0];const r=n.properties.tenants.find((t=>e.authority.includes(t.id))),i=h(3,null,n.key.accountId);if(!r)return void o.window.showErrorMessage(i);const s=await c.accounts.getAccountSecurityToken(n,r.id,c.AzureResource.AzureKeyVault);if(s?.token)return{accountKey:JSON.stringify(n.key),token:s.token};o.window.showErrorMessage(i)}async refreshToken(e){const t=(await c.accounts.getAllAccounts()).find((t=>t.key.accountId===e.accountId));if(!t)throw console.log(`Failed to find azure account ${e.accountId} when executing token refresh`),Error(p.failedToFindAccount(e.accountId));const n=t.properties.tenants.find((t=>t.id===e.tenantId));if(!n)throw console.log(`Failed to find tenant ${e.tenantId} in account ${t.displayInfo.displayName} when refreshing security token`),Error(p.failedToFindTenants(e.tenantId,t.displayInfo.displayName));const r=await c.accounts.getAccountSecurityToken(t,n.id,c.AzureResource.ResourceManagement);if(!r)throw console.log("Editor token refresh failed, autocompletion will be disabled until the editor is disconnected and reconnected"),Error(p.tokenRefreshFailedNoSecurityToken);return{token:r.token,expiresOn:r.expiresOn,uri:e.uri}}}t.AccountFeature=f,f.AccountQuickPickItem=class{constructor(e){this.account=e,this.label=e.displayInfo.displayName}};class m extends i.SqlOpsFeature{constructor(e){super(e,m.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;let n=this,r=()=>{n.onUpdatedHandler&&n.onUpdatedHandler()};return c.dataprotocol.registerAgentServicesProvider({providerId:t.providerId,getJobs:e=>{let n={ownerUri:e,jobId:""};return t.sendRequest(a.AgentJobsRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.AgentJobsRequest.type,e),Promise.reject(e))))},getJobHistory:(e,n,r)=>{let i={ownerUri:e,jobId:n,jobName:r};return t.sendRequest(a.AgentJobHistoryRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentJobHistoryRequest.type,e),Promise.reject(e))))},jobAction:(e,n,r)=>{let i={ownerUri:e,jobName:n,action:r};return t.sendRequest(a.AgentJobActionRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentJobActionRequest.type,e),Promise.reject(e))))},createJob:(e,n)=>{let i={ownerUri:e,job:n},o=a.CreateAgentJobRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateJob:(e,n,i)=>{let o={ownerUri:e,originalJobName:n,job:i},s=a.UpdateAgentJobRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteJob:(e,n)=>{let i={ownerUri:e,job:n},o=a.DeleteAgentJobRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getJobDefaults:e=>{let n={ownerUri:e},r=a.AgentJobDefaultsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createJobStep:(e,n)=>{let i={ownerUri:e,step:n},o=a.CreateAgentJobStepRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateJobStep:(e,n,i)=>{let o={ownerUri:e,originalJobStepName:n,step:i},s=a.UpdateAgentJobStepRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteJobStep:(e,n)=>{let i={ownerUri:e,step:n},o=a.DeleteAgentJobStepRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getNotebooks:e=>{let n={ownerUri:e};return t.sendRequest(a.AgentNotebooksRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebooksRequest.type,e),Promise.reject(e))))},getNotebookHistory:(e,n,r,i)=>{let o={ownerUri:e,jobId:n,jobName:r,targetDatabase:i};return t.sendRequest(a.AgentNotebookHistoryRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebookHistoryRequest.type,e),Promise.reject(e))))},getMaterializedNotebook:(e,n,r)=>{let i={ownerUri:e,targetDatabase:n,notebookMaterializedId:r};return t.sendRequest(a.AgentNotebookMaterializedRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebookMaterializedRequest.type,e),Promise.reject(e))))},getTemplateNotebook:(e,n,r)=>{let i={ownerUri:e,targetDatabase:n,jobId:r};return t.sendRequest(a.AgentNotebookTemplateRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebookTemplateRequest.type,e),Promise.reject(e))))},createNotebook:(e,n,i)=>{let o={ownerUri:e,notebook:n,templateFilePath:i},s=a.CreateAgentNotebookRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},updateNotebook:(e,n,i,o)=>{let s={ownerUri:e,originalNotebookName:n,notebook:i,templateFilePath:o},c=a.UpdateAgentNotebookRequest.type;return t.sendRequest(c,s).then((e=>(r(),e)),(e=>(t.logFailedRequest(c,e),Promise.reject(e))))},deleteMaterializedNotebook:(e,n,r)=>{let i={ownerUri:e,targetDatabase:r,agentNotebookHistory:n};return t.sendRequest(a.DeleteMaterializedNotebookRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.DeleteMaterializedNotebookRequest.type,e),Promise.reject(e))))},updateNotebookMaterializedName:(e,n,r,i)=>{let o={ownerUri:e,targetDatabase:r,agentNotebookHistory:n,materializedNotebookName:i};return t.sendRequest(a.UpdateAgentNotebookRunNameRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(a.UpdateAgentNotebookRunNameRequest.type,e),Promise.reject(e))))},updateNotebookMaterializedPin:(e,n,r,i)=>{let o={ownerUri:e,targetDatabase:r,agentNotebookHistory:n,materializedNotebookPin:i};return t.sendRequest(a.UpdateAgentNotebookRunPinRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(a.UpdateAgentNotebookRunPinRequest.type,e),Promise.reject(e))))},deleteNotebook:(e,n)=>{let i={ownerUri:e,notebook:n},o=a.DeleteAgentNotebookRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getAlerts:e=>{let n={ownerUri:e},r=a.AgentAlertsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createAlert:(e,n)=>{let i={ownerUri:e,alert:n},o=a.CreateAgentAlertRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateAlert:(e,n,i)=>{let o={ownerUri:e,originalAlertName:n,alert:i},s=a.UpdateAgentAlertRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteAlert:(e,n)=>{let i={ownerUri:e,alert:n},o=a.DeleteAgentAlertRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getOperators:e=>{let n={ownerUri:e},r=a.AgentOperatorsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createOperator:(e,n)=>{let i={ownerUri:e,operator:n},o=a.CreateAgentOperatorRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateOperator:(e,n,i)=>{let o={ownerUri:e,originalOperatorName:n,operator:i},s=a.UpdateAgentOperatorRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteOperator:(e,n)=>{let i={ownerUri:e,operator:n},o=a.DeleteAgentOperatorRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getProxies:e=>{let n={ownerUri:e},r=a.AgentProxiesRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createProxy:(e,n)=>{let i={ownerUri:e,proxy:n},o=a.CreateAgentProxyRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateProxy:(e,n,i)=>{let o={ownerUri:e,originalProxyName:n,proxy:i},s=a.UpdateAgentProxyRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteProxy:(e,n)=>{let i={ownerUri:e,proxy:n},o=a.DeleteAgentProxyRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getCredentials:e=>{let n={ownerUri:e},r=a.AgentCredentialsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},getJobSchedules:e=>{let n={ownerUri:e},r=a.AgentJobSchedulesRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createJobSchedule:(e,n)=>{let i={ownerUri:e,schedule:n},o=a.CreateAgentJobScheduleRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateJobSchedule:(e,n,i)=>{let o={ownerUri:e,originalScheduleName:n,schedule:i},s=a.UpdateAgentJobScheduleRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteJobSchedule:(e,n)=>{let i={ownerUri:e,schedule:n},o=a.DeleteAgentJobScheduleRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},registerOnUpdated:e=>{n.onUpdatedHandler=e}})}}t.AgentServicesFeature=m,m.messagesTypes=[a.AgentJobsRequest.type,a.AgentJobHistoryRequest.type,a.AgentJobActionRequest.type];class g extends i.SqlOpsFeature{constructor(e){super(e,g.messageTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerSerializationProvider({providerId:t.providerId,startSerialization:e=>t.sendRequest(a.SerializeDataStartRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(a.SerializeDataStartRequest.type,e),Promise.resolve({succeeded:!1,messages:l.getErrorMessage(e)})))),continueSerialization:e=>t.sendRequest(a.SerializeDataContinueRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(a.SerializeDataContinueRequest.type,e),Promise.resolve({succeeded:!1,messages:l.getErrorMessage(e)}))))})}}t.SerializationFeature=g,g.messageTypes=[a.SerializeDataStartRequest.type,a.SerializeDataContinueRequest.type];class y extends i.SqlOpsFeature{constructor(e){super(e,y.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerSqlAssessmentServicesProvider({providerId:t.providerId,assessmentInvoke:async(e,n)=>{let r={ownerUri:e,targetType:n};try{return t.sendRequest(a.SqlAssessmentInvokeRequest.type,r)}catch(e){throw t.logFailedRequest(a.SqlAssessmentInvokeRequest.type,e),e}},getAssessmentItems:async(e,n)=>{let r={ownerUri:e,targetType:n};try{return t.sendRequest(a.GetSqlAssessmentItemsRequest.type,r)}catch(e){throw t.logFailedRequest(a.GetSqlAssessmentItemsRequest.type,e),e}},generateAssessmentScript:async e=>{let n={items:e,taskExecutionMode:c.TaskExecutionMode.script,targetServerName:"",targetDatabaseName:""};try{return t.sendRequest(a.GenerateSqlAssessmentScriptRequest.type,n)}catch(e){throw t.logFailedRequest(a.GenerateSqlAssessmentScriptRequest.type,e),e}}})}}t.SqlAssessmentServicesFeature=y,y.messagesTypes=[a.SqlAssessmentInvokeRequest.type,a.GetSqlAssessmentItemsRequest.type];class v extends i.SqlOpsFeature{constructor(e){super(e,v.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(a.ProfilerEventsAvailableNotification.type),r=this.registerNotificationEmitter(a.ProfilerSessionStoppedNotification.type),i=this.registerNotificationEmitter(a.ProfilerSessionCreatedNotification.type);return c.dataprotocol.registerProfilerProvider({providerId:t.providerId,connectSession:e=>Promise.resolve(!1),disconnectSession:e=>{let n={ownerUri:e};return t.sendRequest(a.DisconnectSessionRequest.type,n).then((e=>!0),(e=>(t.logFailedRequest(a.DisconnectSessionRequest.type,e),Promise.reject(e))))},registerOnSessionEventsAvailable:e=>{n.event((t=>{e({sessionId:t.ownerUri,events:t.events,eventsLost:t.eventsLost})}))},registerOnSessionStopped:e=>{r.event((t=>{e({ownerUri:t.ownerUri,sessionId:t.sessionId})}))},registerOnProfilerSessionCreated:e=>{i.event((t=>{e({ownerUri:t.ownerUri,sessionName:t.sessionName,templateName:t.templateName})}))},createSession:(e,n,r)=>{let i={ownerUri:e,sessionName:n,template:r};return t.sendRequest(a.CreateXEventSessionRequest.type,i).then((e=>!0),(e=>(t.logFailedRequest(a.CreateXEventSessionRequest.type,e),Promise.reject(e))))},startSession:(e,n,r=c.ProfilingSessionType.RemoteSession)=>{let i={ownerUri:e,sessionName:n,sessionType:r};return t.sendRequest(a.StartProfilingRequest.type,i).then((e=>!0),(e=>(t.logFailedRequest(a.StartProfilingRequest.type,e),Promise.reject(e))))},stopSession:e=>{let n={ownerUri:e};return t.sendRequest(a.StopProfilingRequest.type,n).then((e=>!0),(e=>(t.logFailedRequest(a.StopProfilingRequest.type,e),Promise.reject(e))))},pauseSession:e=>{let n={ownerUri:e};return t.sendRequest(a.PauseProfilingRequest.type,n).then((e=>!0),(e=>(t.logFailedRequest(a.PauseProfilingRequest.type,e),Promise.reject(e))))},getXEventSessions:e=>{let n={ownerUri:e};return t.sendRequest(a.GetXEventSessionsRequest.type,n).then((e=>e.sessions),(e=>(t.logFailedRequest(a.GetXEventSessionsRequest.type,e),Promise.reject(e))))}})}}t.ProfilerFeature=v,v.messagesTypes=[a.StartProfilingRequest.type,a.StopProfilingRequest.type,a.ProfilerEventsAvailableNotification.type];class b extends i.SqlOpsFeature{constructor(e){super(e,b.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerTableDesignerProvider({providerId:t.providerId,initializeTableDesigner:e=>{try{return t.sendRequest(a.InitializeTableDesignerRequest.type,e)}catch(e){return t.logFailedRequest(a.InitializeTableDesignerRequest.type,e),Promise.reject(e)}},processTableEdit:(e,n)=>{let r={tableInfo:e,tableChangeInfo:n};try{return t.sendRequest(a.ProcessTableDesignerEditRequest.type,r)}catch(e){return t.logFailedRequest(a.ProcessTableDesignerEditRequest.type,e),Promise.reject(e)}},publishChanges:e=>{try{return t.sendRequest(a.PublishTableDesignerChangesRequest.type,e)}catch(e){return t.logFailedRequest(a.PublishTableDesignerChangesRequest.type,e),Promise.reject(e)}},generateScript:e=>{try{return t.sendRequest(a.TableDesignerGenerateScriptRequest.type,e)}catch(e){return t.logFailedRequest(a.TableDesignerGenerateScriptRequest.type,e),Promise.reject(e)}},generatePreviewReport:e=>{try{return t.sendRequest(a.TableDesignerGenerateChangePreviewReportRequest.type,e)}catch(e){return t.logFailedRequest(a.TableDesignerGenerateChangePreviewReportRequest.type,e),Promise.reject(e)}},disposeTableDesigner:e=>{try{return t.sendRequest(a.DisposeTableDesignerRequest.type,e)}catch(e){return t.logFailedRequest(a.DisposeTableDesignerRequest.type,e),Promise.reject(e)}}})}}t.TableDesignerFeature=b,b.messagesTypes=[a.ProcessTableDesignerEditRequest.type];class S extends i.SqlOpsFeature{constructor(e){super(e,S.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerExecutionPlanProvider({providerId:t.providerId,getExecutionPlan:e=>{const n={graphInfo:e};return t.sendRequest(a.GetExecutionPlanRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.GetExecutionPlanRequest.type,e),Promise.reject(e))))},compareExecutionPlanGraph:(e,n)=>{const r={firstExecutionPlanGraphInfo:e,secondExecutionPlanGraphInfo:n};return t.sendRequest(a.ExecutionPlanComparisonRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(a.ExecutionPlanComparisonRequest.type,e),Promise.reject(e))))},isExecutionPlan:e=>new Promise((t=>{let n=!1,r="";return e.includes("ShowPlanXML")&&(n=!0,r="sqlplan"),t({isExecutionPlan:n,queryExecutionPlanFileExtension:r})}))})}}t.ExecutionPlanServiceFeature=S,S.messagesTypes=[a.GetExecutionPlanRequest.type];class w extends i.SqlOpsFeature{constructor(e){super(e,w.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerServerContextualizationProvider({providerId:t.providerId,getServerContextualization:e=>{const n={ownerUri:e};return t.sendRequest(a.GetServerContextualizationRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.GetServerContextualizationRequest.type,e),Promise.reject(e))))}})}}t.ServerContextualizationServiceFeature=w,w.messagesTypes=[a.GetServerContextualizationRequest.type]},5150:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconPathHelper=void 0;class n{static setExtensionContext(e){n.extensionContext=e,n.delete={dark:n.extensionContext.asAbsolutePath("resources/dark/delete_inverse.svg"),light:n.extensionContext.asAbsolutePath("resources/light/delete.svg")},n.user={dark:n.extensionContext.asAbsolutePath("resources/dark/user_inverse.svg"),light:n.extensionContext.asAbsolutePath("resources/light/user.svg")},n.group={dark:n.extensionContext.asAbsolutePath("resources/dark/group_inverse.svg"),light:n.extensionContext.asAbsolutePath("resources/light/group.svg")},n.folder={dark:n.extensionContext.asAbsolutePath("resources/folder.svg"),light:n.extensionContext.asAbsolutePath("resources/folder.svg")}}}t.IconPathHelper=n},2846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MssqlIconProvider=void 0;const r=n(9072),i=n(8129);t.MssqlIconProvider=class{constructor(){this.providerId=i.sqlProviderName}getConnectionIconId(e,t){let n;return e.providerName===i.sqlProviderName&&(t.engineEditionId===r.DatabaseEngineEdition.SqlManagedInstance&&(n="mssql:managedInstance"),t.isCloud&&(n="mssql:cloud")),Promise.resolve(n)}}},9081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageExtensionService=void 0;const r=n(8129),i=n(8682),o=n(6825),s=n(5868);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"languageExtension").languageExtension=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.LanguageExtensionService,this)}async listLanguages(e){const t={ownerUri:e};return this.runWithErrorHandling(o.LanguageExtensibilityListRequest.type,t).then((e=>e.languages))}async updateLanguage(e,t){const n={ownerUri:e,language:t};return this.runWithErrorHandling(o.LanguageExtensibilityUpdateRequest.type,n).then()}async deleteLanguage(e,t){const n={ownerUri:e,languageName:t};return this.runWithErrorHandling(o.LanguageExtensibilityDeleteRequest.type,n).then()}}t.LanguageExtensionService=a},5760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsupportedPlatform=t.noDocumentFound=t.noConvertResult=t.failedToFindAccount=t.tokenRefreshFailedNoSecurityToken=t.tokenRefreshFailed=t.failedToFindTenants=void 0;const r=n(3403).loadMessageBundle(n(1017).join(__dirname,"localizedConstants.ts"));t.failedToFindTenants=function(e,t){return r(0,null,e,t)},t.tokenRefreshFailed=function(e){return r(1,null,e)},t.tokenRefreshFailedNoSecurityToken=r(2,null),t.failedToFindAccount=function(e){return r(3,null,e)},t.noConvertResult=r(4,null),t.noDocumentFound=function(e){return r(5,null,e)},t.unsupportedPlatform=function(e){return r(6,null,e)}},6469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMssqlApi=void 0;const r=n(8129);t.createMssqlApi=function(e,t){return{get sqlToolsServicePath(){return t.installDirectory},get cmsService(){return e.getService(r.CmsService)},get dacFx(){return e.getService(r.DacFxService)},get sqlProjects(){return e.getService(r.SqlProjectsService)},get schemaCompare(){return e.getService(r.SchemaCompareService)},get languageExtension(){return e.getService(r.LanguageExtensionService)},get sqlAssessment(){return e.getService(r.SqlAssessmentService)},get azureBlob(){return e.getService(r.AzureBlobService)},get queryStore(){return e.getService(r.QueryStoreService)}}}},2882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookConvertService=void 0;const r=n(8129),i=n(6825),o=n(5868);class s extends o.BaseService{static asFeature(e){return class extends s{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){}}}constructor(e,t){super(t),e.registerService(r.NotebookConvertService,this)}async convertNotebookToSql(e){let t={content:e};return this.runWithErrorHandling(i.ConvertNotebookToSqlRequest.type,t)}async convertSqlToNotebook(e){let t={clientUri:e};return this.runWithErrorHandling(i.ConvertSqlToNotebookRequest.type,t)}}t.NotebookConvertService=s},200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerObjectManagementCommands=void 0;const r=n(9072),i=n(9496),o=n(5895),s=(n(252),n(8682)),a=n(3942),c=n(2576),l=n(1959),u=n(9897),d=n(8129),p=n(3307),h=n(7475),f=n(145),m=n(4464),g=n(9189),y=n(9456),v=n(5756),b=n(9415),S=n(9388),w=n(2414);async function T(e,t){const n=await E(e);if(!n)return;let r;if(e.nodeInfo){switch(e.nodeInfo.objectType){case"ApplicationRoles":r="ApplicationRole";break;case"DatabaseRoles":r="DatabaseRole";break;case"ServerLevelLogins":r="ServerLevelLogin";break;case"ServerLevelServerRoles":r="ServerLevelServerRole";break;case"Users":r="User";break;case"Databases":r="Database"}if(!r)switch(e.nodeInfo.nodeType){case"ApplicationRole":case"DatabaseRole":case"ServerLevelLogin":case"ServerLevelServerRole":case"User":case"Database":r=e.nodeInfo.nodeType;break;default:throw new Error(c.NoDialogFoundError(e.nodeInfo.nodeType,e.nodeInfo.objectType))}}else{if(!(e.connectionProfile?.databaseName?.length>0))throw new Error(c.NotSupportedError("Server"));r="Database"}try{const i=await C(e),o=_(t,{connectionUri:n,isNewObject:!0,database:e.connectionProfile?.databaseName,objectType:r,objectName:"",parentUrn:i,objectExplorerContext:e}),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenNewObjectDialog",{objectType:r},{elapsedTimeMs:Date.now()-s})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenNewObjectDialog",e).withAdditionalProperties({objectType:r}).send(),console.error(e),await i.window.showErrorMessage(c.OpenNewObjectDialogError(c.getNodeTypeDisplayName(r),(0,s.getErrorMessage)(e)))}}function _(e,t){const n="750px";switch(t.objectType){case"ApplicationRole":return new g.ApplicationRoleDialog(e,t);case"DatabaseRole":return new m.DatabaseRoleDialog(e,t);case"ServerLevelLogin":return new o.LoginDialog(e,t);case"ServerLevelServerRole":return new f.ServerRoleDialog(e,t);case"Server":return t.width=t.isNewObject?void 0:n,new v.ServerPropertiesDialog(e,t);case"User":return new u.UserDialog(e,t);case"Database":return t.width=t.isNewObject?void 0:n,new y.DatabaseDialog(e,t);default:throw new Error(`Unsupported object type: ${t.objectType}`)}}async function E(e){const t=await r.connection.getUriForConnection(e.connectionProfile.id);return t||await i.window.showErrorMessage(c.FailedToRetrieveConnectionInfoErrorMessage,{modal:!0}),t}async function C(e){let t;if(e.nodeInfo){let n,i=e.nodeInfo.parentNodePath;do{n=await r.objectexplorer.getNode(e.connectionProfile.id,i),i=n?.parentNodePath}while(n&&i&&!n.metadata?.urn);t=n?.metadata?.urn}return t}async function R(e){let t,n,r;return e.nodeInfo?(t=e.nodeInfo.nodeType,n=e.nodeInfo.metadata?.name,r=e.nodeInfo.metadata?.urn):e.connectionProfile?.databaseName?.length>0?(t="Database",n=e.connectionProfile.databaseName,r=`Server/Database[@Name='${(0,p.escapeSingleQuotes)(n)}']`):(t="Server",n=e.connectionProfile.serverName,r="Server"),{parentUrn:await C(e),name:n,type:t,urn:r}}t.registerObjectManagementCommands=function(e){const t=function(e,t){return e.getService(d.ObjectManagementService)}(e);e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newObject",(async e=>{await T(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newDatabase",(async e=>{await T(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newDatabaseRole",(async e=>{await T(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newApplicationRole",(async e=>{await T(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newLogin",(async e=>{await T(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newUser",(async e=>{await T(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newServerRole",(async e=>{await T(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.objectProperties",(async e=>{await async function(e,t){const n=await E(e);if(!n)return;const r=await R(e);try{const i=_(t,{connectionUri:n,isNewObject:!1,database:e.connectionProfile?.databaseName,objectType:r.type,objectName:r.name,parentUrn:r.parentUrn,objectUrn:r.urn,objectExplorerContext:e}),o=Date.now();await i.open(),h.TelemetryReporter.sendTelemetryEvent("OpenPropertiesDialog",{objectType:r.type},{elapsedTimeMs:Date.now()-o})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenPropertiesDialog",e).withAdditionalProperties({objectType:r.type}).send(),console.error(e),await i.window.showErrorMessage(c.OpenObjectPropertiesDialogError(c.getNodeTypeDisplayName(r.type),r.name,(0,s.getErrorMessage)(e)))}}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.dropObject",(async e=>{await async function(e,t){const n=await E(e);if(!n)return;const o=await R(e);let u;"ServerLevelLogin"===o.type&&(u=c.DropLoginConfirmationText);const d=c.getNodeTypeDisplayName(o.type);let f=c.DropObjectConfirmationText(d,o.name);u&&(f=`${u} ${f}`),await i.window.showWarningMessage(f,{modal:!0},l.YesText)===l.YesText&&r.tasks.startBackgroundOperation({displayName:c.DropObjectOperationDisplayName(d,o.name),description:"",isCancelable:!1,operation:async i=>{try{const e=Date.now();await t.drop(n,o.type,o.urn),h.TelemetryReporter.sendTelemetryEvent("DropObject",{objectType:o.type},{elapsedTimeMs:Date.now()-e})}catch(e){return i.updateStatus(r.TaskStatus.Failed,c.DropObjectError(d,o.name,(0,s.getErrorMessage)(e))),h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"DropObject",e).withAdditionalProperties({objectType:o.type}).send(),void console.error(e)}i.updateStatus(r.TaskStatus.Succeeded),await(0,p.refreshParentNode)(e)}})}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.renameObject",(async e=>{await async function(e,t){const n=await E(e);if(!n)return;const o=await R(e),l=c.getNodeTypeDisplayName(o.type),u=await i.window.showInputBox({title:c.RenameObjectDialogTitle,value:o.name,validateInput:e=>e?void 0:c.NameCannotBeEmptyError});u!==o.name&&u&&r.tasks.startBackgroundOperation({displayName:c.RenameObjectOperationDisplayName(l,o.name,u),description:"",isCancelable:!1,operation:async i=>{try{const e=Date.now();await t.rename(n,o.type,o.urn,u),h.TelemetryReporter.sendTelemetryEvent("RenameObject",{objectType:o.type},{elapsedTimeMs:Date.now()-e})}catch(e){return i.updateStatus(r.TaskStatus.Failed,c.RenameObjectError(l,o.name,u,(0,s.getErrorMessage)(e))),h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"RenameObject",e).withAdditionalProperties({objectType:o.type}).send(),void console.error(e)}i.updateStatus(r.TaskStatus.Succeeded),await(0,p.refreshParentNode)(e)}})}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.detachDatabase",(async e=>{await async function(e,t){const n=await E(e);if(!n)return;const r=await R(e);try{if("Database"!==r.type)throw new Error(c.NotSupportedError("Database"));const i={connectionUri:n,isNewObject:!1,database:r.name,objectType:r.type,objectName:r.name,parentUrn:r.parentUrn,objectUrn:r.urn,objectExplorerContext:e},o=new b.DetachDatabaseDialog(t,i),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenDetachDatabaseDialog",{objectType:r.type},{elapsedTimeMs:Date.now()-s})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenDetachDatabaseDialog",e).withAdditionalProperties({objectType:r.type}).send(),console.error(e),await i.window.showErrorMessage(c.OpenDetachDatabaseDialogError((0,s.getErrorMessage)(e)))}}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.attachDatabase",(async e=>{await async function(e,t){const n=await E(e);if(n)try{const r=await C(e),i={connectionUri:n,isNewObject:!0,database:e.connectionProfile.databaseName,objectType:"Database",objectName:"",parentUrn:r,objectExplorerContext:e},o=new w.AttachDatabaseDialog(t,i),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenAttachDatabaseDialog",{objectType:"Database"},{elapsedTimeMs:Date.now()-s})}catch(t){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenAttachDatabaseDialog",t).withAdditionalProperties({objectType:e.nodeInfo.nodeType}).send(),console.error(t),await i.window.showErrorMessage(c.OpenAttachDatabaseDialogError((0,s.getErrorMessage)(t)))}}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.dropDatabase",(async e=>{await async function(e,t){const n=await E(e);if(!n)return;const r=await R(e);try{if("Database"!==r.type)throw new Error(c.NotSupportedError("Database"));const i={connectionUri:n,isNewObject:!1,database:r.name,objectType:r.type,objectName:r.name,parentUrn:r.parentUrn,objectUrn:r.urn,objectExplorerContext:e},o=new S.DropDatabaseDialog(t,i),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenDropDatabaseDialog",{objectType:r.type},{elapsedTimeMs:Date.now()-s})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenDropDatabaseDialog",e).withAdditionalProperties({objectType:r.type}).send(),console.error(e),await i.window.showErrorMessage(c.OpenDropDatabaseDialogError((0,s.getErrorMessage)(e)))}}(e,t)})))}},3942:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectManagementViewName=t.DatabaseFileGroupsPropertiesDocUrl=t.DatabaseFilesPropertiesDocUrl=t.QueryStorePropertiesDocUrl=t.DatabaseScopedConfigurationPropertiesDocUrl=t.DropDatabaseDocUrl=t.DatabaseOptionsPropertiesDocUrl=t.DatabaseGeneralPropertiesDocUrl=t.AttachDatabaseDocUrl=t.DetachDatabaseDocUrl=t.ViewAdvancedServerPropertiesDocUrl=t.ViewDatabaseSettingsPropertiesDocUrl=t.ViewSecurityServerPropertiesDocUrl=t.ViewProcessorsServerPropertiesDocUrl=t.ViewMemoryServerPropertiesDocUrl=t.ViewGeneralServerPropertiesDocUrl=t.CreateDatabaseDocUrl=t.AlterDatabaseRoleDocUrl=t.CreateDatabaseRoleDocUrl=t.AlterApplicationRoleDocUrl=t.CreateApplicationRoleDocUrl=t.AlterServerRoleDocUrl=t.CreateServerRoleDocUrl=t.AlterLoginDocUrl=t.CreateLoginDocUrl=t.AlterUserDocUrl=t.CreateUserDocUrl=t.Windows=t.PublicServerRoleName=void 0,t.PublicServerRoleName="public",t.Windows="Windows",t.CreateUserDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-user-transact-sql",t.AlterUserDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-user-transact-sql",t.CreateLoginDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-login-transact-sql",t.AlterLoginDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-login-transact-sql",t.CreateServerRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-server-role-transact-sql",t.AlterServerRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-server-role-transact-sql",t.CreateApplicationRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-application-role-transact-sql",t.AlterApplicationRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-application-role-transact-sql",t.CreateDatabaseRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-role-transact-sql",t.AlterDatabaseRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-role-transact-sql",t.CreateDatabaseDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-database-transact-sql",t.ViewGeneralServerPropertiesDocUrl="https://learn.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql",t.ViewMemoryServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-memory-page",t.ViewProcessorsServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-processors-page",t.ViewSecurityServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-security-page",t.ViewDatabaseSettingsPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-database-settings-page",t.ViewAdvancedServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-advanced-page",t.DetachDatabaseDocUrl="https://go.microsoft.com/fwlink/?linkid=2240322",t.AttachDatabaseDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/attach-a-database#to-attach-a-database",t.DatabaseGeneralPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-general-page",t.DatabaseOptionsPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-options-page",t.DropDatabaseDocUrl="https://learn.microsoft.com/sql/t-sql/statements/drop-database-transact-sql",t.DatabaseScopedConfigurationPropertiesDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql",t.QueryStorePropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-query-store-page",t.DatabaseFilesPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-files-page",t.DatabaseFileGroupsPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-filegroups-page",t.ObjectManagementViewName="ObjectManagement"},2611:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AffinityType=void 0,function(e){e[e.ProcessorAffinity=1]="ProcessorAffinity",e[e.IOAffinity=2]="IOAffinity"}(n||(t.AffinityType=n={}))},2576:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateObjectOperationDisplayName=t.DropObjectConfirmationText=t.RefreshObjectExplorerError=t.EffectivePermissionsTableLabelSelected=t.ExplicitPermissionsTableLabelSelected=t.BackButtonLabel=t.LogFileLabel=t.DataFileLabel=t.labelSelectFolder=t.allFiles=t.ApplyUpdatesLabel=t.CreateObjectLabel=t.RemoveFileAriaLabel=t.AddFileAriaLabel=t.SelectSecurablesDialogTitle=t.DenyColumnHeader=t.WithGrantColumnHeader=t.GrantColumnHeader=t.GrantorColumnHeader=t.PermissionColumnHeader=t.EffectivePermissionsTableLabel=t.ExplicitPermissionsTableLabel=t.SecurablesText=t.RemoveSecurableAriaLabel=t.AddSecurableAriaLabel=t.RemoveMemberAriaLabel=t.AddMemberAriaLabel=t.BrowseOwnerButtonAriaLabel=t.BrowseText=t.OwnerText=t.RenameObjectDialogTitle=t.FailedToRetrieveConnectionInfoErrorMessage=t.NotSupportedError=t.NoDialogFoundError=t.DatabaseTypeDisplayNameInTitle=t.DatabaseRoleTypeDisplayNameInTitle=t.DatabaseRoleTypeDisplayName=t.ApplicationRoleTypeDisplayNameInTitle=t.ApplicationRoleTypeDisplayName=t.ServerTypeDisplayName=t.ServerRoleTypeDisplayNameInTitle=t.ServerRoleTypeDisplayName=t.DatabaseTypeDisplayName=t.ColumnTypeDisplayName=t.ViewTypeDisplayName=t.TableTypeDisplayName=t.UserTypeDisplayNameInTitle=t.LoginTypeDisplayNameInTitle=t.UserTypeDisplayName=t.LoginTypeDisplayName=void 0,t.DatabaseFileGroupLabel=t.DatabaseFilePathLabel=t.DatabaseFileTypeLabel=t.DatabaseFileNameLabel=t.DatabaseFilesLabel=t.DetachUpdateStatistics=t.DetachDropConnections=t.DetachDatabaseDialogTitle=t.AzurePricingLinkText=t.MaxSizeText=t.EditionText=t.CurrentSLOText=t.BackupRedundancyText=t.ConfigureSLOSectionHeader=t.ContainmentTypeText=t.CompatibilityLevelText=t.RecoveryModelText=t.CollationText=t.CollationNotValidError=t.SchemaText=t.MemberSectionHeader=t.MembershipSectionHeader=t.LoginNotSelectedError=t.InvalidPasswordError=t.PasswordsNotMatchError=t.PasswordCannotBeEmptyError=t.NameCannotBeEmptyError=t.EnabledText=t.ConfirmPasswordText=t.PasswordText=t.FileGroupsSectionHeader=t.FilesSectionHeader=t.OptionsSectionHeader=t.AdvancedSectionHeader=t.GeneralSectionHeader=t.NameText=t.RenameObjectError=t.RenameObjectOperationDisplayName=t.ObjectPropertiesDialogTitle=t.NewObjectDialogTitle=t.OpenNewObjectDialogError=t.OpenObjectPropertiesDialogError=t.AttachDatabaseOperationDisplayName=t.OpenAttachDatabaseDialogError=t.OpenDropDatabaseDialogError=t.DetachDatabaseOperationDisplayName=t.OpenDetachDatabaseDialogError=t.DropObjectError=t.DropObjectOperationDisplayName=t.UpdateObjectOperationDisplayName=void 0,t.FilterSectionTitle=t.ObjectTypesText=t.SelectServerRoleOwnerDialogTitle=t.SelectServerRoleMemberDialogTitle=t.SelectDatabaseRoleOwnerDialogTitle=t.SelectDatabaseRoleMemberDialogTitle=t.OwnedSchemaSectionHeader=t.LoginText=t.DefaultSchemaText=t.UserType_NoLoginAccess=t.UserType_AADAuthentication=t.UserType_SqlAuthentication=t.UserType_WindowsUser=t.UserType_LoginMapped=t.UserTypeText=t.OldPasswordCannotBeEmptyError=t.AADAuthenticationTypeDisplayText=t.SQLAuthenticationTypeDisplayText=t.WindowsAuthenticationTypeDisplayText=t.LoginLockedOutText=t.PermissionToConnectText=t.DefaultLanguageText=t.DefaultDatabaseText=t.MustChangePasswordText=t.EnforcePasswordExpirationText=t.EnforcePasswordPolicyText=t.OldPasswordText=t.SpecifyOldPasswordText=t.AuthTypeText=t.ServerRoleSectionHeader=t.SQLAuthenticationSectionHeader=t.DropLoginConfirmationText=t.BlankPasswordConfirmationText=t.DatabaseDetailsLabel=t.DeleteBackupHistory=t.CloseConnections=t.DropDatabaseOptions=t.DropButtonLabel=t.DropDatabaseDialogTitle=t.AttachButtonLabel=t.AttachAsText=t.DatabaseName=t.DatabaseFilesFilterLabel=t.MdfFileLocation=t.AssociatedFilesLabel=t.DatabasesToAttachLabel=t.NoDatabaseFilesError=t.AttachDatabaseDialogTitle=t.DetachButtonLabel=t.DetachDatabaseOptions=void 0,t.successfulLoginsOnlyText=t.failedLoginsOnlyText=t.noLoginAuditingText=t.loginAuditingText=t.sqlServerAndWindowsAuthText=t.onlyWindowsAuthModeText=t.serverAuthenticationText=t.securityText=t.serverCPULabel=t.serverNumaNodeLabel=t.serverMemoryMaxLowerThanMinInputError=t.processorLabel=t.processorIOAffinityColumnText=t.processorAffinityColumnText=t.processorColumnText=t.autoSetProcessorAffinityIOMaskForAllText=t.autoSetProcessorAffinityMaskForAllText=t.maxServerMemoryText=t.minServerMemoryText=t.VersionText=t.StorageSpaceUsageInMBText=t.ServiceTierText=t.ServerCollationText=t.RootDirectoryText=t.ReservedStorageSizeInMBText=t.ProductText=t.IsXTPSupportedText=t.IsPolyBaseInstalledText=t.IsHadrEnabledText=t.IsClusteredText=t.ProcessorsText=t.PlatformText=t.OperatingSystemText=t.MemoryText=t.LanguageText=t.HardwareGenerationText=t.PropertiesHeader=t.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel=t.ObjectSelectionMethodDialog_AllObjectsOfSchema=t.ObjectSelectionMethodDialog_AllObjectsOfTypes=t.ObjectSelectionMethodDialog_SpecificObjects=t.ObjectSelectionMethodDialog_TypeLabel=t.ObjectSelectionMethodDialogTitle=t.LoadingObjectsCompletedText=t.LoadingObjectsText=t.ObjectsText=t.SelectText=t.FindText=t.SearchTextLabel=t.ObjectTypeText=void 0,t.PageVerifyText=t.IsLedgerDatabaseText=t.AutoUpdateStatisticsAsynchronouslyText=t.AutoUpdateStatisticsText=t.AutoShrinkText=t.AutoCreateStatisticsText=t.AutoCreateIncrementalStatisticsText=t.StringValueInMB=t.MemoryUsedText=t.MemoryAllocatedText=t.NumberOfUsersText=t.SpaceAvailableText=t.SizeText=t.DateCreatedText=t.OwnerPropertyText=t.StatusText=t.NamePropertyText=t.DatabaseSectionHeader=t.StateSectionHeader=t.RecoverySectionHeader=t.LedgerSectionHeader=t.AutomaticSectionHeader=t.BackupSectionHeader=t.LastDatabaseLogBackupText=t.LastDatabaseBackupText=t.queryWaitLabel=t.maxDegreeParallelismLabel=t.locksValidation=t.locksLabel=t.costThresholdParallelismLabel=t.twoDigitYearCutoffLabel=t.scanStartupProcsLabel=t.optimizeAdHocWorkloadsLabel=t.maxTextReplicationSizeLabel=t.fullTextUpgradeOptionLabel=t.defaultLanguageLabel=t.defaultFullTextLanguageLabel=t.cursorThresholdLabel=t.blockedProcThresholdLabel=t.allowTriggerToFireOthersLabel=t.backupAndRestoreText=t.backupChecksumText=t.compressBackupText=t.databaseSettingsText=t.defaultLocationsLabel=t.backupLocationText=t.dataLocationText=t.logLocationText=t.needToRestartServer=t.bothFailedAndSuccessfulLoginsText=void 0,t.ReadOnlyText=t.FilesText=t.MemoryOptimizedFileGroupsSectionText=t.FileStreamFileGroupsSectionText=t.RowsFileGroupsSectionText=t.FilestreamFileType=t.LogFiletype=t.RowsDataFileType=t.FilegrowthLimitError=t.FileSizeLimitError=t.FileAlreadyExistsError=t.FileNameExistsError=t.DuplicateLogicalNameError=t.FileGroupForFilestreamTypeText=t.FileGroupForLogTypeText=t.AutoGrowthValueStringGenerator=t.NoneText=t.UnlimitedFileSizeText=t.LimitedToMBFileSizeText=t.InMegabytesAutogrowthText=t.InPercentAutogrowthText=t.MaximumFileSizeText=t.FileGrowthText=t.EnableAutogrowthText=t.SizeInMbText=t.RemoveButton=t.EditButton=t.AddButton=t.EditDatabaseFilesText=t.AddDatabaseFilesText=t.DatabaseFilesText=t.FileNameText=t.PathText=t.AutogrowthMaxsizeText=t.FilegroupText=t.FileTypeText=t.LogicalNameText=t.UseFullTextIndexingText=t.DatabaseNameText=t.SetSecondaryText=t.ValueForSecondaryColumnHeader=t.ValueForPrimaryColumnHeader=t.DatabaseScopedOptionsColumnHeader=t.QueryStoreTabHeader=t.DatabaseScopedConfigurationTabHeader=t.RestrictAccessText=t.EncryptionEnabledText=t.DatabaseStateText=t.DatabaseReadOnlyText=t.TargetRecoveryTimeInSecondsText=void 0,t.getObjectTypeInfo=t.getUserTypeByDisplayName=t.getUserTypeDisplayName=t.getAuthenticationTypeByDisplayName=t.getAuthenticationTypeDisplayName=t.getNodeTypeDisplayName=t.fileGroupsNameInput=t.PurgeQueryStoreDataMessage=t.NotAvailableText=t.YesText=t.PurgeQueryDataButtonText=t.QueryStoreAvailableText=t.QueryStoreUsedText=t.QueryStoreCapturemodeCustomText=t.TotalExecutionCPUTimeInMsText=t.TotalCompileCPUTimeInMsText=t.StaleThresholdText=t.ExecutionCountText=t.QueryStoreCurrentDiskUsageSectionText=t.QueryStoreCapturePolicySectionText=t.QueryStoreRetentionSectionText=t.MonitoringSectionText=t.WaitStatisticsCaptureModeText=t.StateQueryThresholdInDaysText=t.SizeBasedCleanupModeText=t.QueryStoreCaptureModeText=t.MaxSizeInMbText=t.MaxPlansPerQueryText=t.StatisticsCollectionInterval=t.DataFlushIntervalInMinutesText=t.RequestedOperationModeText=t.ActualOperationModeText=t.EmptyFilegroupNameError=t.FilegroupExistsError=t.AddFilegroupText=t.FilestreamFilesText=t.AutogrowAllFilesText=t.DefaultText=void 0;const r=n(3403).loadMessageBundle(n(1017).join(__dirname,"objectManagement\\localizedConstants.ts"));function i(e,n=!1){switch(e){case"ApplicationRole":return n?t.ApplicationRoleTypeDisplayNameInTitle:t.ApplicationRoleTypeDisplayName;case"DatabaseRole":return n?t.DatabaseRoleTypeDisplayNameInTitle:t.DatabaseRoleTypeDisplayName;case"ServerLevelLogin":return n?t.LoginTypeDisplayNameInTitle:t.LoginTypeDisplayName;case"ServerLevelServerRole":return n?t.ServerRoleTypeDisplayNameInTitle:t.ServerRoleTypeDisplayName;case"Server":return t.ServerTypeDisplayName;case"User":return n?t.UserTypeDisplayNameInTitle:t.UserTypeDisplayName;case"Table":return t.TableTypeDisplayName;case"View":return t.ViewTypeDisplayName;case"Column":return t.ColumnTypeDisplayName;case"Database":return n?t.DatabaseTypeDisplayNameInTitle:t.DatabaseTypeDisplayName;default:throw new Error(`Unknown node type: ${e}`)}}t.LoginTypeDisplayName=r(0,null),t.UserTypeDisplayName=r(1,null),t.LoginTypeDisplayNameInTitle=r(2,null),t.UserTypeDisplayNameInTitle=r(3,null),t.TableTypeDisplayName=r(4,null),t.ViewTypeDisplayName=r(5,null),t.ColumnTypeDisplayName=r(6,null),t.DatabaseTypeDisplayName=r(7,null),t.ServerRoleTypeDisplayName=r(8,null),t.ServerRoleTypeDisplayNameInTitle=r(9,null),t.ServerTypeDisplayName=r(10,null),t.ApplicationRoleTypeDisplayName=r(11,null),t.ApplicationRoleTypeDisplayNameInTitle=r(12,null),t.DatabaseRoleTypeDisplayName=r(13,null),t.DatabaseRoleTypeDisplayNameInTitle=r(14,null),t.DatabaseTypeDisplayNameInTitle=r(15,null),t.NoDialogFoundError=function(e,t){return r(16,null,e,t)},t.NotSupportedError=function(e){return r(17,null,e)},t.FailedToRetrieveConnectionInfoErrorMessage=r(18,null),t.RenameObjectDialogTitle=r(19,null),t.OwnerText=r(20,null),t.BrowseText=r(21,null),t.BrowseOwnerButtonAriaLabel=r(22,null),t.AddMemberAriaLabel=r(23,null),t.RemoveMemberAriaLabel=r(24,null),t.AddSecurableAriaLabel=r(25,null),t.RemoveSecurableAriaLabel=r(26,null),t.SecurablesText=r(27,null),t.ExplicitPermissionsTableLabel=r(28,null),t.EffectivePermissionsTableLabel=r(29,null),t.PermissionColumnHeader=r(30,null),t.GrantorColumnHeader=r(31,null),t.GrantColumnHeader=r(32,null),t.WithGrantColumnHeader=r(33,null),t.DenyColumnHeader=r(34,null),t.SelectSecurablesDialogTitle=r(35,null),t.AddFileAriaLabel=r(36,null),t.RemoveFileAriaLabel=r(37,null),t.CreateObjectLabel=r(38,null),t.ApplyUpdatesLabel=r(39,null),t.allFiles=r(40,null),t.labelSelectFolder=r(41,null),t.DataFileLabel=r(42,null),t.LogFileLabel=r(43,null),t.BackButtonLabel=r(44,null),t.ExplicitPermissionsTableLabelSelected=function(e){return r(45,null,e)},t.EffectivePermissionsTableLabelSelected=function(e){return r(46,null,e)},t.RefreshObjectExplorerError=function(e){return r(47,null,e)},t.DropObjectConfirmationText=function(e,t){return r(48,null,e,t)},t.CreateObjectOperationDisplayName=function(e){return r(49,null,e)},t.UpdateObjectOperationDisplayName=function(e,t){return r(50,null,e,t)},t.DropObjectOperationDisplayName=function(e,t){return r(51,null,e,t)},t.DropObjectError=function(e,t,n){return r(52,null,e,t,n)},t.OpenDetachDatabaseDialogError=function(e){return r(53,null,e)},t.DetachDatabaseOperationDisplayName=function(e){return r(54,null,e)},t.OpenDropDatabaseDialogError=function(e){return r(55,null,e)},t.OpenAttachDatabaseDialogError=function(e){return r(56,null,e)},t.AttachDatabaseOperationDisplayName=r(57,null),t.OpenObjectPropertiesDialogError=function(e,t,n){return r(58,null,e,t,n)},t.OpenNewObjectDialogError=function(e,t){return r(59,null,e,t)},t.NewObjectDialogTitle=function(e){return r(60,null,e)},t.ObjectPropertiesDialogTitle=function(e,t){return r(61,null,e,t)},t.RenameObjectOperationDisplayName=function(e,t,n){return r(62,null,e,t,n)},t.RenameObjectError=function(e,t,n,i){return r(63,null,e,t,n,i)},t.NameText=r(64,null),t.GeneralSectionHeader=r(65,null),t.AdvancedSectionHeader=r(66,null),t.OptionsSectionHeader=r(67,null),t.FilesSectionHeader=r(68,null),t.FileGroupsSectionHeader=r(69,null),t.PasswordText=r(70,null),t.ConfirmPasswordText=r(71,null),t.EnabledText=r(72,null),t.NameCannotBeEmptyError=r(73,null),t.PasswordCannotBeEmptyError=r(74,null),t.PasswordsNotMatchError=r(75,null),t.InvalidPasswordError=r(76,null),t.LoginNotSelectedError=r(77,null),t.MembershipSectionHeader=r(78,null),t.MemberSectionHeader=r(79,null),t.SchemaText=r(80,null),t.CollationNotValidError=e=>r(81,null,e),t.CollationText=r(82,null),t.RecoveryModelText=r(83,null),t.CompatibilityLevelText=r(84,null),t.ContainmentTypeText=r(85,null),t.ConfigureSLOSectionHeader=r(86,null),t.BackupRedundancyText=r(87,null),t.CurrentSLOText=r(88,null),t.EditionText=r(89,null),t.MaxSizeText=r(90,null),t.AzurePricingLinkText=r(91,null),t.DetachDatabaseDialogTitle=e=>r(92,null,e),t.DetachDropConnections=r(93,null),t.DetachUpdateStatistics=r(94,null),t.DatabaseFilesLabel=r(95,null),t.DatabaseFileNameLabel=r(96,null),t.DatabaseFileTypeLabel=r(97,null),t.DatabaseFilePathLabel=r(98,null),t.DatabaseFileGroupLabel=r(99,null),t.DetachDatabaseOptions=r(100,null),t.DetachButtonLabel=r(101,null),t.AttachDatabaseDialogTitle=r(102,null),t.NoDatabaseFilesError=r(103,null),t.DatabasesToAttachLabel=r(104,null),t.AssociatedFilesLabel=r(105,null),t.MdfFileLocation=r(106,null),t.DatabaseFilesFilterLabel=r(107,null),t.DatabaseName=r(108,null),t.AttachAsText=r(109,null),t.AttachButtonLabel=r(110,null),t.DropDatabaseDialogTitle=e=>r(111,null,e),t.DropButtonLabel=r(112,null),t.DropDatabaseOptions=r(113,null),t.CloseConnections=r(114,null),t.DeleteBackupHistory=r(115,null),t.DatabaseDetailsLabel=r(116,null),t.BlankPasswordConfirmationText=r(117,null),t.DropLoginConfirmationText=r(118,null),t.SQLAuthenticationSectionHeader=r(119,null),t.ServerRoleSectionHeader=r(120,null),t.AuthTypeText=r(121,null),t.SpecifyOldPasswordText=r(122,null),t.OldPasswordText=r(123,null),t.EnforcePasswordPolicyText=r(124,null),t.EnforcePasswordExpirationText=r(125,null),t.MustChangePasswordText=r(126,null),t.DefaultDatabaseText=r(127,null),t.DefaultLanguageText=r(128,null),t.PermissionToConnectText=r(129,null),t.LoginLockedOutText=r(130,null),t.WindowsAuthenticationTypeDisplayText=r(131,null),t.SQLAuthenticationTypeDisplayText=r(132,null),t.AADAuthenticationTypeDisplayText=r(133,null),t.OldPasswordCannotBeEmptyError=r(134,null),t.UserTypeText=r(135,null),t.UserType_LoginMapped=r(136,null),t.UserType_WindowsUser=r(137,null),t.UserType_SqlAuthentication=r(138,null),t.UserType_AADAuthentication=r(139,null),t.UserType_NoLoginAccess=r(140,null),t.DefaultSchemaText=r(141,null),t.LoginText=r(142,null),t.OwnedSchemaSectionHeader=r(143,null),t.SelectDatabaseRoleMemberDialogTitle=r(144,null),t.SelectDatabaseRoleOwnerDialogTitle=r(145,null),t.SelectServerRoleMemberDialogTitle=r(146,null),t.SelectServerRoleOwnerDialogTitle=r(147,null),t.ObjectTypesText=r(148,null),t.FilterSectionTitle=r(149,null),t.ObjectTypeText=r(150,null),t.SearchTextLabel=r(151,null),t.FindText=r(152,null),t.SelectText=r(153,null),t.ObjectsText=r(154,null),t.LoadingObjectsText=r(155,null),t.LoadingObjectsCompletedText=function(e){return r(156,null,e)},t.ObjectSelectionMethodDialogTitle=r(157,null),t.ObjectSelectionMethodDialog_TypeLabel=r(158,null),t.ObjectSelectionMethodDialog_SpecificObjects=r(159,null),t.ObjectSelectionMethodDialog_AllObjectsOfTypes=r(160,null),t.ObjectSelectionMethodDialog_AllObjectsOfSchema=r(161,null),t.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel=r(162,null),t.PropertiesHeader=r(163,null),t.HardwareGenerationText=r(164,null),t.LanguageText=r(165,null),t.MemoryText=r(166,null),t.OperatingSystemText=r(167,null),t.PlatformText=r(168,null),t.ProcessorsText=r(169,null),t.IsClusteredText=r(170,null),t.IsHadrEnabledText=r(171,null),t.IsPolyBaseInstalledText=r(172,null),t.IsXTPSupportedText=r(173,null),t.ProductText=r(174,null),t.ReservedStorageSizeInMBText=r(175,null),t.RootDirectoryText=r(176,null),t.ServerCollationText=r(177,null),t.ServiceTierText=r(178,null),t.StorageSpaceUsageInMBText=r(179,null),t.VersionText=r(180,null),t.minServerMemoryText=r(181,null),t.maxServerMemoryText=r(182,null),t.autoSetProcessorAffinityMaskForAllText=r(183,null),t.autoSetProcessorAffinityIOMaskForAllText=r(184,null),t.processorColumnText=r(185,null),t.processorAffinityColumnText=r(186,null),t.processorIOAffinityColumnText=r(187,null),t.processorLabel=r(188,null),t.serverMemoryMaxLowerThanMinInputError=r(189,null),t.serverNumaNodeLabel=e=>r(190,null,e),t.serverCPULabel=e=>r(191,null,e),t.securityText=r(192,null),t.serverAuthenticationText=r(193,null),t.onlyWindowsAuthModeText=r(194,null),t.sqlServerAndWindowsAuthText=r(195,null),t.loginAuditingText=r(196,null),t.noLoginAuditingText=r(197,null),t.failedLoginsOnlyText=r(198,null),t.successfulLoginsOnlyText=r(199,null),t.bothFailedAndSuccessfulLoginsText=r(200,null),t.needToRestartServer=r(201,null),t.logLocationText=r(202,null),t.dataLocationText=r(203,null),t.backupLocationText=r(204,null),t.defaultLocationsLabel=r(205,null),t.databaseSettingsText=r(206,null),t.compressBackupText=r(207,null),t.backupChecksumText=r(208,null),t.backupAndRestoreText=r(209,null),t.allowTriggerToFireOthersLabel=r(210,null),t.blockedProcThresholdLabel=r(211,null),t.cursorThresholdLabel=r(212,null),t.defaultFullTextLanguageLabel=r(213,null),t.defaultLanguageLabel=r(214,null),t.fullTextUpgradeOptionLabel=r(215,null),t.maxTextReplicationSizeLabel=r(216,null),t.optimizeAdHocWorkloadsLabel=r(217,null),t.scanStartupProcsLabel=r(218,null),t.twoDigitYearCutoffLabel=r(219,null),t.costThresholdParallelismLabel=r(220,null),t.locksLabel=r(221,null),t.locksValidation=function(e){return r(222,null,e)},t.maxDegreeParallelismLabel=r(223,null),t.queryWaitLabel=r(224,null),t.LastDatabaseBackupText=r(225,null),t.LastDatabaseLogBackupText=r(226,null),t.BackupSectionHeader=r(227,null),t.AutomaticSectionHeader=r(228,null),t.LedgerSectionHeader=r(229,null),t.RecoverySectionHeader=r(230,null),t.StateSectionHeader=r(231,null),t.DatabaseSectionHeader=r(232,null),t.NamePropertyText=r(233,null),t.StatusText=r(234,null),t.OwnerPropertyText=r(235,null),t.DateCreatedText=r(236,null),t.SizeText=r(237,null),t.SpaceAvailableText=r(238,null),t.NumberOfUsersText=r(239,null),t.MemoryAllocatedText=r(240,null),t.MemoryUsedText=r(241,null),t.StringValueInMB=e=>r(242,null,e),t.AutoCreateIncrementalStatisticsText=r(243,null),t.AutoCreateStatisticsText=r(244,null),t.AutoShrinkText=r(245,null),t.AutoUpdateStatisticsText=r(246,null),t.AutoUpdateStatisticsAsynchronouslyText=r(247,null),t.IsLedgerDatabaseText=r(248,null),t.PageVerifyText=r(249,null),t.TargetRecoveryTimeInSecondsText=r(250,null),t.DatabaseReadOnlyText=r(251,null),t.DatabaseStateText=r(252,null),t.EncryptionEnabledText=r(253,null),t.RestrictAccessText=r(254,null),t.DatabaseScopedConfigurationTabHeader=r(255,null),t.QueryStoreTabHeader=r(256,null),t.DatabaseScopedOptionsColumnHeader=r(257,null),t.ValueForPrimaryColumnHeader=r(258,null),t.ValueForSecondaryColumnHeader=r(259,null),t.SetSecondaryText=r(260,null),t.DatabaseNameText=r(261,null),t.UseFullTextIndexingText=r(262,null),t.LogicalNameText=r(263,null),t.FileTypeText=r(264,null),t.FilegroupText=r(265,null),t.AutogrowthMaxsizeText=r(266,null),t.PathText=r(267,null),t.FileNameText=r(268,null),t.DatabaseFilesText=r(269,null),t.AddDatabaseFilesText=r(270,null),t.EditDatabaseFilesText=e=>r(271,null,e),t.AddButton=r(272,null),t.EditButton=r(273,null),t.RemoveButton=r(274,null),t.SizeInMbText=r(275,null),t.EnableAutogrowthText=r(276,null),t.FileGrowthText=r(277,null),t.MaximumFileSizeText=r(278,null),t.InPercentAutogrowthText=r(279,null),t.InMegabytesAutogrowthText=r(280,null),t.LimitedToMBFileSizeText=r(281,null),t.UnlimitedFileSizeText=r(282,null),t.NoneText=r(283,null),t.AutoGrowthValueStringGenerator=function(e,t,n,i){const o=-1===i?r(284,null):r(285,null,i);return e?r(286,null,t,n?"Percent":"MB",o):r(287,null,o)},t.FileGroupForLogTypeText=r(288,null),t.FileGroupForFilestreamTypeText=r(289,null),t.DuplicateLogicalNameError=e=>r(290,null,e),t.FileNameExistsError=e=>r(291,null,e),t.FileAlreadyExistsError=e=>r(292,null,e),t.FileSizeLimitError=r(293,null),t.FilegrowthLimitError=r(294,null),t.RowsDataFileType=r(295,null),t.LogFiletype=r(296,null),t.FilestreamFileType=r(297,null),t.RowsFileGroupsSectionText=r(298,null),t.FileStreamFileGroupsSectionText=r(299,null),t.MemoryOptimizedFileGroupsSectionText=r(300,null),t.FilesText=r(301,null),t.ReadOnlyText=r(302,null),t.DefaultText=r(303,null),t.AutogrowAllFilesText=r(304,null),t.FilestreamFilesText=r(305,null),t.AddFilegroupText=r(306,null),t.FilegroupExistsError=e=>r(307,null,e),t.EmptyFilegroupNameError=r(308,null),t.ActualOperationModeText=r(309,null),t.RequestedOperationModeText=r(310,null),t.DataFlushIntervalInMinutesText=r(311,null),t.StatisticsCollectionInterval=r(312,null),t.MaxPlansPerQueryText=r(313,null),t.MaxSizeInMbText=r(314,null),t.QueryStoreCaptureModeText=r(315,null),t.SizeBasedCleanupModeText=r(316,null),t.StateQueryThresholdInDaysText=r(317,null),t.WaitStatisticsCaptureModeText=r(318,null),t.MonitoringSectionText=r(319,null),t.QueryStoreRetentionSectionText=r(320,null),t.QueryStoreCapturePolicySectionText=r(321,null),t.QueryStoreCurrentDiskUsageSectionText=r(322,null),t.ExecutionCountText=r(323,null),t.StaleThresholdText=r(324,null),t.TotalCompileCPUTimeInMsText=r(325,null),t.TotalExecutionCPUTimeInMsText=r(326,null),t.QueryStoreCapturemodeCustomText=r(327,null),t.QueryStoreUsedText=r(328,null),t.QueryStoreAvailableText=r(329,null),t.PurgeQueryDataButtonText=r(330,null),t.YesText=r(331,null),t.NotAvailableText=r(332,null),t.PurgeQueryStoreDataMessage=e=>r(333,null,e),t.fileGroupsNameInput=r(334,null),t.getNodeTypeDisplayName=i;const o=new Map;o.set("Windows",t.WindowsAuthenticationTypeDisplayText),o.set("Sql",t.SQLAuthenticationTypeDisplayText),o.set("AAD",t.AADAuthenticationTypeDisplayText),t.getAuthenticationTypeDisplayName=function(e){if(o.has(e))return o.get(e);throw new Error(`Unknown authentication type: ${e}`)},t.getAuthenticationTypeByDisplayName=function(e){for(let[t,n]of o.entries())if(n===e)return t;throw new Error(`Unknown authentication type display name: ${e}`)};const s=new Map;s.set("LoginMapped",t.UserType_LoginMapped),s.set("WindowsUser",t.UserType_WindowsUser),s.set("SqlAuthentication",t.UserType_SqlAuthentication),s.set("AADAuthentication",t.UserType_AADAuthentication),s.set("NoLoginAccess",t.UserType_NoLoginAccess),t.getUserTypeDisplayName=function(e){if(s.has(e))return s.get(e);throw new Error(`Unknown user type: ${e}`)},t.getUserTypeByDisplayName=function(e){for(let[t,n]of s.entries())if(n===e)return t;throw new Error(`Unknown user type display name: ${e}`)},t.getObjectTypeInfo=function(e){return e.map((e=>({name:e,displayName:i(e,!0)})))}},252:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestObjectManagementService=t.ObjectManagementService=void 0;const r=n(8682),i=n(8129),o=n(6825),s=n(5868);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){r.ensure(e,"objectManagement").objectManagement=!0}initialize(){}}}async initializeView(e,t,n,r,i,s,a){const c={connectionUri:n,contextId:e,isNewObject:i,objectType:t,database:r,parentUrn:s,objectUrn:a};return this.runWithErrorHandling(o.InitializeViewRequest.type,c)}constructor(e,t){super(t),e.registerService(i.ObjectManagementService,this)}async save(e,t){const n={contextId:e,object:t};return this.runWithErrorHandling(o.SaveObjectRequest.type,n)}async script(e,t){const n={contextId:e,object:t};return this.runWithErrorHandling(o.ScriptObjectRequest.type,n)}async disposeView(e){const t={contextId:e};return this.runWithErrorHandling(o.DisposeViewRequest.type,t)}async rename(e,t,n,r){const i={connectionUri:e,objectUrn:n,newName:r,objectType:t};return this.runWithErrorHandling(o.RenameObjectRequest.type,i)}async drop(e,t,n){const r={connectionUri:e,objectUrn:n,objectType:t};return this.runWithErrorHandling(o.DropObjectRequest.type,r)}async search(e,t,n,r){const i={contextId:e,searchText:n,objectTypes:t,schema:r};return this.runWithErrorHandling(o.SearchObjectRequest.type,i)}async detachDatabase(e,t,n,r,i){const s={connectionUri:e,database:t,dropConnections:n,updateStatistics:r,generateScript:i};return this.runWithErrorHandling(o.DetachDatabaseRequest.type,s)}async dropDatabase(e,t,n,r,i){const s={connectionUri:e,database:t,dropConnections:n,deleteBackupHistory:r,generateScript:i};return this.runWithErrorHandling(o.DropDatabaseRequest.type,s)}async attachDatabases(e,t,n){const r={connectionUri:e,databases:t,generateScript:n};return this.runWithErrorHandling(o.AttachDatabaseRequest.type,r)}async getDataFolder(e){const t={connectionUri:e};return this.runWithErrorHandling(o.GetDataFolderRequest.type,t)}async getBackupFolder(e){const t={connectionUri:e};return this.runWithErrorHandling(o.GetBackupFolderRequest.type,t)}async getAssociatedFiles(e,t){const n={connectionUri:e,primaryFilePath:t};return this.runWithErrorHandling(o.GetAssociatedFilesRequest.type,n)}async purgeQueryStoreData(e,t){const n={connectionUri:e,database:t};return this.runWithErrorHandling(o.PurgeQueryStoreDataRequest.type,n)}}t.ObjectManagementService=a;const c=[{name:"Server",displayName:"Server",permissions:[{name:"CONNECT SQL",displayName:"CONNECT SQL"},{name:"VIEW ANY DATABASE",displayName:"VIEW ANY DATABASE"}]},{name:"ServerRole",displayName:"Server Role",permissions:[{name:"ALTER",displayName:"ALTER"},{name:"CONTROL",displayName:"CONTROL"},{name:"TAKE OWNERSHIP",displayName:"TAKE OWNERSHIP"}]}],l=[{name:"AggregateFunction",displayName:"Aggregate Function",permissions:[{name:"EXECUTE",displayName:"EXECUTE"},{name:"ALTER",displayName:"ALTER"}]},{name:"Table",displayName:"Table",permissions:[{name:"SELECT",displayName:"SELECT"},{name:"ALTER",displayName:"ALTER"},{name:"CONTROL",displayName:"CONTROL"},{name:"TAKE OWNERSHIP",displayName:"TAKE OWNERSHIP"}]},{name:"View",displayName:"View",permissions:[{name:"ALTER",displayName:"ALTER"},{name:"CONTROL",displayName:"CONTROL"},{name:"TAKE OWNERSHIP",displayName:"TAKE OWNERSHIP"}]}],u=[{name:"Server",type:"Server",permissions:[{permission:"CONNECT SQL",grant:!0,grantor:"sa",withGrant:void 0},{permission:"VIEW ANY DATABASE",grant:!1,grantor:"sa",withGrant:void 0}],effectivePermissions:["CONNECT SQL","VIEW ANY DATABASE"]}],d=[{name:"table1",type:"Table",schema:"dbo",permissions:[{permission:"SELECT",grant:!0,grantor:"",withGrant:void 0}],effectivePermissions:["SELECT"]},{name:"view1",type:"View",schema:"Sales",permissions:[{permission:"ALTER",grant:!0,grantor:"",withGrant:void 0}],effectivePermissions:["ALTER"]}];t.TestObjectManagementService=class{initializeView(e,t,n,r,i,o,s){let a;if("ApplicationRole"===t)a=this.getApplicationRoleView(i,s);else if("DatabaseRole"===t)a=this.getDatabaseRoleView(i,s);else if("Database"===t)a=this.getDatabaseView(i,s);else if("ServerLevelLogin"===t)a=this.getLoginView(i,s);else if("ServerLevelServerRole"===t)a=this.getServerRoleView(i,s);else{if("User"!==t)throw Error("Not implemented");a=this.getUserView(i,s)}return this.delayAndResolve(a)}save(e,t){return this.delayAndResolve()}script(e,t){return this.delayAndResolve("test script")}disposeView(e){return this.delayAndResolve()}async rename(e,t,n,r){return this.delayAndResolve()}async drop(e,t,n){return this.delayAndResolve()}async search(e,t,n,r){const i=[];return t.forEach((e=>{i.push(...this.generateSearchResult(e,r,15))})),this.delayAndResolve(i)}async detachDatabase(e,t,n,r,i){return this.delayAndResolve("")}async attachDatabases(e,t,n){return this.delayAndResolve("")}dropDatabase(e,t,n,r,i){return this.delayAndResolve("")}async getDataFolder(e){return this.delayAndResolve("")}async getBackupFolder(e){return this.delayAndResolve("")}async getAssociatedFiles(e,t){return this.delayAndResolve([])}async purgeQueryStoreData(e,t){return this.delayAndResolve([])}generateSearchResult(e,t,n){let r=[];for(let i=0;i<n;i++)r.push({name:`${e} ${i}`,schema:t,type:e});return r}getLoginView(e,t){const n=["sysadmin","public","bulkadmin","dbcreator","diskadmin","processadmin","securityadmin","serveradmin"],r=["<default>","English"],i=["master","db1","db2"];let o;return o=e?{objectInfo:{name:"",authenticationType:"Sql",enforcePasswordPolicy:!0,enforcePasswordExpiration:!0,mustChangePassword:!0,defaultDatabase:"master",defaultLanguage:"<default>",serverRoles:["public","bulkadmin"],connectPermission:!0,isEnabled:!0,isLockedOut:!1,securablePermissions:[]},authenticationTypes:["Sql","Windows"],supportAdvancedOptions:!0,supportAdvancedPasswordOptions:!0,canEditLockedOutState:!1,languages:r,databases:i,serverRoles:n,supportedSecurableTypes:c}:{objectInfo:{name:t,authenticationType:"Sql",enforcePasswordPolicy:!0,enforcePasswordExpiration:!0,mustChangePassword:!0,defaultDatabase:"master",defaultLanguage:"<default>",serverRoles:["public"],connectPermission:!0,isEnabled:!0,isLockedOut:!1,password:"******************",securablePermissions:u},authenticationTypes:["Sql","Windows"],supportAdvancedOptions:!0,supportAdvancedPasswordOptions:!0,canEditLockedOutState:!1,languages:r,databases:i,serverRoles:n,supportedSecurableTypes:c},o}getUserView(e,t){let n;const r=["<default>","English"],i=["dbo","sys","alanren"],o=["sa","alanren","alanren@microsoft.com"],s=["dbmanager","loginmanager","bulkadmin","sysadmin","tablemanager","viewmanager"];return n=e?{objectInfo:{name:"",type:"LoginMapped",defaultSchema:"dbo",defaultLanguage:"<default>",authenticationType:"Sql",loginName:"sa",ownedSchemas:[],databaseRoles:[],password:"",securablePermissions:[]},languages:r,schemas:i,logins:o,databaseRoles:s,userTypes:["LoginMapped","AADAuthentication","SqlAuthentication","NoLoginAccess"],supportedSecurableTypes:l}:{objectInfo:{name:t,type:"LoginMapped",defaultSchema:"dbo",defaultLanguage:"<default>",loginName:"sa",ownedSchemas:["dbo"],databaseRoles:["dbmanager","bulkadmin"],securablePermissions:d},languages:r,schemas:i,logins:o,databaseRoles:s,userTypes:["LoginMapped","AADAuthentication","SqlAuthentication","NoLoginAccess"],supportedSecurableTypes:l},n}getServerRoleView(e,t){return e?{objectInfo:{name:"",members:[],owner:"",memberships:[],securablePermissions:[]},isFixedRole:!1,serverRoles:["ServerLevelServerRole 1","ServerLevelServerRole 2","ServerLevelServerRole 3","ServerLevelServerRole 4"],supportedSecurableTypes:c}:{objectInfo:{name:"ServerLevelServerRole 1",members:["ServerLevelLogin 1","ServerLevelServerRole 2"],owner:"ServerLevelLogin 2",memberships:["ServerLevelServerRole 3","ServerLevelServerRole 4"],securablePermissions:u},isFixedRole:!1,serverRoles:["ServerLevelServerRole 2","ServerLevelServerRole 3","ServerLevelServerRole 4"],supportedSecurableTypes:c}}getApplicationRoleView(e,t){return e?{objectInfo:{name:"",defaultSchema:"dbo",ownedSchemas:[],securablePermissions:[]},schemas:["dbo","sys","admin"],supportedSecurableTypes:[]}:{objectInfo:{name:"app role1",password:"******************",defaultSchema:"dbo",ownedSchemas:["dbo"],securablePermissions:d},schemas:["dbo","sys","admin"],supportedSecurableTypes:l}}getDatabaseRoleView(e,t){return e?{objectInfo:{name:"",owner:"",members:[],ownedSchemas:[],securablePermissions:[]},schemas:["dbo","sys","admin"],supportedSecurableTypes:l}:{objectInfo:{name:"db role1",owner:"",members:[],ownedSchemas:["dbo"],securablePermissions:d},schemas:["dbo","sys","admin"],supportedSecurableTypes:l}}getDatabaseView(e,t){return e?{objectInfo:{name:"New Database Name",owner:"",collationName:"",compatibilityLevel:"",containmentType:"",recoveryModel:"",azureEdition:"",azureMaxSize:"",azureBackupRedundancyLevel:"",azureServiceLevelObjective:""}}:{collationNames:{defaultValueIndex:0,options:["Latin1_General_100_CI_AS_KS_WS","Latin1_General_100_CI_AS_KS_WS_SC"]},compatibilityLevels:{defaultValueIndex:0,options:["SQL Server 2008","SQL Server 2012","SQL Server 2014","SQL Server 2016","SQL Server 2017","SQL Server 2019"]},containmentTypes:{defaultValueIndex:0,options:["NONE","PARTIAL"]},loginNames:{defaultValueIndex:0,options:["user1","user2","user3"]},restrictAccessOptions:["MULTI_USER","RESTRICTED_USER","SINGLE_USER"],recoveryModels:{defaultValueIndex:0,options:["FULL","SIMPLE","BULK_LOGGED"]},pageVerifyOptions:["CHECKSUM","NONE","TORN_PAGE_DETECTION"],dscElevateOptions:["OFF","WHEN_SUPPORTED","FAIL_UNSUPPORTED"],dscEnableDisableOptions:["ENABLED","DISABLED"],propertiesOnOffOptions:["ON","OFF"],rowDataFileGroupsOptions:["PRIMARY","RowDataGroup1","RowDataGroup2"],fileStreamFileGroupsOptions:["PRIMARY","FileStreamGroup1","FileStreamGroup2"],fileTypesOptions:["ROWS","LOG","FILESTREAM"],objectInfo:{name:"Database Properties1",collationName:"Latin1_General_100_CI_AS_KS_WS",dateCreated:"5/31/2023 8:05:55 AM",lastDatabaseBackup:"None",lastDatabaseLogBackup:"None",memoryAllocatedToMemoryOptimizedObjectsInMb:0,memoryUsedByMemoryOptimizedObjectsInMb:0,numberOfUsers:5,owner:"databaseProperties 1",sizeInMb:16,spaceAvailableInMb:1.15,status:"Normal",autoCreateIncrementalStatistics:!1,autoCreateStatistics:!0,autoShrink:!1,autoUpdateStatistics:!0,autoUpdateStatisticsAsynchronously:!1,isLedgerDatabase:!1,pageVerify:"CHECKSUM",targetRecoveryTimeInSec:60,databaseReadOnly:!0,encryptionEnabled:!1,restrictAccess:"SINGLE_USER",databaseScopedConfigurations:[{name:"MAXDOP",valueForPrimary:"",valueForSecondary:""},{name:"legacy_cardinality_estimation",valueForPrimary:"ON",valueForSecondary:"ON"},{name:"parameter_sniffing",valueForPrimary:"ON",valueForSecondary:"OFF"},{name:"query_optimizer_hotfixes",valueForPrimary:"ON",valueForSecondary:"OFF"},{name:"identity_cache",valueForPrimary:"ON",valueForSecondary:"ON"},{name:"interleaved_execution_tvf",valueForPrimary:"ON",valueForSecondary:"ON"},{name:"batch_mode_memory_grant_feedback",valueForPrimary:"OFF",valueForSecondary:"OFF"},{name:"batch_mode_adaptive_joins",valueForPrimary:"OFF",valueForSecondary:"ON"},{name:"tsql_scalar_udf_inlining",valueForPrimary:"ON",valueForSecondary:"ON"}],isFilesTabSupported:!0,files:[{id:1,name:"databasefile1",type:"ROWS Data",path:"C:\\Temp\\",fileGroup:"PRIMARY",fileNameWithExtension:"databasefile1.mdf",sizeInMb:62,isAutoGrowthEnabled:!0,autoFileGrowth:64,autoFileGrowthType:0,maxSizeLimitInMb:-1},{id:2,name:"databasefile1_Log",type:"Log",path:"C:\\Temp\\",fileGroup:"Not Applicable",fileNameWithExtension:"databasefile1_log.ldf",sizeInMb:62,isAutoGrowthEnabled:!0,autoFileGrowth:64,autoFileGrowthType:1,maxSizeLimitInMb:-1}]}}}delayAndResolve(e){return new Promise(((t,n)=>{setTimeout((()=>{t(e)}),1e3)}))}}},9189:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationRoleDialog=void 0;const r=n(2576),i=n(3942),o=n(3307),s=n(886),a=n(3801);class c extends a.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!0,supportEffectivePermissions:!1})}postInitializeData(){this.objectInfo.password=this.objectInfo.password??""}get helpUrl(){return this.options.isNewObject?i.CreateApplicationRoleDocUrl:i.AlterApplicationRoleDocUrl}async validateInput(){const e=await super.validateInput();return this.objectInfo.password||e.push(r.PasswordCannotBeEmptyError),!this.objectInfo.password||(0,o.isValidSQLPassword)(this.objectInfo.password,this.objectInfo.name)||!this.options.isNewObject&&this.objectInfo.password===this.originalObjectInfo.password||e.push(r.InvalidPasswordError),this.objectInfo.password!==this.confirmPasswordInput.value&&e.push(r.PasswordsNotMatchError),e}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeOwnedSchemasSection(),this.formContainer.addItems([this.generalSection,this.ownedSchemasSection,this.securableSection],this.getSectionItemLayout())}initializeGeneralSection(){this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:r.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const e=this.createLabelInputContainer(r.NameText,this.nameInput);this.defaultSchemaDropdown=this.createDropdown(r.DefaultSchemaText,(async e=>{this.objectInfo.defaultSchema=e}),this.viewInfo.schemas,this.objectInfo.defaultSchema);const t=this.createLabelInputContainer(r.DefaultSchemaText,this.defaultSchemaDropdown);this.passwordInput=this.createPasswordInputBox(r.PasswordText,(async e=>{this.objectInfo.password=e}),this.objectInfo.password??"");const n=this.createLabelInputContainer(r.PasswordText,this.passwordInput);this.confirmPasswordInput=this.createPasswordInputBox(r.ConfirmPasswordText,(async()=>{}),this.objectInfo.password??"");const i=this.createLabelInputContainer(r.ConfirmPasswordText,this.confirmPasswordInput);this.generalSection=this.createGroup(r.GeneralSectionHeader,[e,t,n,i],!1)}initializeOwnedSchemasSection(){this.ownedSchemaTable=this.createTableList(r.OwnedSchemaSectionHeader,[r.SchemaText],this.viewInfo.schemas,this.objectInfo.ownedSchemas,s.DefaultMaxTableRowCount,(e=>-1===this.objectInfo.ownedSchemas.indexOf(e))),this.ownedSchemasSection=this.createGroup(r.OwnedSchemaSectionHeader,[this.ownedSchemaTable])}}t.ApplicationRoleDialog=c},2414:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachDatabaseDialog=void 0;const r=n(9072),i=n(7835),o=n(3942),s=n(2576),a=n(1959),c=n(886),l=n(1017),u=n(8682);class d extends i.ObjectManagementDialogBase{constructor(e,t){super(e,t,s.AttachDatabaseDialogTitle,"AttachDatabase"),this._databasesToAttach=[],this._databaseFiles=[],this._fileFilters=[{label:s.DatabaseFilesFilterLabel,filters:["*.mdf"]}],this.dialogObject.okButton.label=s.AttachButtonLabel}get isDirty(){return this._databasesToAttach.length>0}get saveChangesTaskLabel(){return s.AttachDatabaseOperationDisplayName}async initializeUI(){let e=this.initializeAttachSection(),t=this.initializeAssociatedFilesSection();this.formContainer.addItems([e,t])}initializeAttachSection(){const e=[s.MdfFileLocation,s.DatabaseName];this._databasesTable=this.createTable(s.DatabasesToAttachLabel,e,[]),this.disposables.push(this._databasesTable.onRowSelected((()=>this.onFileRowSelected())));let t={buttonAriaLabel:s.AddFileAriaLabel,buttonHandler:async()=>await this.onAddFilesButtonClicked()},n={buttonAriaLabel:a.RemoveText,buttonHandler:async()=>await this.onRemoveFilesButtonClicked()};const r=this.addButtonsForTable(this._databasesTable,t,n);return this._nameField=this.createInputBox((async e=>{if(this._databasesTable.selectedRows?.length>0){let t=this._databasesTable.selectedRows[0];this._databasesToAttach[t].databaseName=e}}),{}),this._nameContainer=this.createLabelInputContainer(s.AttachAsText,this._nameField),this._ownerDropdown=this.createDropdown(s.OwnerText,(async e=>{if(this._databasesTable.selectedRows?.length>0){let t=this._databasesTable.selectedRows[0];this._databasesToAttach[t].owner=e}}),this.viewInfo.loginNames.options,this.viewInfo.loginNames.options[this.viewInfo.loginNames.defaultValueIndex]),this._ownerContainer=this.createLabelInputContainer(s.OwnerText,this._ownerDropdown),this._nameContainer.display="none",this._ownerContainer.display="none",this.createGroup(s.DatabasesToAttachLabel,[this._databasesTable,r,this._nameContainer,this._ownerContainer],!1)}initializeAssociatedFilesSection(){const e=[s.DatabaseFileNameLabel,s.DatabaseFileTypeLabel,s.DatabaseFilePathLabel];return this._associatedFilesTable=this.createTable(s.DatabaseFilesLabel,e,[]),this.createGroup(s.AssociatedFilesLabel,[this._associatedFilesTable],!1)}async onFileRowSelected(){if(this._databasesTable.selectedRows?.length>0){let e=this._databasesTable.selectedRows[0],t=this._databasesToAttach[e];this._nameField.value=t.databaseName,this._ownerDropdown.value=t.owner,await this.updateAssociatedFilesTable(t.databaseFilePaths)}else await this.updateAssociatedFilesTable([])}async updateAssociatedFilesTable(e){let t=e.map((e=>{let t=l.extname(e),n=".ldf"===t?s.LogFileLabel:s.DataFileLabel;return[l.basename(e,t),n,e]}));await this._associatedFilesTable.updateProperties({data:t,height:(0,c.getTableHeight)(t.length,c.DefaultMinTableRowCount)})}async onAddFilesButtonClicked(){try{let e=await this.objectManagementService.getDataFolder(this.options.connectionUri),t=await r.window.openServerFileBrowserDialog(this.options.connectionUri,e,this._fileFilters);if(t){let e=this.viewInfo.loginNames?.options[this.viewInfo.loginNames.defaultValueIndex],n=l.basename(t,l.extname(t)),r=[t,n],i=await this.objectManagementService.getAssociatedFiles(this.options.connectionUri,t)??[];this._databaseFiles.push(r),this._databasesToAttach.push({databaseName:n,databaseFilePaths:i,owner:e}),this._nameContainer.display="block",this._ownerContainer.display="block",await this.updateTableData(),this._databasesTable.setActiveCell(this._databasesToAttach.length-1,0)}}catch(e){this.dialogObject.message={text:(0,u.getErrorMessage)(e),level:r.window.MessageLevel.Error}}}async onRemoveFilesButtonClicked(){let e=this._databasesTable.selectedRows,t=0;for(let n of e){let e=n-t;this._databaseFiles.splice(e,1),this._databasesToAttach.splice(e,1),t++}0===this._databasesToAttach.length?(this._nameContainer.display="none",this._ownerContainer.display="none"):this._databasesTable.setActiveCell(0,0),await this.updateTableData()}async updateTableData(){await this._databasesTable.updateProperties({data:this._databaseFiles,height:(0,c.getTableHeight)(this._databaseFiles.length,c.DefaultMinTableRowCount)}),this.onFormFieldChange()}get helpUrl(){return o.AttachDatabaseDocUrl}get actionName(){return"AttachDatabase"}async validateInput(){let e=[];return 0===this._databasesToAttach.length&&e.push(s.NoDatabaseFilesError),e}async saveChanges(e,t){await this.objectManagementService.attachDatabases(this.options.connectionUri,this._databasesToAttach,!1)}async generateScript(){return await this.objectManagementService.attachDatabases(this.options.connectionUri,this._databasesToAttach,!0)}}t.AttachDatabaseDialog=d},9456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseDialog=void 0;const r=n(9072),i=n(7835),o=n(886),s=n(2576),a=n(3942),c=n(3307),l=n(2938),u=n(8602),d=n(9496);class p extends i.ObjectManagementDialogBase{constructor(e,t){super(e,t),this.optionsTabSectionsContainer=[],this.generalTabId="generalDatabaseId",this.filesTabId="filesDatabaseId",this.fileGroupsTabId="fileGroupsDatabaseId",this.newFileGroupTemporaryId=0,this.rowDataFileGroupsTableRows=[],this.filestreamDataFileGroupsTableRows=[],this.memoryoptimizedFileGroupsTableRows=[],this.optionsTabId="optionsDatabaseId",this.dscTabId="dscDatabaseId",this.dscTabSectionsContainer=[],this.setFocusToInput=void 0,this.queryStoreTabId="queryStoreTabId",this.queryStoreTabSectionsContainer=[]}get helpUrl(){return this.options.isNewObject?a.CreateDatabaseDocUrl:this.getDatabasePropertiesDocUrl()}getDatabasePropertiesDocUrl(){let e="";switch(this.activeTabId){case this.generalTabId:e=a.DatabaseGeneralPropertiesDocUrl;break;case this.filesTabId:e=a.DatabaseFilesPropertiesDocUrl;break;case this.fileGroupsTabId:e=a.DatabaseFileGroupsPropertiesDocUrl;break;case this.optionsTabId:e=a.DatabaseOptionsPropertiesDocUrl;break;case this.dscTabId:e=a.DatabaseScopedConfigurationPropertiesDocUrl;break;case this.queryStoreTabId:e=a.QueryStorePropertiesDocUrl}return e}async initializeUI(){if(this.options.isNewObject){let e=[];e.push(this.initializeGeneralSection()),e.push(this.initializeOptionsSection()),this.viewInfo.isAzureDB&&e.push(this.initializeConfigureSLOSection()),this.formContainer.addItems(e)}else{this.initializeBackupSection(),this.initializeDatabaseSection(),this.initializeOptionsGeneralSection(),this.initializeAutomaticSection(),(0,l.isUndefinedOrNull)(this.objectInfo.isLedgerDatabase)||this.initializeLedgerSection(),(0,l.isUndefinedOrNull)(this.objectInfo.pageVerify)||(0,l.isUndefinedOrNull)(this.objectInfo.targetRecoveryTimeInSec)||this.initializeRecoverySection(),this.initializeStateSection();const e=[];if(this.generalTab={title:s.GeneralSectionHeader,id:this.generalTabId,content:this.createGroup("",[this.databaseSection,this.backupSection],!1)},e.push(this.generalTab),(0,l.isUndefinedOrNull)(this.objectInfo.filegroups)||this.updateFileGroupsOptionsAndTableRows(),!(0,l.isUndefinedOrNull)(this.objectInfo.isFilesTabSupported)){const t=this.initializeFilesGeneralSection(),n=this.initializeDatabaseFilesSection();this.filesTab={title:s.FilesSectionHeader,id:this.filesTabId,content:this.createGroup("",[t,n],!1)},e.push(this.filesTab)}if(!(0,l.isUndefinedOrNull)(this.objectInfo.filegroups)){const t=await this.initializeRowsFileGroupSection(),n=await this.initializeFileStreamFileGroupSection(),r=await this.initializeMemoryOptimizedFileGroupSection();this.fileGroupsTab={title:s.FileGroupsSectionHeader,id:this.fileGroupsTabId,content:this.createGroup("",[t,n,r],!1)},e.push(this.fileGroupsTab)}this.optionsTab={title:s.OptionsSectionHeader,id:this.optionsTabId,content:this.createGroup("",this.optionsTabSectionsContainer,!1)},e.push(this.optionsTab),(0,l.isUndefinedOrNull)(this.objectInfo.databaseScopedConfigurations)||(await this.initializeDatabaseScopedConfigurationSection(),this.dscTabSectionsContainer.push(await this.initializeDscValueDropdownTypeSection()),this.dscTabSectionsContainer.push(await this.initializeDscValueInputTypeSection()),this.dscTab={title:s.DatabaseScopedConfigurationTabHeader,id:this.dscTabId,content:this.createGroup("",this.dscTabSectionsContainer,!1)},e.push(this.dscTab)),(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions)||(this.initializeQueryStoreGeneralSection(),this.initializeQueryStoreMonitoringSection(),this.initializeQueryStoreRetentionSection(),(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.capturePolicyOptions)||this.initializeQueryStoreCapturePolicySection(),await this.initializeQueryStoreCurrentDiskStorageSection(),this.queryStoreTab={title:s.QueryStoreTabHeader,id:this.queryStoreTabId,content:this.createGroup("",this.queryStoreTabSectionsContainer,!1)},e.push(this.queryStoreTab));const t={title:"",tabs:e},n=this.modelView.modelBuilder.tabbedPanel().withTabs([t]).withLayout({orientation:r.TabOrientation.Vertical}).withProps({CSSStyles:{margin:"-10px 0px 0px -10px"}}).component();this.disposables.push(n.onTabChanged((async e=>{this.activeTabId=e}))),this.formContainer.addItem(n)}}async validateInput(){let e=await super.validateInput(),t=this.viewInfo.collationNames?.options;if(t?.length>0&&!t.some((e=>e.toLowerCase()===this.objectInfo.collationName?.toLowerCase()))&&e.push(s.CollationNotValidError(this.objectInfo.collationName??"")),this.objectInfo.filegroups?.length>0){let t=new Set;this.objectInfo.filegroups.map((function(n){""===n.name?e.push(s.EmptyFilegroupNameError):t.has(n.name)?e.push(s.FilegroupExistsError(n.name)):t.add(n.name)}))}return e}initializeGeneralSection(){let e=[];const t={ariaLabel:s.NameText,required:!0,maxLength:128};this.nameInput=this.createInputBox((async()=>{this.objectInfo.name=this.nameInput.value}),t),e.push(this.createLabelInputContainer(s.NameText,this.nameInput));let n=this.viewInfo.loginNames?.options;if(n?.length>0){let t=this.viewInfo.loginNames.defaultValueIndex;this.objectInfo.owner=n[t];let r=this.createDropdown(s.OwnerText,(async()=>{this.objectInfo.owner=r.value}),n,n[t]);e.push(this.createLabelInputContainer(s.OwnerText,r))}return this.createGroup(s.GeneralSectionHeader,e,!1)}initializeOptionsSection(){let e=[],t=this.viewInfo.collationNames?.options;if(t?.length>0){let n=this.viewInfo.collationNames.defaultValueIndex;this.objectInfo.collationName=t[n];let r=this.createDropdown(s.CollationText,(async()=>{this.objectInfo.collationName=r.value}),t,t[n],!0,o.DefaultInputWidth,!0,!0);e.push(this.createLabelInputContainer(s.CollationText,r))}let n=this.viewInfo.recoveryModels?.options;if(n?.length>0){let t=this.viewInfo.recoveryModels.defaultValueIndex;this.objectInfo.recoveryModel=n[t];let r=this.createDropdown(s.RecoveryModelText,(async()=>{this.objectInfo.recoveryModel=r.value}),n,n[t]);e.push(this.createLabelInputContainer(s.RecoveryModelText,r))}let r=this.viewInfo.compatibilityLevels?.options;if(r?.length>0){let t=this.viewInfo.compatibilityLevels.defaultValueIndex;this.objectInfo.compatibilityLevel=r[t];let n=this.createDropdown(s.CompatibilityLevelText,(async()=>{this.objectInfo.compatibilityLevel=n.value}),r,r[t]);e.push(this.createLabelInputContainer(s.CompatibilityLevelText,n))}let i=this.viewInfo.containmentTypes?.options;if(i?.length>0){let t=this.viewInfo.containmentTypes.defaultValueIndex;this.objectInfo.containmentType=i[t];let n=this.createDropdown(s.ContainmentTypeText,(async()=>{this.objectInfo.containmentType=n.value}),i,i[t]);e.push(this.createLabelInputContainer(s.ContainmentTypeText,n))}return this.createGroup(s.OptionsSectionHeader,e,!0,!0)}initializeBackupSection(){this.lastDatabaseBackupInput=this.createInputBox((async()=>{}),{ariaLabel:s.LastDatabaseBackupText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.lastDatabaseBackup});const e=this.createLabelInputContainer(s.LastDatabaseBackupText,this.lastDatabaseBackupInput);this.lastDatabaseLogBackupInput=this.createInputBox((async()=>{}),{ariaLabel:s.LastDatabaseLogBackupText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.lastDatabaseLogBackup});const t=this.createLabelInputContainer(s.LastDatabaseLogBackupText,this.lastDatabaseLogBackupInput);this.backupSection=this.createGroup(s.BackupSectionHeader,[e,t],!0)}initializeDatabaseSection(){this.nameInput=this.createInputBox((async()=>{}),{ariaLabel:s.NamePropertyText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const e=this.createLabelInputContainer(s.NamePropertyText,this.nameInput);this.statusInput=this.createInputBox((async()=>{}),{ariaLabel:s.StatusText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.status});const t=this.createLabelInputContainer(s.StatusText,this.statusInput);this.ownerInput=this.createInputBox((async()=>{}),{ariaLabel:s.OwnerPropertyText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.owner});const n=this.createLabelInputContainer(s.OwnerPropertyText,this.ownerInput);this.dateCreatedInput=this.createInputBox((async()=>{}),{ariaLabel:s.DateCreatedText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.dateCreated});const r=this.createLabelInputContainer(s.DateCreatedText,this.dateCreatedInput);this.sizeInput=this.createInputBox((async()=>{}),{ariaLabel:s.SizeText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.sizeInMb)});const i=this.createLabelInputContainer(s.SizeText,this.sizeInput);this.spaceAvailabeInput=this.createInputBox((async()=>{}),{ariaLabel:s.SpaceAvailableText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.spaceAvailableInMb)});const o=this.createLabelInputContainer(s.SpaceAvailableText,this.spaceAvailabeInput);this.numberOfUsersInput=this.createInputBox((async()=>{}),{ariaLabel:s.NumberOfUsersText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.numberOfUsers.toString()});const a=this.createLabelInputContainer(s.NumberOfUsersText,this.numberOfUsersInput);this.memoryAllocatedInput=this.createInputBox((async()=>{}),{ariaLabel:s.MemoryAllocatedText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.memoryAllocatedToMemoryOptimizedObjectsInMb)});const l=this.createLabelInputContainer(s.MemoryAllocatedText,this.memoryAllocatedInput);this.memoryUsedInput=this.createInputBox((async()=>{}),{ariaLabel:s.MemoryUsedText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.memoryUsedByMemoryOptimizedObjectsInMb)});const u=this.createLabelInputContainer(s.MemoryUsedText,this.memoryUsedInput);this.collationInput=this.createInputBox((async()=>{}),{ariaLabel:s.CollationText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.collationName});const d=this.createLabelInputContainer(s.CollationText,this.collationInput);this.databaseSection=this.createGroup(s.DatabaseSectionHeader,[e,t,n,d,r,i,o,a,l,u],!0)}initializeFilesGeneralSection(){let e=[];this.nameInput=this.createInputBox((async()=>{}),{ariaLabel:s.DatabaseNameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name}),e.push(this.createLabelInputContainer(s.DatabaseNameText,this.nameInput));let t=this.viewInfo.loginNames?.options;if(t?.length>0){this.viewInfo.loginNames?.options.find((e=>e===this.objectInfo.owner))?t.splice(0,1):t[0]=this.objectInfo.owner;let n=this.createDropdown(s.OwnerText,(async()=>{this.objectInfo.owner=n.value}),t,this.objectInfo.owner);e.push(this.createLabelInputContainer(s.OwnerText,n))}return this.createGroup("",e,!1)}initializeDatabaseFilesSection(){this.databaseFilesTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.text,value:s.LogicalNameText},{type:r.ColumnType.text,value:s.FileTypeText},{type:r.ColumnType.text,value:s.FilegroupText},{type:r.ColumnType.text,value:s.SizeInMbText},{type:r.ColumnType.text,value:s.AutogrowthMaxsizeText},{type:r.ColumnType.text,value:s.PathText},{type:r.ColumnType.text,value:s.FileNameText}],data:this.objectInfo.files?.map((e=>this.convertToDataView(e))),height:(0,o.getTableHeight)(this.objectInfo.files?.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),width:o.DefaultTableWidth,forceFitColumns:r.ColumnSizingMode.DataFit,CSSStyles:{"margin-left":"10px"}}).component();const e={buttonAriaLabel:s.AddButton,buttonHandler:e=>this.onAddDatabaseFilesButtonClicked(e)},t={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFilesButtonClicked()},n={buttonAriaLabel:s.EditButton,buttonHandler:e=>this.onEditDatabaseFilesButtonClicked(e)},i=this.addButtonsForTable(this.databaseFilesTable,e,t,n);return this.createGroup(s.DatabaseFilesText,[this.databaseFilesTable,i],!0)}convertToDataView(e){return[e.name,e.type,e.fileGroup,e.sizeInMb,e.isAutoGrowthEnabled?s.AutoGrowthValueStringGenerator(e.type!==s.FilestreamFileType,e.autoFileGrowth.toString(),1===e.autoFileGrowthType,e.maxSizeLimitInMb):s.NoneText,e.path,e.fileNameWithExtension]}async onAddDatabaseFilesButtonClicked(e){const t=await this.openDatabaseFileDialog(e);if(!(0,l.isUndefinedOrNull)(t)){this.objectInfo.files?.push(t);var n=this.objectInfo.files?.map((e=>this.convertToDataView(e)));await this.setTableData(this.databaseFilesTable,n,o.DefaultMaxTableRowCount),await this.updateFileGroupsTablesfileCount(t.type)}}async onEditDatabaseFilesButtonClicked(e){if(1===this.databaseFilesTable.selectedRows.length){const n=await this.openDatabaseFileDialog(e);if(!(0,l.isUndefinedOrNull)(n)){this.objectInfo.files[this.databaseFilesTable.selectedRows[0]]=n;var t=this.objectInfo.files?.map((e=>this.convertToDataView(e)));await this.setTableData(this.databaseFilesTable,t,o.DefaultMaxTableRowCount),await this.updateFileGroupsTablesfileCount(n.type)}}}async onRemoveDatabaseFilesButtonClicked(){if(1===this.databaseFilesTable.selectedRows.length){await this.updateFileGroupsTablesfileCount(this.objectInfo.files[this.databaseFilesTable.selectedRows[0]].type),this.objectInfo.files?.splice(this.databaseFilesTable.selectedRows[0],1);var e=this.objectInfo.files?.map((e=>this.convertToDataView(e)));await this.setTableData(this.databaseFilesTable,e,o.DefaultMaxTableRowCount)}}async updateFileGroupsTablesfileCount(e){if(e===s.RowsDataFileType){let e=this.getTableData(0);await this.setTableData(this.rowsFilegroupsTable,e)}else if(e===s.FilestreamFileType){let e=this.getTableData(2);await this.setTableData(this.filestreamFilegroupsTable,e),e=this.getTableData(3),await this.setTableData(this.memoryOptimizedFilegroupsTable,e)}}removeButtonEnabled(e){let t=!0;if(e===this.databaseFilesTable&&void 0!==this.databaseFilesTable.selectedRows){const e=this.objectInfo.files[this.databaseFilesTable.selectedRows[0]].id;1===this.databaseFilesTable.selectedRows.length&&1===e?t=!1:this.objectInfo.files[this.databaseFilesTable.selectedRows[0]].type===s.LogFiletype&&(t=!1,this.objectInfo.files.forEach((n=>{n.id!==e&&n.type===s.LogFiletype&&(t=!0)})))}else if(e===this.rowsFilegroupsTable&&void 0!==this.rowsFilegroupsTable.selectedRows&&1===this.rowsFilegroupsTable.selectedRows.length){const e=this.rowDataFileGroupsTableRows[this.rowsFilegroupsTable.selectedRows[0]];"PRIMARY"===e.name&&e.id>0&&(t=!1)}else e===this.filestreamFilegroupsTable&&1===this.filestreamFilegroupsTable.selectedRows?.length&&(this.serverFilestreamEnabled||(t=!1));return t}async openDatabaseFileDialog(e){const t=void 0!==this.databaseFilesTable.selectedRows?this.objectInfo.files[this.databaseFilesTable?.selectedRows[0]]:void 0;(0,l.isUndefinedOrNull)(t)||t.type!==s.FilestreamFileType||(t.autoFileGrowth=64);const n=e.ariaLabel===s.AddButton,r=e.ariaLabel===s.EditButton&&void 0===t.id,i=n?{id:void 0,name:"",type:s.RowsDataFileType,path:this.objectInfo.files[0].path,fileGroup:this.rowDatafileGroupsOptions.find((e=>"PRIMARY"===e)),fileNameWithExtension:"",sizeInMb:8,isAutoGrowthEnabled:!0,autoFileGrowth:64,autoFileGrowthType:0,maxSizeLimitInMb:100}:t,o=new u.DatabaseFileDialog({title:n||r?s.AddDatabaseFilesText:s.EditDatabaseFilesText(i.name),viewInfo:this.viewInfo,files:this.objectInfo.files,rowFilegroups:this.rowDatafileGroupsOptions,filestreamFilegroups:this.filestreamDatafileGroupsOptions,isNewFile:n,isEditingNewFile:r,databaseFile:i,defaultFileConstants:{defaultFileSizeInMb:8,defaultFileGrowthInMb:64,defaultFileGrowthInPercent:10,defaultMaxFileSizeLimitedToInMb:100},connectionUri:this.options.connectionUri},this.objectManagementService);return await o.open(),await o.waitForClose()}async initializeRowsFileGroupSection(){const e=this.getTableData(0);this.rowsFilegroupsTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.text,value:s.NameText,width:120},{type:r.ColumnType.text,value:s.FilesText,width:60},{type:r.ColumnType.checkBox,value:s.ReadOnlyText,width:80},{type:r.ColumnType.checkBox,value:s.DefaultText,width:80},{type:r.ColumnType.checkBox,value:s.AutogrowAllFilesText,width:110}],data:e,height:(0,o.getTableHeight)(e.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),width:o.DefaultTableWidth,forceFitColumns:r.ColumnSizingMode.DataFit,CSSStyles:{"margin-left":"10px"}}).component(),this.rowsFilegroupNameContainer=await this.getFilegroupNameGroup(this.rowsFilegroupsTable,0);const t={buttonAriaLabel:s.AddFilegroupText,buttonHandler:()=>this.onAddDatabaseFileGroupsButtonClicked(this.rowsFilegroupsTable)},n={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFileGroupsButtonClicked(this.rowsFilegroupsTable)};return this.rowsFileGroupButtonContainer=this.addButtonsForTable(this.rowsFilegroupsTable,t,n),this.disposables.push(this.rowsFilegroupsTable.onCellAction((async e=>{let t=this.rowDataFileGroupsTableRows[e.row];2===e.column&&(t.isReadOnly=e.checked),3===e.column&&this.updateFilegroupsDefaultColumnValues(e,t,0),4===e.column&&(t.autogrowAllFiles=e.checked);let n=this.getTableData(0);await this.setTableData(this.rowsFilegroupsTable,n),this.onFormFieldChange()})),this.rowsFilegroupsTable.onRowSelected((async()=>{if(1===this.rowsFilegroupsTable.selectedRows.length){const e=this.rowDataFileGroupsTableRows[this.rowsFilegroupsTable.selectedRows[0]];this.rowsFilegroupNameContainer.display=e.id<0?"inline-flex":"none",this.rowsFilegroupNameInput.value=e.name,this.onFormFieldChange()}}))),this.createGroup(s.RowsFileGroupsSectionText,[this.rowsFilegroupsTable,this.rowsFilegroupNameContainer,this.rowsFileGroupButtonContainer],!0)}async initializeFileStreamFileGroupSection(){const e=this.getTableData(2);this.filestreamFilegroupsTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.text,value:s.NameText},{type:r.ColumnType.text,value:s.FilestreamFilesText},{type:r.ColumnType.checkBox,value:s.ReadOnlyText},{type:r.ColumnType.checkBox,value:s.DefaultText}],data:e,height:(0,o.getTableHeight)(e.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),width:o.DefaultTableWidth,forceFitColumns:r.ColumnSizingMode.DataFit,CSSStyles:{"margin-left":"10px"}}).component(),this.filestreamFilegroupNameContainer=await this.getFilegroupNameGroup(this.filestreamFilegroupsTable,2);const t={buttonAriaLabel:s.AddFilegroupText,buttonHandler:()=>this.onAddDatabaseFileGroupsButtonClicked(this.filestreamFilegroupsTable),enabled:this.serverFilestreamEnabled},n={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFileGroupsButtonClicked(this.filestreamFilegroupsTable)};return this.filestreamFileGroupButtonContainer=this.addButtonsForTable(this.filestreamFilegroupsTable,t,n),this.disposables.push(this.filestreamFilegroupsTable.onCellAction((async e=>{let t=this.filestreamDataFileGroupsTableRows[e.row];2===e.column?t.isReadOnly=e.checked:3===e.column&&this.updateFilegroupsDefaultColumnValues(e,t,2);let n=this.getTableData(2);await this.setTableData(this.filestreamFilegroupsTable,n),this.onFormFieldChange()})),this.filestreamFilegroupsTable.onRowSelected((async()=>{if(1===this.filestreamFilegroupsTable.selectedRows.length){const e=this.filestreamDataFileGroupsTableRows[this.filestreamFilegroupsTable.selectedRows[0]];this.filestreamFilegroupNameContainer.display=e.id<0?"inline-flex":"none",this.filestreamFilegroupNameInput.value=e.name,this.onFormFieldChange()}}))),this.createGroup(s.FileStreamFileGroupsSectionText,[this.filestreamFilegroupsTable,this.filestreamFilegroupNameContainer,this.filestreamFileGroupButtonContainer],!0)}async initializeMemoryOptimizedFileGroupSection(){const e=this.getTableData(3);this.memoryOptimizedFilegroupsTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.text,value:s.NameText},{type:r.ColumnType.text,value:s.FilestreamFilesText}],data:e,height:(0,o.getTableHeight)(e.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),width:o.DefaultTableWidth,forceFitColumns:r.ColumnSizingMode.DataFit,CSSStyles:{"margin-left":"10px"}}).component(),this.memoryOptimizedFilegroupNameContainer=await this.getFilegroupNameGroup(this.memoryOptimizedFilegroupsTable,3);const t={buttonAriaLabel:s.AddFilegroupText,buttonHandler:()=>this.onAddDatabaseFileGroupsButtonClicked(this.memoryOptimizedFilegroupsTable),enabled:this.memoryoptimizedFileGroupsTableRows.length<1},n={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFileGroupsButtonClicked(this.memoryOptimizedFilegroupsTable)};return this.memoryOptimizedFileGroupButtonContainer=this.addButtonsForTable(this.memoryOptimizedFilegroupsTable,t,n),this.disposables.push(this.memoryOptimizedFilegroupsTable.onRowSelected((async()=>{if(1===this.memoryOptimizedFilegroupsTable.selectedRows.length){const e=this.memoryoptimizedFileGroupsTableRows[this.memoryOptimizedFilegroupsTable.selectedRows[0]];this.memoryOptimizedFilegroupNameContainer.display=e.id<0?"inline-flex":"none",this.memoryOptimizedFilegroupNameInput.value=e.name,this.onFormFieldChange()}}))),this.createGroup(s.MemoryOptimizedFileGroupsSectionText,[this.memoryOptimizedFilegroupsTable,this.memoryOptimizedFilegroupNameContainer,this.memoryOptimizedFileGroupButtonContainer],!0)}addButtonEnabled(e){let t=!0;return e===this.memoryOptimizedFilegroupsTable&&(t=this.memoryoptimizedFileGroupsTableRows.length<1),t}updateFilegroupsDefaultColumnValues(e,t,n){e.checked?this.objectInfo.filegroups.forEach((r=>{r.type===n&&(r.isDefault=r.name===t.name&&r.id===t.id?e.checked:!e.checked)})):t.isDefault=e.checked}async onAddDatabaseFileGroupsButtonClicked(e){let t,n={id:--this.newFileGroupTemporaryId,name:"",type:void 0,isReadOnly:!1,isDefault:!1,autogrowAllFiles:!1};e===this.rowsFilegroupsTable?(n.type=0,n.isReadOnly=!1,n.isDefault=!1,n.autogrowAllFiles=!1,this.objectInfo.filegroups?.push(n),t=this.getTableData(0)):e===this.filestreamFilegroupsTable?(n.type=2,n.isReadOnly=!1,n.isDefault=!1,this.objectInfo.filegroups?.push(n),t=this.getTableData(2)):e===this.memoryOptimizedFilegroupsTable&&this.memoryoptimizedFileGroupsTableRows.length<1&&(n.type=3,this.objectInfo.filegroups?.push(n),t=this.getTableData(3)),void 0!==t&&(this.updateFileGroupsOptionsAndTableRows(),await this.setTableData(e,t,o.DefaultMaxTableRowCount),e.setActiveCell(e.data?.length-1,0))}updateFileGroupsOptionsAndTableRows(){let e;this.rowDataFileGroupsTableRows=this.objectInfo.filegroups?.filter((e=>0===e.type)),this.filestreamDataFileGroupsTableRows=this.objectInfo.filegroups?.filter((e=>2===e.type)),this.memoryoptimizedFileGroupsTableRows=this.objectInfo.filegroups?.filter((e=>3===e.type)),this.filestreamDatafileGroupsOptions=this.objectInfo.filegroups?.filter((e=>2===e.type||3===e.type)).map((e=>e.name)),this.rowDatafileGroupsOptions=this.objectInfo.filegroups?.filter((e=>0===e.type)).map((e=>e.name)),-1!==(e=this.rowDatafileGroupsOptions.indexOf("PRIMARY"))&&this.rowDatafileGroupsOptions.unshift(this.rowDatafileGroupsOptions.splice(e,1)[0])}async onRemoveDatabaseFileGroupsButtonClicked(e){if(e===this.rowsFilegroupsTable){if(1===this.rowsFilegroupsTable.selectedRows.length){const e=this.objectInfo.filegroups.indexOf(this.rowDataFileGroupsTableRows[this.rowsFilegroupsTable.selectedRows[0]]);this.objectInfo.filegroups?.splice(e,1);var t=this.getTableData(0);this.rowsFilegroupNameContainer.display="none"}}else if(e===this.filestreamFilegroupsTable){if(1===this.filestreamFilegroupsTable.selectedRows.length){const e=this.objectInfo.filegroups.indexOf(this.filestreamDataFileGroupsTableRows[this.filestreamFilegroupsTable.selectedRows[0]]);this.objectInfo.filegroups?.splice(e,1),t=this.getTableData(2),this.filestreamFilegroupNameContainer.display="none"}}else if(e===this.memoryOptimizedFilegroupsTable&&1===this.memoryOptimizedFilegroupsTable.selectedRows.length){const e=this.objectInfo.filegroups.indexOf(this.memoryoptimizedFileGroupsTableRows[this.memoryOptimizedFilegroupsTable.selectedRows[0]]);this.objectInfo.filegroups?.splice(e,1),t=this.getTableData(3),this.memoryOptimizedFilegroupNameContainer.display="none"}this.updateFileGroupsOptionsAndTableRows(),await this.setTableData(e,t),void 0!==e.selectedRows&&void 0!==e.selectedRows[0]&&e.selectedRows[0]<e.data?.length&&e.setActiveCell(e.selectedRows[0],0)}async getFilegroupNameGroup(e,t){const n=this.getFilegroupNameInput(e,t);e===this.rowsFilegroupsTable?this.rowsFilegroupNameInput=n:e===this.filestreamFilegroupsTable?this.filestreamFilegroupNameInput=n:e===this.memoryOptimizedFilegroupsTable&&(this.memoryOptimizedFilegroupNameInput=n);let r=this.createLabelInputContainer(s.fileGroupsNameInput,[n],!1);return await r.updateCssStyles({margin:"0px 0px -10px 10px"}),r.display="none",r}getFilegroupNameInput(e,t){return this.createInputBox((async n=>{if(1===e.selectedRows.length){let r=null;if(e===this.rowsFilegroupsTable?r=this.rowDataFileGroupsTableRows[e.selectedRows[0]]:e===this.filestreamFilegroupsTable?r=this.filestreamDataFileGroupsTableRows[e.selectedRows[0]]:e===this.memoryOptimizedFilegroupsTable&&(r=this.memoryoptimizedFileGroupsTableRows[e.selectedRows[0]]),null!==r&&r.id<0){r.name=n;let i=this.getTableData(t);await this.setTableData(e,i),this.updateFileGroupsOptionsAndTableRows()}}}),{ariaLabel:"",inputType:"text",enabled:!0,value:"",width:o.DefaultInputWidth})}getTableData(e){let t=[];return this.objectInfo.filegroups?.map((n=>{const r=this.objectInfo.files?.filter((e=>e.fileGroup===n.name)).length;0===e&&n.type===e?t.push([n.name,r,{checked:n.isReadOnly,enabled:"PRIMARY"!==n.name&&r>0},{checked:n.isDefault,enabled:r>0},{checked:n.autogrowAllFiles,enabled:r>0}]):2===n.type&&n.type===e?t.push([n.name,r,{checked:n.isReadOnly,enabled:r>0&&this.serverFilestreamEnabled},{checked:n.isDefault,enabled:this.serverFilestreamEnabled}]):3===n.type&&n.type===e&&t.push([n.name,r])})),t}get serverFilestreamEnabled(){return null!==this.viewInfo.serverFilestreamAccessLevel&&0!==this.viewInfo.serverFilestreamAccessLevel}initializeOptionsGeneralSection(){let e=[],t=this.viewInfo.collationNames.options,n=this.createDropdown(s.CollationText,(async e=>{this.objectInfo.collationName=e}),t,this.objectInfo.collationName,!0,o.DefaultInputWidth,!0,!0);e.push(this.createLabelInputContainer(s.CollationText,n));let r=this.viewInfo.recoveryModels.options,i=0===r.length?[this.objectInfo.recoveryModel]:r,a=0!==r.length,c=this.createDropdown(s.RecoveryModelText,(async e=>{this.objectInfo.recoveryModel=e}),i,this.objectInfo.recoveryModel,a);e.push(this.createLabelInputContainer(s.RecoveryModelText,c));let l=this.viewInfo.compatibilityLevels.options,u=this.createDropdown(s.CompatibilityLevelText,(async e=>{this.objectInfo.compatibilityLevel=e}),l,this.objectInfo.compatibilityLevel);e.push(this.createLabelInputContainer(s.CompatibilityLevelText,u));let d=this.viewInfo.containmentTypes.options;i=0===d.length?[this.objectInfo.containmentType]:d,a=0!==d.length;let p=this.createDropdown(s.ContainmentTypeText,(async e=>{this.objectInfo.containmentType=e}),i,this.objectInfo.containmentType,a);e.push(this.createLabelInputContainer(s.ContainmentTypeText,p));const h=this.createGroup("",e,!0,!0);this.optionsTabSectionsContainer.push(h)}initializeAutomaticSection(){this.autoCreateIncrementalStatisticsInput=this.createCheckbox(s.AutoCreateIncrementalStatisticsText,(async e=>{this.objectInfo.autoCreateIncrementalStatistics=e}),this.objectInfo.autoCreateIncrementalStatistics),this.autoCreateStatisticsInput=this.createCheckbox(s.AutoCreateStatisticsText,(async e=>{this.objectInfo.autoCreateStatistics=e}),this.objectInfo.autoCreateStatistics),this.autoShrinkInput=this.createCheckbox(s.AutoShrinkText,(async e=>{this.objectInfo.autoShrink=e}),this.objectInfo.autoShrink),this.autoUpdateStatisticsInput=this.createCheckbox(s.AutoUpdateStatisticsText,(async e=>{this.objectInfo.autoUpdateStatistics=e}),this.objectInfo.autoUpdateStatistics),this.autoUpdateStatisticsAsynchronouslyInput=this.createCheckbox(s.AutoUpdateStatisticsAsynchronouslyText,(async e=>{this.objectInfo.autoUpdateStatisticsAsynchronously=e}),this.objectInfo.autoUpdateStatisticsAsynchronously);const e=this.createGroup(s.AutomaticSectionHeader,[this.autoCreateIncrementalStatisticsInput,this.autoCreateStatisticsInput,this.autoShrinkInput,this.autoUpdateStatisticsInput,this.autoUpdateStatisticsAsynchronouslyInput],!0);this.optionsTabSectionsContainer.push(e)}initializeLedgerSection(){this.isLedgerDatabaseInput=this.createCheckbox(s.IsLedgerDatabaseText,(async()=>{}),this.objectInfo.isLedgerDatabase,!1);const e=this.createGroup(s.LedgerSectionHeader,[this.isLedgerDatabaseInput],!0);this.optionsTabSectionsContainer.push(e)}initializeRecoverySection(){this.pageVerifyInput=this.createDropdown(s.PageVerifyText,(async e=>{this.objectInfo.pageVerify=e}),this.viewInfo.pageVerifyOptions,this.objectInfo.pageVerify,!0);const e=this.createLabelInputContainer(s.PageVerifyText,this.pageVerifyInput),t={ariaLabel:s.TargetRecoveryTimeInSecondsText,inputType:"number",enabled:!0,min:0};this.targetRecoveryTimeInSecInput=this.createInputBox((async e=>{this.objectInfo.targetRecoveryTimeInSec=Number(e)}),t);const n=this.createLabelInputContainer(s.TargetRecoveryTimeInSecondsText,this.targetRecoveryTimeInSecInput),r=this.createGroup(s.RecoverySectionHeader,[e,n],!0);this.optionsTabSectionsContainer.push(r)}initializeStateSection(){let e=[];(0,l.isUndefinedOrNull)(this.objectInfo.databaseReadOnly)||(this.databaseReadOnlyInput=this.createCheckbox(s.DatabaseReadOnlyText,(async e=>{this.objectInfo.databaseReadOnly=e}),this.objectInfo.databaseReadOnly),e.push(this.databaseReadOnlyInput)),this.statusInput=this.createInputBox((async()=>{}),{ariaLabel:s.StatusText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.status}),e.push(this.createLabelInputContainer(s.DatabaseStateText,this.statusInput)),this.encryptionEnabledInput=this.createCheckbox(s.EncryptionEnabledText,(async e=>{this.objectInfo.encryptionEnabled=e}),this.objectInfo.encryptionEnabled),e.push(this.encryptionEnabledInput),(0,l.isUndefinedOrNull)(this.objectInfo.restrictAccess)||(this.restrictAccessInput=this.createDropdown(s.RestrictAccessText,(async e=>{this.objectInfo.restrictAccess=e}),this.viewInfo.restrictAccessOptions,this.objectInfo.restrictAccess,!0),e.push(this.createLabelInputContainer(s.RestrictAccessText,this.restrictAccessInput)));const t=this.createGroup(s.StateSectionHeader,e,!0);this.optionsTabSectionsContainer.push(t)}async initializeDatabaseScopedConfigurationSection(){let e=new Set([11,12,25,6,21]);const t={type:r.ColumnType.text,value:s.DatabaseScopedOptionsColumnHeader,width:220},n={type:r.ColumnType.text,value:s.ValueForPrimaryColumnHeader,width:105},i={type:r.ColumnType.text,value:s.ValueForSecondaryColumnHeader,width:105};this.dscTable=this.modelView.modelBuilder.table().withProps({columns:[t,n,i],data:this.objectInfo.databaseScopedConfigurations.map((t=>[t.name.toLocaleUpperCase(),t.valueForPrimary,e.has(t.id)?s.NotAvailableText:t.valueForSecondary])),height:(0,o.getTableHeight)(this.objectInfo.databaseScopedConfigurations.length,1,20),width:o.DefaultTableWidth}).component(),this.dscTabSectionsContainer.push(this.createGroup("",[this.dscTable],!0)),this.disposables.push(this.dscTable.onRowSelected((async()=>{this.currentRowId!==this.dscTable.selectedRows[0]&&(this.currentRowId=this.dscTable.selectedRows[0],await this.validateUpdateToggleDscPrimaryAndSecondaryOptions()),(0,l.isUndefinedOrNull)(this.setFocusToInput)||await this.setFocusToInput.focus()})))}async validateUpdateToggleDscPrimaryAndSecondaryOptions(){this.currentRowObjectInfo=this.objectInfo.databaseScopedConfigurations[this.currentRowId];const e=this.currentRowObjectInfo.valueForPrimary===this.currentRowObjectInfo.valueForSecondary;await this.hideDropdownAndInputSections(),11===this.currentRowObjectInfo.id||12===this.currentRowObjectInfo.id?(await this.dscPrimaryValueDropdown.updateCssStyles({display:"inline-flex"}),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.dscElevateOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.dscElevateOptions,value:this.currentRowObjectInfo.valueForPrimary})):1===this.currentRowObjectInfo.id?(await this.showInputSection(e),await this.valueForPrimaryInput.updateProperties({value:this.currentRowObjectInfo.valueForPrimary,max:32767}),await this.valueForSecondaryInput.updateProperties({value:this.currentRowObjectInfo.valueForSecondary,max:32767})):25===this.currentRowObjectInfo.id?(await this.dscPrimaryValueInput.updateCssStyles({display:"inline-flex"}),await this.valueForPrimaryInput.updateProperties({value:this.currentRowObjectInfo.valueForPrimary,max:71582})):38===this.currentRowObjectInfo.id?(await this.showDropdownsSection(e),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify([this.viewInfo.propertiesOnOffOptions[1]])&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:[this.viewInfo.propertiesOnOffOptions[1]],value:this.currentRowObjectInfo.valueForPrimary,editable:!0}),JSON.stringify(this.valueForSecondaryDropdown.values)===JSON.stringify([this.viewInfo.propertiesOnOffOptions[1]])&&this.valueForSecondaryDropdown.value===this.currentRowObjectInfo.valueForSecondary||await this.valueForSecondaryDropdown.updateProperties({values:[this.viewInfo.propertiesOnOffOptions[1]],value:this.currentRowObjectInfo.valueForSecondary,editable:!0})):6===this.currentRowObjectInfo.id||21===this.currentRowObjectInfo.id?(await this.dscPrimaryValueDropdown.updateCssStyles({display:"inline-flex"}),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.propertiesOnOffOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.propertiesOnOffOptions,value:this.currentRowObjectInfo.valueForPrimary})):26===this.currentRowObjectInfo.id?(await this.showDropdownsSection(e),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.dscEnableDisableOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.dscEnableDisableOptions,value:this.currentRowObjectInfo.valueForPrimary}),JSON.stringify(this.valueForSecondaryDropdown.values)===JSON.stringify(this.viewInfo.dscEnableDisableOptions)&&this.valueForSecondaryDropdown.value===this.currentRowObjectInfo.valueForSecondary||await this.valueForSecondaryDropdown.updateProperties({values:this.viewInfo.dscEnableDisableOptions,value:this.currentRowObjectInfo.valueForSecondary})):(await this.showDropdownsSection(e),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.propertiesOnOffOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.propertiesOnOffOptions,value:this.currentRowObjectInfo.valueForPrimary}),JSON.stringify(this.valueForSecondaryDropdown.values)===JSON.stringify(this.viewInfo.propertiesOnOffOptions)&&this.valueForSecondaryDropdown.value===this.currentRowObjectInfo.valueForSecondary||await this.valueForSecondaryDropdown.updateProperties({values:this.viewInfo.propertiesOnOffOptions,value:this.currentRowObjectInfo.valueForSecondary}))}async initializeDscValueInputTypeSection(){this.valueForPrimaryInput=this.createInputBox((async e=>{this.currentRowObjectInfo.valueForPrimary!==e&&(this.currentRowObjectInfo.valueForPrimary=e,this.dscTable.data[this.currentRowId][1]!==e&&(this.dscTable.data[this.currentRowId][1]=e),this.setSecondaryCheckboxForInputType.checked&&25!==this.currentRowObjectInfo.id&&(this.currentRowObjectInfo.valueForSecondary=e,this.dscTable.data[this.currentRowId][2]=e),await this.updateDscTable(this.dscTable.data,this.valueForPrimaryInput))}),{ariaLabel:s.ValueForPrimaryColumnHeader,inputType:"number",enabled:!0,value:"",width:150,min:0}),this.dscPrimaryValueInput=this.createLabelInputContainer(s.ValueForPrimaryColumnHeader,this.valueForPrimaryInput),this.dscPrimaryValueInput.display="none",this.setSecondaryCheckboxForInputType=this.createCheckbox(s.SetSecondaryText,(async e=>{await this.dscSecondaryValueInput.updateCssStyles({display:e?"none":"inline-flex"}),this.currentRowObjectInfo.valueForSecondary=this.currentRowObjectInfo.valueForPrimary,await this.valueForSecondaryInput.updateProperties({value:this.currentRowObjectInfo.valueForSecondary}),this.dscTable.data[this.currentRowId][2]!==this.currentRowObjectInfo.valueForSecondary&&(this.dscTable.data[this.currentRowId][2]=this.currentRowObjectInfo.valueForSecondary,await this.updateDscTable(this.dscTable.data))}),!0),this.setSecondaryCheckboxForInputType.display="none",this.valueForSecondaryInput=this.createInputBox((async e=>{this.currentRowObjectInfo.valueForSecondary=e,this.dscTable.data[this.currentRowId][2]!==e&&(this.dscTable.data[this.currentRowId][2]=e,await this.updateDscTable(this.dscTable.data,this.valueForSecondaryInput))}),{ariaLabel:s.ValueForSecondaryColumnHeader,inputType:"number",enabled:!0,value:"",width:150,min:0}),this.dscSecondaryValueInput=this.createLabelInputContainer(s.ValueForSecondaryColumnHeader,this.valueForSecondaryInput),this.dscSecondaryValueInput.display="none";const e=this.createGroup("",[this.dscPrimaryValueInput,this.setSecondaryCheckboxForInputType,this.dscSecondaryValueInput],!1,!0);return await e.updateCssStyles({"margin-top":"-30px"}),e}async initializeDscValueDropdownTypeSection(){const e=[6,11,12,21];return this.valueForPrimaryDropdown=this.createDropdown(s.ValueForPrimaryColumnHeader,(async t=>{this.currentRowObjectInfo.valueForPrimary!==t&&(this.currentRowObjectInfo.valueForPrimary=t,this.dscTable.data[this.currentRowId][1]=t,this.setSecondaryCheckboxForDropdowns.checked&&!e.includes(this.currentRowObjectInfo.id)&&(this.currentRowObjectInfo.valueForSecondary=t,this.dscTable.data[this.currentRowId][2]=t),await this.updateDscTable(this.dscTable.data))}),[],"",!0,150),this.dscPrimaryValueDropdown=this.createLabelInputContainer(s.ValueForPrimaryColumnHeader,this.valueForPrimaryDropdown),this.dscPrimaryValueDropdown.display="none",this.setSecondaryCheckboxForDropdowns=this.createCheckbox(s.SetSecondaryText,(async e=>{await this.dscSecondaryValueDropdown.updateCssStyles({display:e?"none":"inline-flex"}),this.currentRowObjectInfo.valueForSecondary=this.currentRowObjectInfo.valueForPrimary,await this.valueForSecondaryDropdown.updateProperties({value:this.currentRowObjectInfo.valueForSecondary})}),!0),this.setSecondaryCheckboxForDropdowns.display="none",this.valueForSecondaryDropdown=this.createDropdown(s.ValueForSecondaryColumnHeader,(async e=>{(0,l.isUndefinedOrNull)(e)||(this.currentRowObjectInfo.valueForSecondary=e,this.dscTable.data[this.currentRowId][2]!==e&&(this.dscTable.data[this.currentRowId][2]=e,await this.updateDscTable(this.dscTable.data)))}),[],"",!0,150),this.dscSecondaryValueDropdown=this.createLabelInputContainer(s.ValueForSecondaryColumnHeader,this.valueForSecondaryDropdown),this.dscSecondaryValueDropdown.display="none",this.createGroup("",[this.dscPrimaryValueDropdown,this.setSecondaryCheckboxForDropdowns,this.dscSecondaryValueDropdown],!0,!0)}async showDropdownsSection(e){this.setSecondaryCheckboxForDropdowns.checked=e,this.setSecondaryCheckboxForDropdowns.display="inline-flex",await this.dscPrimaryValueDropdown.updateCssStyles({display:"inline-flex"}),await this.dscSecondaryValueDropdown.updateCssStyles({display:e?"none":"inline-flex"})}async showInputSection(e){this.setSecondaryCheckboxForInputType.checked=e,this.setSecondaryCheckboxForInputType.display="inline-flex",await this.dscPrimaryValueInput.updateCssStyles({display:"inline-flex"}),await this.dscSecondaryValueInput.updateCssStyles({display:e?"none":"inline-flex"})}async hideDropdownAndInputSections(){await this.dscPrimaryValueInput.updateCssStyles({display:"none"}),this.setSecondaryCheckboxForInputType.display="none",await this.dscSecondaryValueInput.updateCssStyles({display:"none"}),await this.dscPrimaryValueDropdown.updateCssStyles({display:"none"}),this.setSecondaryCheckboxForDropdowns.display="none",await this.dscSecondaryValueDropdown.updateCssStyles({display:"none"})}async updateDscTable(e,t=void 0){this.setFocusToInput=t,await this.setTableData(this.dscTable,e,20),this.dscTable.setActiveCell(this.currentRowId,0)}initializeQueryStoreGeneralSection(){let e=[];const t=this.objectInfo.queryStoreOptions.actualMode;this.operationModeOffOption="Off",this.areQueryStoreOptionsEnabled=this.objectInfo.queryStoreOptions.actualMode!==this.operationModeOffOption;const n=this.createInputBox((async()=>{}),{ariaLabel:s.ActualOperationModeText,inputType:"text",enabled:!1,value:t});e.push(this.createLabelInputContainer(s.ActualOperationModeText,n)),this.requestedOperationMode=this.createDropdown(s.RequestedOperationModeText,(async e=>{this.objectInfo.queryStoreOptions.actualMode=e,this.areQueryStoreOptionsEnabled=e!==this.operationModeOffOption,await this.toggleQueryStoreOptions()}),this.viewInfo.operationModeOptions,String(this.objectInfo.queryStoreOptions.actualMode),!0,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.RequestedOperationModeText,this.requestedOperationMode));const r=this.createGroup(s.GeneralSectionHeader,e,!0);this.queryStoreTabSectionsContainer.push(r)}initializeQueryStoreMonitoringSection(){let e=[];this.dataFlushIntervalInMinutes=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.dataFlushIntervalInMinutes=Number(e)}),{ariaLabel:s.DataFlushIntervalInMinutesText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.dataFlushIntervalInMinutes),min:0}),e.push(this.createLabelInputContainer(s.DataFlushIntervalInMinutesText,this.dataFlushIntervalInMinutes)),this.statisticsCollectionInterval=this.createDropdown(s.StatisticsCollectionInterval,(async e=>{this.objectInfo.queryStoreOptions.statisticsCollectionInterval=String(e)}),this.viewInfo.statisticsCollectionIntervalOptions,this.objectInfo.queryStoreOptions.statisticsCollectionInterval,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.StatisticsCollectionInterval,this.statisticsCollectionInterval));const t=this.createGroup(s.MonitoringSectionText,e,!0);this.queryStoreTabSectionsContainer.push(t)}initializeQueryStoreRetentionSection(){let e=[];this.maxPlansPerQuery=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.maxPlansPerQuery=Number(e)}),{ariaLabel:s.MaxPlansPerQueryText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.maxPlansPerQuery),min:0}),e.push(this.createLabelInputContainer(s.MaxPlansPerQueryText,this.maxPlansPerQuery)),this.maxSizeinMB=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.maxSizeInMB=Number(e)}),{ariaLabel:s.MaxSizeInMbText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.maxSizeInMB),min:0}),e.push(this.createLabelInputContainer(s.MaxSizeInMbText,this.maxSizeinMB)),this.queryStoreCaptureMode=this.createDropdown(s.QueryStoreCaptureModeText,(async e=>{this.objectInfo.queryStoreOptions.queryStoreCaptureMode=e,await this.toggleQueryCapturePolicySection(e===s.QueryStoreCapturemodeCustomText&&this.requestedOperationMode.value!==this.operationModeOffOption)}),this.viewInfo.queryStoreCaptureModeOptions,this.objectInfo.queryStoreOptions.queryStoreCaptureMode,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.QueryStoreCaptureModeText,this.queryStoreCaptureMode)),this.sizeBasedCleanupMode=this.createDropdown(s.SizeBasedCleanupModeText,(async e=>{this.objectInfo.queryStoreOptions.sizeBasedCleanupMode=e}),this.viewInfo.sizeBasedCleanupModeOptions,this.objectInfo.queryStoreOptions.sizeBasedCleanupMode,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.SizeBasedCleanupModeText,this.sizeBasedCleanupMode)),this.stateQueryThresholdInDays=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.staleQueryThresholdInDays=Number(e)}),{ariaLabel:s.StateQueryThresholdInDaysText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.staleQueryThresholdInDays),min:0}),e.push(this.createLabelInputContainer(s.StateQueryThresholdInDaysText,this.stateQueryThresholdInDays)),(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode)||(this.waitStatisticsCaptureMode=this.createDropdown(s.WaitStatisticsCaptureModeText,(async e=>{this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode=e.charAt(0)+e.slice(1).toLowerCase()}),this.viewInfo.propertiesOnOffOptions,this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode.toUpperCase(),this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.WaitStatisticsCaptureModeText,this.waitStatisticsCaptureMode)));const t=this.createGroup(s.QueryStoreRetentionSectionText,e,!0);this.queryStoreTabSectionsContainer.push(t)}initializeQueryStoreCapturePolicySection(){let e=[];this.executionCount=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.executionCount=Number(e)}),{ariaLabel:s.ExecutionCountText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.capturePolicyOptions.executionCount),min:0}),e.push(this.createLabelInputContainer(s.ExecutionCountText,this.executionCount)),this.staleThreshold=this.createDropdown(s.StaleThresholdText,(async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.staleThreshold=e}),this.viewInfo.staleThresholdOptions,this.objectInfo.queryStoreOptions.capturePolicyOptions.staleThreshold,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.StaleThresholdText,this.staleThreshold)),this.totalCompileCPUTimeInMS=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.totalCompileCPUTimeInMS=Number(e)}),{ariaLabel:s.TotalCompileCPUTimeInMsText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.capturePolicyOptions.totalCompileCPUTimeInMS),min:0}),e.push(this.createLabelInputContainer(s.TotalCompileCPUTimeInMsText,this.totalCompileCPUTimeInMS)),this.totalExecutionCPUTimeInMS=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.totalExecutionCPUTimeInMS=Number(e)}),{ariaLabel:s.TotalExecutionCPUTimeInMsText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.capturePolicyOptions.totalExecutionCPUTimeInMS),min:0}),e.push(this.createLabelInputContainer(s.TotalExecutionCPUTimeInMsText,this.totalExecutionCPUTimeInMS));const t=this.createGroup(s.QueryStoreCapturePolicySectionText,e,!0);this.queryStoreTabSectionsContainer.push(t)}async initializeQueryStoreCurrentDiskStorageSection(){let e=[];const t=this.createInputBox((async()=>{}),{ariaLabel:this.objectInfo.name,inputType:"text",enabled:!1,value:s.StringValueInMB(String(this.objectInfo.sizeInMb))});e.push(this.createLabelInputContainer(this.objectInfo.name,t));const n=this.createInputBox((async()=>{}),{ariaLabel:s.QueryStoreUsedText,inputType:"text",enabled:!1,value:s.StringValueInMB(String(this.objectInfo.queryStoreOptions.currentStorageSizeInMB))});e.push(this.createLabelInputContainer(s.QueryStoreUsedText,n));const r=this.createInputBox((async()=>{}),{ariaLabel:s.QueryStoreAvailableText,inputType:"text",enabled:!1,value:s.StringValueInMB(String(this.objectInfo.queryStoreOptions.maxSizeInMB-this.objectInfo.queryStoreOptions.currentStorageSizeInMB))});e.push(this.createLabelInputContainer(s.QueryStoreAvailableText,r)),this.purgeQueryDataButton=this.createButton(s.PurgeQueryDataButtonText,s.PurgeQueryDataButtonText,(async()=>{await this.purgeQueryStoreDataButtonClick()})),this.purgeQueryDataButton.width=o.DefaultInputWidth,await this.purgeQueryDataButton.updateCssStyles({margin:"10px 0px, 0px, 0px"}),e.push(this.createLabelInputContainer("",this.purgeQueryDataButton));const i=this.createGroup(s.QueryStoreCurrentDiskUsageSectionText,e,!0);this.queryStoreTabSectionsContainer.push(i)}async purgeQueryStoreDataButtonClick(){await d.window.showWarningMessage(s.PurgeQueryStoreDataMessage(this.objectInfo.name),s.YesText)===s.YesText&&await this.objectManagementService.purgeQueryStoreData(this.options.connectionUri,this.options.database)}async toggleQueryStoreOptions(){this.dataFlushIntervalInMinutes.enabled=this.statisticsCollectionInterval.enabled=this.maxPlansPerQuery.enabled=this.maxSizeinMB.enabled=this.queryStoreCaptureMode.enabled=this.sizeBasedCleanupMode.enabled=this.stateQueryThresholdInDays.enabled=this.areQueryStoreOptionsEnabled,(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode)||(this.waitStatisticsCaptureMode.enabled=this.areQueryStoreOptionsEnabled),await this.toggleQueryCapturePolicySection(this.areQueryStoreOptionsEnabled&&this.queryStoreCaptureMode.value===s.QueryStoreCapturemodeCustomText)}async toggleQueryCapturePolicySection(e){(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.capturePolicyOptions)||(this.executionCount.enabled=this.staleThreshold.enabled=this.totalCompileCPUTimeInMS.enabled=this.totalExecutionCPUTimeInMS.enabled=e)}initializeConfigureSLOSection(){let e=[];if(this.viewInfo.azureEditions?.length>0){let t=this.viewInfo.azureEditions[0];this.objectInfo.azureEdition=t;let n=this.viewInfo.azureServiceLevelObjectives.find((e=>e.editionDisplayName===t)),r=n?.editionOptions.options??[],i=n?.editionOptions.defaultValueIndex??0;this.objectInfo.azureServiceLevelObjective=r[i];let o=this.createDropdown(s.CurrentSLOText,(async()=>{this.objectInfo.azureServiceLevelObjective=o.value}),r,r[i]),a=this.viewInfo.azureMaxSizes.find((e=>e.editionDisplayName===t)),c=a?.editionOptions.options??[];i=a?.editionOptions.defaultValueIndex??0,this.objectInfo.azureMaxSize=c[i];let l=this.createDropdown(s.MaxSizeText,(async()=>{this.objectInfo.azureMaxSize=l.value}),c,c[i]),u=this.createDropdown(s.EditionText,(async()=>{let e=u.value;this.objectInfo.azureEdition=e,n=this.viewInfo.azureServiceLevelObjectives?.find((t=>t.editionDisplayName===e)),r=n?.editionOptions.options??[],i=n?.editionOptions.defaultValueIndex??0,o.loading=!0,await o.updateProperties({value:r[i],values:r}),o.loading=!1,a=this.viewInfo.azureMaxSizes?.find((t=>t.editionDisplayName===e)),c=a?.editionOptions.options??[],i=a?.editionOptions.defaultValueIndex??0,l.loading=!0,await l.updateProperties({value:c[i],values:c}),l.loading=!1}),this.viewInfo.azureEditions,t);e.push(this.createLabelInputContainer(s.EditionText,u)),e.push(this.createLabelInputContainer(s.CurrentSLOText,o)),e.push(this.createLabelInputContainer(s.MaxSizeText,l))}if(this.viewInfo.azureBackupRedundancyLevels?.length>0){let t=this.createDropdown(s.BackupRedundancyText,(async()=>{this.objectInfo.azureBackupRedundancyLevel=t.value}),this.viewInfo.azureBackupRedundancyLevels,this.viewInfo.azureBackupRedundancyLevels[0]);e.push(this.createLabelInputContainer(s.BackupRedundancyText,t))}return e.push(this.createHyperlink(s.AzurePricingLinkText,"https://go.microsoft.com/fwlink/?linkid=2239183")),this.createGroup(s.ConfigureSLOSectionHeader,e,!0,!0)}}t.DatabaseDialog=p},8602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseFileDialog=void 0;const r=n(9072),i=n(1017),o=n(886),s=n(2576),a=n(2938),c=n(7194),l=16776192,u=2097152;class d extends o.DialogBase{constructor(e,t){super(e.title,"DatabaseFileDialog"),this.options=e,this.objectManagementService=t}async initialize(){this.dialogObject.okButton.enabled=!1,this.autogrowthInPercentValue=this.options.defaultFileConstants.defaultFileGrowthInPercent,this.autogrowthInMegabytesValue=this.options.defaultFileConstants.defaultFileGrowthInMb,this.result=(0,c.deepClone)(this.options.databaseFile),this.originalName=this.options.databaseFile.name,this.originalFileName=this.options.databaseFile.fileNameWithExtension,this.isEditingFile=this.options.isNewFile||this.options.isEditingNewFile,await this.initializeAddDatabaseFileDialog()}async validateInput(){const e=await super.validateInput();return this.result.name!==this.originalName&&((this.options.isNewFile&&this.options.files.find((e=>e.name===this.result.name.trim()))||this.options.isEditingNewFile&&0!==this.options.files.filter((e=>e.name===this.result.name.trim())).length)&&e.push(s.DuplicateLogicalNameError(this.result.name.trim())),this.options.isNewFile||this.options.isEditingNewFile||!this.options.files.find((e=>this.result.id!==e.id&&e.name===this.result.name.trim()))||e.push(s.FileNameExistsError(this.result.name.trim())),this.options.isNewFile&&this.options.files.find((e=>this.result.name===e.name&&i.join(e.path,e.fileNameWithExtension)===i.join(this.result.path,this.result.fileNameWithExtension)))&&e.push(s.FileAlreadyExistsError(i.join(this.result.path,this.result.fileNameWithExtension)))),this.options.isEditingNewFile&&this.result.fileNameWithExtension!==this.originalFileName&&0!==this.options.files.filter((e=>i.join(e.path,e.fileNameWithExtension)===i.join(this.result.path,this.result.fileNameWithExtension))).length&&e.push(s.FileAlreadyExistsError(i.join(this.result.path,this.result.fileNameWithExtension))),-1!==this.result.maxSizeLimitInMb&&this.result.maxSizeLimitInMb<this.result.sizeInMb&&e.push(s.FileSizeLimitError),-1!==this.result.maxSizeLimitInMb&&1!==this.result.autoFileGrowthType&&this.result.maxSizeLimitInMb<this.result.autoFileGrowth&&e.push(s.FilegrowthLimitError),e}async initializeAddDatabaseFileDialog(){let e=[];const t=this.createInputBox((async e=>{""!==e.trim()&&(this.result.name=e.trim(),this.fileNameWithExtension.value=this.generateFileNameWithExtension())}),{ariaLabel:s.LogicalNameText,inputType:"text",enabled:!0,value:this.options.databaseFile.name,required:!0}),n=this.createLabelInputContainer(s.LogicalNameText,t);e.push(n);const r=this.createDropdown(s.FileTypeText,(async e=>{await this.updateOptionsForSelectedFileType(e),this.result.type=e,this.fileNameWithExtension.value=this.generateFileNameWithExtension()}),this.options.viewInfo.fileTypesOptions,this.result.type,this.isEditingFile,o.DefaultInputWidth),i=this.createLabelInputContainer(s.FileTypeText,r);e.push(i),this.fileGroupDropdown=this.createDropdown(s.FilegroupText,(async e=>{this.result.fileGroup=e}),this.options.rowFilegroups,this.options.databaseFile.fileGroup,this.isEditingFile,o.DefaultInputWidth);const a=this.createLabelInputContainer(s.FilegroupText,this.fileGroupDropdown);e.push(a),this.fileSizeInput=this.createInputBox((async e=>{this.result.sizeInMb=Number(e)}),{ariaLabel:s.SizeInMbText,inputType:"number",enabled:this.options.databaseFile.type!==s.FilestreamFileType,value:String(this.options.databaseFile.sizeInMb),min:1});const c=this.createLabelInputContainer(s.SizeInMbText,this.fileSizeInput);e.push(c),e.push(await this.initializeAutogrowthSection()),this.filePathTextBox=this.createInputBox((async e=>{this.result.path=e}),{ariaLabel:s.PathText,inputType:"text",enabled:this.isEditingFile,value:this.options.databaseFile.path,width:o.DefaultInputWidth-30}),this.filePathButton=this.createButton("...","...",(async()=>{await this.createFileBrowser()}),this.options.isNewFile),this.filePathButton.width=25,this.pathContainer=this.createLabelInputContainer(s.PathText,this.filePathTextBox),this.pathContainer.addItems([this.filePathButton],{flex:"10 0 auto"}),e.push(this.pathContainer);let l=this.isEditingFile;l&&(l=!(this.result.type===s.FilestreamFileType)),this.fileNameWithExtension=this.createInputBox((async e=>{this.result.fileNameWithExtension=e}),{ariaLabel:s.FileNameText,inputType:"text",enabled:l,value:this.options.databaseFile.fileNameWithExtension,width:o.DefaultInputWidth});const u=this.createLabelInputContainer(s.FileNameText,this.fileNameWithExtension);e.push(u),this.formContainer.addItems(e)}async initializeAutogrowthSection(){this.enableAutoGrowthCheckbox=this.createCheckbox(s.EnableAutogrowthText,(async e=>{this.inPercentAutogrowth.enabled=this.inMegabytesAutogrowth.enabled=this.autoFilegrowthInput.enabled=this.limitedToMbFileSize.enabled=this.unlimitedFileSize.enabled=this.result.isAutoGrowthEnabled=e,this.limitedToMbFileSizeInput.enabled=e&&this.limitedToMbFileSize.checked}),!0,!0);let e="autogrowthRadioGroup";const t=0===this.options.databaseFile.autoFileGrowthType;this.inPercentAutogrowth=this.createRadioButton(s.InPercentAutogrowthText,e,!t,(async e=>{await this.handleAutogrowthTypeChange(e)})),this.inMegabytesAutogrowth=this.createRadioButton(s.InMegabytesAutogrowthText,e,t,(async e=>{await this.handleAutogrowthTypeChange(e)})),this.autoFilegrowthInput=this.createInputBox((async e=>{(0,a.isUndefinedOrNull)(e)||""===e||(this.inPercentAutogrowth.checked?this.autogrowthInPercentValue=Number(e):this.autogrowthInMegabytesValue=Number(e),this.result.autoFileGrowth=this.inPercentAutogrowth.checked?this.autogrowthInPercentValue:this.autogrowthInMegabytesValue)}),{ariaLabel:s.FileGrowthText,inputType:"number",enabled:!0,value:String(this.options.databaseFile.autoFileGrowth),width:o.DefaultInputWidth-10,min:1});const n=this.createLabelInputContainer(s.FileGrowthText,this.autoFilegrowthInput);this.fileGrowthGroup=this.createGroup("",[this.enableAutoGrowthCheckbox,n,this.inPercentAutogrowth,this.inMegabytesAutogrowth],!0),await this.fileGrowthGroup.updateCssStyles({margin:"10px 0px -10px -10px"}),e="maxFileSizeRadioGroup";const r=!this.options.isNewFile&&-1!==this.options.databaseFile.maxSizeLimitInMb;this.limitedToMbFileSize=this.createRadioButton(s.LimitedToMBFileSizeText,e,r,(async e=>{await this.handleMaxFileSizeTypeChange(e)})),this.unlimitedFileSize=this.createRadioButton(s.UnlimitedFileSizeText,e,!r,(async e=>{await this.handleMaxFileSizeTypeChange(e)})),this.limitedToMbFileSizeInput=this.createInputBox((async e=>{this.fileSizeValue=Number(e),this.result.maxSizeLimitInMb=this.fileSizeValue,this.unlimitedFileSize.checked&&(this.result.maxSizeLimitInMb=-1)}),{ariaLabel:s.MaximumFileSizeText,inputType:"number",enabled:!0,value:-1===this.options.databaseFile.maxSizeLimitInMb?String(this.options.defaultFileConstants.defaultMaxFileSizeLimitedToInMb):String(this.options.databaseFile.maxSizeLimitInMb),width:o.DefaultInputWidth-10,min:1,max:this.options.databaseFile.type===s.LogFiletype?u:l});const i=this.createLabelInputContainer(s.MaximumFileSizeText,this.limitedToMbFileSizeInput);return this.maxSizeGroup=this.createGroup("",[i,this.limitedToMbFileSize,this.unlimitedFileSize],!0),await this.maxSizeGroup.updateCssStyles({margin:"10px 0px -10px -10px"}),this.AutogrowthGroup=this.createGroup(s.AutogrowthMaxsizeText,[this.fileGrowthGroup,this.maxSizeGroup],!1),this.AutogrowthGroup}async handleAutogrowthTypeChange(e){this.autoFilegrowthInput.value=this.options.isNewFile?this.inPercentAutogrowth.checked?this.autogrowthInPercentValue?.toString():this.autogrowthInMegabytesValue?.toString():this.options.databaseFile.autoFileGrowth?.toString(),this.autoFilegrowthInput.max=this.inPercentAutogrowth.checked?100:this.result.type===s.LogFiletype?1048576:8388096,this.result.autoFileGrowthType=this.inPercentAutogrowth.checked?1:0}async handleMaxFileSizeTypeChange(e){this.limitedToMbFileSize.checked?(this.limitedToMbFileSizeInput.enabled=!0,this.result.maxSizeLimitInMb=this.fileSizeValue):this.unlimitedFileSize.checked&&(this.limitedToMbFileSizeInput.enabled=!1,this.result.maxSizeLimitInMb=-1)}async createFileBrowser(){let e=await this.objectManagementService.getDataFolder(this.options.connectionUri),t=await r.window.openServerFileBrowserDialog(this.options.connectionUri,e,[{label:s.allFiles,filters:["*"]}],!0);t?.length>0&&(this.filePathTextBox.value=t,this.result.path=t)}async updateOptionsForSelectedFileType(e){let t=this.options.rowFilegroups,n=this.result.fileGroup,r="visible",i="0px",o="0px",a=!0,c=l;e===s.LogFiletype?(t=[s.FileGroupForLogTypeText],n=s.FileGroupForLogTypeText,c=u):e===s.FilestreamFileType&&(t=this.options.filestreamFilegroups.length>0?this.options.filestreamFilegroups:[s.FileGroupForFilestreamTypeText],n=this.result.fileGroup,r="hidden",i="-130px",o="-35px",a=!1,this.fileNameWithExtension.value=""),await this.fileGroupDropdown.updateProperties({values:t,value:n}),await this.fileGrowthGroup.updateCssStyles({visibility:r}),await this.maxSizeGroup.updateCssStyles({"margin-top":i}),await this.pathContainer.updateCssStyles({"margin-top":o}),this.fileNameWithExtension.enabled=this.fileSizeInput.enabled=this.isEditingFile&&a,this.autoFilegrowthInput.max=this.inPercentAutogrowth.checked?100:c/2,this.fileSizeInput.max=c}generateFileNameWithExtension(){let e=this.result.fileNameWithExtension;if(""!==this.result.name&&this.options.isNewFile)switch(this.result.type){case s.RowsDataFileType:e=this.result.name+".ndf";break;case s.LogFiletype:e=this.result.name+".ldf";break;case s.FilestreamFileType:e=""}return e}async onFormFieldChange(){this.dialogObject.okButton.enabled=JSON.stringify(this.result)!==JSON.stringify(this.options.databaseFile)}get dialogResult(){return this.result}}t.DatabaseFileDialog=d},4464:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseRoleDialog=void 0;const r=n(2576),i=n(3942),o=n(2022),s=n(886),a=n(3801);class c extends a.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!0,supportEffectivePermissions:!1})}get helpUrl(){return this.options.isNewObject?i.CreateDatabaseRoleDocUrl:i.AlterDatabaseRoleDocUrl}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeOwnedSchemasSection(),this.initializeMemberSection(),this.formContainer.addItems([this.generalSection,this.ownedSchemasSection,this.memberSection,this.securableSection],this.getSectionItemLayout())}initializeGeneralSection(){this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:r.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const e=this.createLabelInputContainer(r.NameText,this.nameInput);this.ownerInput=this.createInputBox((async e=>{this.objectInfo.owner=e}),{ariaLabel:r.OwnerText,inputType:"text",enabled:!0,value:this.objectInfo.owner,width:210});const t=this.createButton(r.BrowseText,r.BrowseOwnerButtonAriaLabel,(async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["ApplicationRole","DatabaseRole","User"]),selectAllObjectTypes:!0,multiSelect:!1,contextId:this.contextId,title:r.SelectDatabaseRoleOwnerDialogTitle,showSchemaColumn:!1});await e.open();const t=await e.waitForClose();t.selectedObjects.length>0&&(this.ownerInput.value=t.selectedObjects[0].name)})),n=this.createLabelInputContainer(r.OwnerText,this.ownerInput);n.addItems([t],{flex:"0 0 auto"}),this.generalSection=this.createGroup(r.GeneralSectionHeader,[e,n],!1)}initializeMemberSection(){this.memberTable=this.createTable(r.MemberSectionHeader,[r.NameText],this.objectInfo.members.map((e=>[e])));const e=this.addButtonsForTable(this.memberTable,{buttonAriaLabel:r.AddMemberAriaLabel,buttonHandler:async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["DatabaseRole","User"]),selectAllObjectTypes:!0,multiSelect:!0,contextId:this.contextId,title:r.SelectDatabaseRoleMemberDialogTitle,showSchemaColumn:!1});await e.open();const t=await e.waitForClose();await this.addMembers(t.selectedObjects.map((e=>e.name)))}},{buttonAriaLabel:r.RemoveMemberAriaLabel,buttonHandler:async()=>{1===this.memberTable.selectedRows.length&&await this.removeMember(this.memberTable.selectedRows[0])}});this.memberSection=this.createGroup(r.MemberSectionHeader,[this.memberTable,e])}async addMembers(e){e.forEach((e=>{-1===this.objectInfo.members.indexOf(e)&&this.objectInfo.members.push(e)})),await this.updateMembersTable()}async removeMember(e){this.objectInfo.members.splice(e,1),await this.updateMembersTable()}async updateMembersTable(){await this.setTableData(this.memberTable,this.objectInfo.members.map((e=>[e]))),this.onFormFieldChange()}initializeOwnedSchemasSection(){this.ownedSchemaTable=this.createTableList(r.OwnedSchemaSectionHeader,[r.SchemaText],this.viewInfo.schemas,this.objectInfo.ownedSchemas,s.DefaultMaxTableRowCount,(e=>-1===this.objectInfo.ownedSchemas.indexOf(e))),this.ownedSchemasSection=this.createGroup(r.OwnedSchemaSectionHeader,[this.ownedSchemaTable])}}t.DatabaseRoleDialog=c},9415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DetachDatabaseDialog=void 0;const r=n(7835),i=n(3942),o=n(2576);class s extends r.ObjectManagementDialogBase{constructor(e,t){super(e,t,o.DetachDatabaseDialogTitle(t.database),"DetachDatabase"),this._dropConnections=!1,this._updateStatistics=!1,this.dialogObject.okButton.label=o.DetachButtonLabel}get isDirty(){return!0}get saveChangesTaskLabel(){return o.DetachDatabaseOperationDisplayName(this.objectInfo.name)}async initializeUI(){let e=this.objectInfo.files.map((e=>[e.name,e.type,e.fileGroup,e.path])),t=[o.DatabaseFileNameLabel,o.DatabaseFileTypeLabel,o.DatabaseFileGroupLabel,o.DatabaseFilePathLabel],n=this.createTable(o.DatabaseFilesLabel,t,e),r=this.createGroup(o.DatabaseFilesLabel,[n],!1),i=this.createCheckbox(o.DetachDropConnections,(async e=>{this._dropConnections=e})),s=this.createCheckbox(o.DetachUpdateStatistics,(async e=>{this._updateStatistics=e})),a=[r,this.createGroup(o.DetachDatabaseOptions,[i,s],!1)];this.formContainer.addItems(a)}get helpUrl(){return i.DetachDatabaseDocUrl}get actionName(){return"DetachDatabase"}async saveChanges(e,t){await this.objectManagementService.detachDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._updateStatistics,!1)}async generateScript(){return await this.objectManagementService.detachDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._updateStatistics,!0)}async validateInput(){return[]}}t.DetachDatabaseDialog=s},9388:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropDatabaseDialog=void 0;const r=n(7835),i=n(3942),o=n(2576);class s extends r.ObjectManagementDialogBase{constructor(e,t){super(e,t,o.DropDatabaseDialogTitle(t.database),"DropDatabase"),this._dropConnections=!1,this._deleteBackupHistory=!1,this.dialogObject.okButton.label=o.DropButtonLabel}get isDirty(){return!0}get saveChangesTaskLabel(){return o.DropObjectOperationDisplayName(o.DatabaseTypeDisplayName,this.objectInfo.name)}async initializeUI(){let e=[],t=[[this.objectInfo.name,this.objectInfo.owner??"",this.objectInfo.status??""]],n=[o.NameText,o.OwnerText,o.StatusText],r=this.createTable(o.DatabaseDetailsLabel,n,t),i=this.createGroup(o.DatabaseDetailsLabel,[r],!1);if(e.push(i),!this.viewInfo.isAzureDB&&!this.viewInfo.isManagedInstance&&!this.viewInfo.isSqlOnDemand){let t=this.createCheckbox(o.CloseConnections,(async e=>{this._dropConnections=e})),n=this.createCheckbox(o.DeleteBackupHistory,(async e=>{this._deleteBackupHistory=e})),r=this.createGroup(o.DropDatabaseOptions,[t,n],!1);e.push(r)}this.formContainer.addItems(e)}get helpUrl(){return i.DropDatabaseDocUrl}get actionName(){return"DropObject"}async saveChanges(e,t){await this.objectManagementService.dropDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._deleteBackupHistory,!1)}async generateScript(){return await this.objectManagementService.dropDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._deleteBackupHistory,!0)}async validateInput(){return[]}}t.DropDatabaseDialog=s},2022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindObjectDialog=void 0;const r=n(9072),i=n(886),o=n(2576),s=n(8682),a=(e,t)=>e.name===t.name&&e.type===t.type&&e.schema===t.schema;class c extends i.DialogBase{constructor(e,t){super(t.title,"FindObjectDialog"),this.objectManagementService=e,this.options=t,this.selectedObjectTypes=[],this.allObjects=[],this.dialogObject.okButton.label=o.SelectText,this.dialogObject.okButton.enabled=!1,this.dialogObject.cancelButton.label=o.BackButtonLabel,this.result={selectedObjects:[]},this.selectedObjectTypes=t.selectAllObjectTypes?[...t.objectTypes]:[]}async initialize(){this.objectTypesTable=this.createTableList(o.ObjectTypesText,[o.ObjectTypeText],this.options.objectTypes,this.selectedObjectTypes,i.DefaultMaxTableRowCount,i.DefaultTableListItemEnabledStateGetter,(e=>[e.displayName]),((e,t)=>e.name===t.name)),this.searchTextInputBox=this.createInputBox((async()=>{}),{ariaLabel:o.SearchTextLabel,inputType:"text"});const e=this.createLabelInputContainer(o.SearchTextLabel,this.searchTextInputBox);this.findButton=this.createButton(o.FindText,o.FindText,(async()=>{await this.onFindObjectButtonClick()}),this.options.selectAllObjectTypes);const t=this.createButtonContainer([this.findButton]),n=this.createGroup(o.FilterSectionTitle,[e,this.objectTypesTable,t]),r=[o.NameText,o.ObjectTypeText];this.options.showSchemaColumn&&r.splice(1,0,o.SchemaText),this.options.multiSelect?this.objectsTable=this.createTableList(o.ObjectsText,r,this.allObjects,this.result.selectedObjects,20,i.DefaultTableListItemEnabledStateGetter,(e=>this.getObjectRowValue(e)),a):(this.objectsTable=this.createTable(o.ObjectsText,r,[],20),this.disposables.push(this.objectsTable.onRowSelected((async()=>{this.objectsTable.selectedRows.length>0&&(this.result.selectedObjects=[this.allObjects[this.objectsTable.selectedRows[0]]]),await this.onFormFieldChange()})))),this.objectsLoadingComponent=this.modelView.modelBuilder.loadingComponent().withItem(this.objectsTable).withProps({loadingText:o.LoadingObjectsText,showText:!0,loading:!1}).component();const s=this.createGroup(o.ObjectsText,[this.objectsLoadingComponent]);this.formContainer.addItems([n,s],this.getSectionItemLayout())}get dialogResult(){return this.result}async onFindObjectButtonClick(){this.dialogObject.okButton.enabled=!1,this.objectsLoadingComponent.loading=!0,this.findButton.enabled=!1;try{const e=await this.objectManagementService.search(this.options.contextId,this.selectedObjectTypes.map((e=>e.name)),this.searchTextInputBox.value);let t;this.allObjects.splice(0,this.allObjects.length,...e),t=this.options.multiSelect?this.getDataForTableList(this.allObjects,this.result.selectedObjects,i.DefaultTableListItemEnabledStateGetter,(e=>this.getObjectRowValue(e)),a):this.allObjects.map((e=>this.getObjectRowValue(e))),await this.setTableData(this.objectsTable,t,20),this.objectsLoadingComponent.loadingCompletedText=o.LoadingObjectsCompletedText(e.length)}catch(e){this.dialogObject.message={text:(0,s.getErrorMessage)(e),level:r.window.MessageLevel.Error}}this.findButton.enabled=!0,this.objectsLoadingComponent.loading=!1}async onFormFieldChange(){this.findButton.enabled=this.selectedObjectTypes.length>0,this.dialogObject.okButton.enabled=this.result.selectedObjects.length>0}getObjectRowValue(e){const t=this.options.objectTypes.find((t=>t.name===e.type)),n=[e.name,t?.displayName];return this.options.showSchemaColumn&&n.splice(1,0,e.schema),n}}t.FindObjectDialog=c},5895:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginDialog=void 0;const r=n(9496),i=n(2576),o=n(1959),s=n(3942),a=n(3307),c=n(886),l=n(3801),u=n(2938);class d extends l.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!1,supportEffectivePermissions:!0})}get helpUrl(){return this.options.isNewObject?s.CreateLoginDocUrl:s.AlterLoginDocUrl}async onConfirmation(){return!(this.viewInfo.supportAdvancedPasswordOptions&&"Sql"===this.objectInfo.authenticationType&&!this.objectInfo.password&&!this.objectInfo.enforcePasswordPolicy)||await r.window.showWarningMessage(i.BlankPasswordConfirmationText,{modal:!0},o.YesText)===o.YesText}async validateInput(){const e=await super.validateInput();return"Sql"===this.objectInfo.authenticationType&&(this.objectInfo.password||this.viewInfo.supportAdvancedPasswordOptions&&!this.objectInfo.enforcePasswordPolicy||e.push(i.PasswordCannotBeEmptyError),!this.objectInfo.password||!this.objectInfo.enforcePasswordPolicy&&this.viewInfo.supportAdvancedPasswordOptions||(0,a.isValidSQLPassword)(this.objectInfo.password,this.objectInfo.name)||!this.options.isNewObject&&!this.isPasswordChanged()||e.push(i.InvalidPasswordError),this.objectInfo.password!==this.confirmPasswordInput.value&&e.push(i.PasswordsNotMatchError),this.specifyOldPasswordCheckbox?.checked&&!this.objectInfo.oldPassword&&e.push(i.OldPasswordCannotBeEmptyError)),e}postInitializeData(){this.objectInfo.password=this.objectInfo.password??""}async initializeUI(){await super.initializeUI();const e=[];this.initializeGeneralSection(),e.push(this.generalSection),(this.options.isNewObject||"Sql"===this.objectInfo.authenticationType)&&(this.initializeSqlAuthSection(),e.push(this.sqlAuthSection)),this.initializeServerRolesSection(),e.push(this.serverRoleSection),!this.options.isNewObject&&(0,u.isUndefinedOrNull)(this.objectInfo.securablePermissions)||e.push(this.securableSection),this.formContainer.addItems(e,this.getSectionItemLayout())}initializeGeneralSection(){const e=[];this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:i.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const t=this.createLabelInputContainer(i.NameText,this.nameInput);e.push(t),this.authTypeDropdown=this.createDropdown(i.AuthTypeText,(async e=>{this.objectInfo.authenticationType=i.getAuthenticationTypeByDisplayName(e),this.setViewByAuthenticationType()}),this.viewInfo.authenticationTypes.map((e=>i.getAuthenticationTypeDisplayName(e))),i.getAuthenticationTypeDisplayName(this.objectInfo.authenticationType),this.options.isNewObject);const n=this.createLabelInputContainer(i.AuthTypeText,this.authTypeDropdown);if(e.push(n),this.enabledCheckbox=this.createCheckbox(i.EnabledText,(async e=>{this.objectInfo.isEnabled=e}),this.objectInfo.isEnabled),e.push(this.enabledCheckbox),this.viewInfo.supportAdvancedOptions){this.defaultDatabaseDropdown=this.createDropdown(i.DefaultDatabaseText,(async e=>{this.objectInfo.defaultDatabase=e}),this.viewInfo.databases,this.objectInfo.defaultDatabase);const t=this.createLabelInputContainer(i.DefaultDatabaseText,this.defaultDatabaseDropdown);e.push(t),this.defaultLanguageDropdown=this.createDropdown(i.DefaultLanguageText,(async e=>{this.objectInfo.defaultLanguage=e}),this.viewInfo.languages,this.objectInfo.defaultLanguage);const n=this.createLabelInputContainer(i.DefaultLanguageText,this.defaultLanguageDropdown);e.push(n),this.connectPermissionCheckbox=this.createCheckbox(i.PermissionToConnectText,(async e=>{this.objectInfo.connectPermission=e}),this.objectInfo.connectPermission),e.push(this.connectPermissionCheckbox)}this.generalSection=this.createGroup(i.GeneralSectionHeader,e,!1)}initializeSqlAuthSection(){const e=[];this.passwordInput=this.createPasswordInputBox(i.PasswordText,(async e=>{this.objectInfo.password=e,this.mustChangePasswordCheckbox.enabled=this.objectInfo.enforcePasswordPolicy&&this.isPasswordChanged(),this.mustChangePasswordCheckbox.enabled||(this.mustChangePasswordCheckbox.checked=this.objectInfo.mustChangePassword)}),this.objectInfo.password??"");const t=this.createLabelInputContainer(i.PasswordText,this.passwordInput);this.confirmPasswordInput=this.createPasswordInputBox(i.ConfirmPasswordText,(async()=>{}),this.objectInfo.password??"");const n=this.createLabelInputContainer(i.ConfirmPasswordText,this.confirmPasswordInput);if(e.push(t,n),!this.options.isNewObject){this.specifyOldPasswordCheckbox=this.createCheckbox(i.SpecifyOldPasswordText,(async e=>{this.oldPasswordInput.enabled=this.specifyOldPasswordCheckbox.checked,this.objectInfo.oldPassword="",this.specifyOldPasswordCheckbox.checked||(this.oldPasswordInput.value="")})),this.oldPasswordInput=this.createPasswordInputBox(i.OldPasswordText,(async e=>{this.objectInfo.oldPassword=e}),"",!1);const t=this.createLabelInputContainer(i.OldPasswordText,this.oldPasswordInput);e.push(this.specifyOldPasswordCheckbox,t)}this.viewInfo.supportAdvancedPasswordOptions&&(this.enforcePasswordPolicyCheckbox=this.createCheckbox(i.EnforcePasswordPolicyText,(async e=>{const t=e;this.objectInfo.enforcePasswordPolicy=t,this.enforcePasswordExpirationCheckbox.enabled=t,this.enforcePasswordExpirationCheckbox.checked=t,(this.options.isNewObject||this.isPasswordChanged())&&(this.mustChangePasswordCheckbox.enabled=t,this.mustChangePasswordCheckbox.checked=t),this.mustChangePasswordCheckbox.checked=t&&(this.options.isNewObject||this.isPasswordChanged())}),this.objectInfo.enforcePasswordPolicy),this.enforcePasswordExpirationCheckbox=this.createCheckbox(i.EnforcePasswordExpirationText,(async e=>{const t=e;this.objectInfo.enforcePasswordExpiration=t,(this.options.isNewObject||this.isPasswordChanged())&&(this.mustChangePasswordCheckbox.enabled=t,this.mustChangePasswordCheckbox.checked=t)}),this.objectInfo.enforcePasswordPolicy),this.mustChangePasswordCheckbox=this.createCheckbox(i.MustChangePasswordText,(async e=>{this.objectInfo.mustChangePassword=e}),this.objectInfo.mustChangePassword,this.options.isNewObject),e.push(this.enforcePasswordPolicyCheckbox,this.enforcePasswordExpirationCheckbox,this.mustChangePasswordCheckbox),this.options.isNewObject||(this.lockedOutCheckbox=this.createCheckbox(i.LoginLockedOutText,(async e=>{this.objectInfo.isLockedOut=e}),this.objectInfo.isLockedOut,this.viewInfo.canEditLockedOutState),e.push(this.lockedOutCheckbox))),this.sqlAuthSection=this.createGroup(i.SQLAuthenticationSectionHeader,e)}isPasswordChanged(){return this.objectInfo.password!==this.originalObjectInfo.password}initializeServerRolesSection(){this.serverRoleTable=this.createTableList(i.ServerRoleSectionHeader,[i.ServerRoleTypeDisplayNameInTitle],this.viewInfo.serverRoles,this.objectInfo.serverRoles,c.DefaultMaxTableRowCount,(e=>e!==s.PublicServerRoleName)),this.serverRoleSection=this.createGroup(i.ServerRoleSectionHeader,[this.serverRoleTable])}setViewByAuthenticationType(){this.authTypeDropdown.value===i.SQLAuthenticationTypeDisplayText?this.addItem(this.formContainer,this.sqlAuthSection,this.getSectionItemLayout(),1):this.authTypeDropdown.value!==i.SQLAuthenticationTypeDisplayText&&this.removeItem(this.formContainer,this.sqlAuthSection)}}t.LoginDialog=d},7835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectManagementDialogBase=void 0;const r=n(9072),i=n(4489),o=n(2576),s=n(3307),a=n(3942),c=n(7475),l=n(8682),u=n(7194),d=n(1887);class p extends d.ScriptableDialogBase{constructor(e,t,n,r){var s;n||(n=t.isNewObject?o.NewObjectDialogTitle(o.getNodeTypeDisplayName(t.objectType,!0)):o.ObjectPropertiesDialogTitle(o.getNodeTypeDisplayName(t.objectType,!0),t.objectName)),r||(s=t.objectType,r=t.isNewObject?`New${s}`:`${s}Properties`),super(n,r,t),this.objectManagementService=e,this._contextId=(0,i.generateUuid)(),this.dialogObject.okButton.label=t.isNewObject?o.CreateObjectLabel:o.ApplyUpdatesLabel}postInitializeData(){}async validateInput(){const e=[];return this.objectInfo.name||e.push(o.NameCannotBeEmptyError),e}async saveChanges(e,t){await this.objectManagementService.save(this._contextId,this.objectInfo)}get saveChangesTaskLabel(){const e=o.getNodeTypeDisplayName(this.options.objectType);return this.options.isNewObject?o.CreateObjectOperationDisplayName(e):o.UpdateObjectOperationDisplayName(e,this.options.objectName)}get actionName(){return this.options.isNewObject?"CreateObject":"UpdateObject"}async initialize(){await super.initialize(),this.dialogObject.registerOperation({displayName:this.saveChangesTaskLabel,description:"",isCancelable:!1,operation:async e=>{try{if(this.isDirty){const t=Date.now();await this.saveChanges(this._contextId,this.objectInfo),this.options.objectExplorerContext&&(this.options.isNewObject?await(0,s.refreshNode)(this.options.objectExplorerContext):await(0,s.refreshParentNode)(this.options.objectExplorerContext)),c.TelemetryReporter.sendTelemetryEvent(this.actionName,{objectType:this.options.objectType},{elapsedTimeMs:Date.now()-t}),e.updateStatus(r.TaskStatus.Succeeded)}}catch(t){e.updateStatus(r.TaskStatus.Failed,(0,l.getErrorMessage)(t)),c.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,this.actionName,t).withAdditionalProperties({objectType:this.options.objectType}).send()}finally{await this.disposeView()}}})}get viewInfo(){return this._viewInfo}get objectInfo(){return this._viewInfo.objectInfo}get originalObjectInfo(){return this._originalObjectInfo}get contextId(){return this._contextId}async dispose(e){await super.dispose(e),"ok"!==e&&await this.disposeView()}async disposeView(){await this.objectManagementService.disposeView(this._contextId)}async initializeData(){const e=await this.objectManagementService.initializeView(this._contextId,this.options.objectType,this.options.connectionUri,this.options.database,this.options.isNewObject,this.options.parentUrn,this.options.objectUrn);this._viewInfo=e,this.postInitializeData(),this._originalObjectInfo=(0,u.deepClone)(this.objectInfo)}async generateScript(){return await this.objectManagementService.script(this._contextId,this.objectInfo)}get isDirty(){return!(0,u.equals)(this.objectInfo,this._originalObjectInfo,!1)}}t.ObjectManagementDialogBase=p},2765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectSelectionMethodDialog=t.ObjectSelectionMethod=void 0;const r=n(886),i=n(2576);var o;!function(e){e[e.SpecificObjects=0]="SpecificObjects",e[e.AllObjectsOfTypes=1]="AllObjectsOfTypes",e[e.AllObjectsOfSchema=2]="AllObjectsOfSchema"}(o||(t.ObjectSelectionMethod=o={}));class s extends r.DialogBase{constructor(e){super(i.ObjectSelectionMethodDialogTitle,"ObjectSelectionMethodDialog"),this.options=e,this.result={method:o.SpecificObjects,schema:void 0,objectTypes:[]},this.dialogObject.cancelButton.label=i.BackButtonLabel}async initialize(){const e="objectSelectionMethodRadioGroup";this.specificObjectsRadioButton=this.createRadioButton(i.ObjectSelectionMethodDialog_SpecificObjects,e,!0,(async e=>{await this.handleTypeChange(e)})),this.allObjectsOfTypesRadioButton=this.createRadioButton(i.ObjectSelectionMethodDialog_AllObjectsOfTypes,e,!1,(async e=>{await this.handleTypeChange(e)})),this.allObjectsOfSchemaRadioButton=this.createRadioButton(i.ObjectSelectionMethodDialog_AllObjectsOfSchema,e,!1,(async e=>{await this.handleTypeChange(e)}));const t=this.createGroup(i.ObjectSelectionMethodDialog_TypeLabel,[this.specificObjectsRadioButton,this.allObjectsOfTypesRadioButton,this.allObjectsOfSchemaRadioButton],!1);this.objectTypesTable=this.createTableList(i.ObjectTypeText,[i.ObjectTypesText],this.options.objectTypes,this.result.objectTypes,r.DefaultMaxTableRowCount,r.DefaultTableListItemEnabledStateGetter,(e=>[e.displayName]),((e,t)=>e.name===t.name));const n=this.createDropdown(i.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel,(async e=>{this.result.schema=e}),this.options.schemas,this.options.schemas[0]);this.schemaRow=this.createLabelInputContainer(i.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel,n),await this.setComponentsVisibility(!1,!1),this.formContainer.addItems([t,this.schemaRow,this.objectTypesTable],this.getSectionItemLayout())}async handleTypeChange(e){let t=o.SpecificObjects,n=!1,r=!1;await this.setComponentsVisibility(r,n),this.allObjectsOfTypesRadioButton.checked?(t=o.AllObjectsOfTypes,n=!1,r=!0):this.allObjectsOfSchemaRadioButton.checked&&(t=o.AllObjectsOfSchema,n=!0,r=!1),this.result.method=t,await this.setComponentsVisibility(r,n)}async setComponentsVisibility(e,t){await this.schemaRow.updateCssStyles({display:t?"flex":"none"}),await this.objectTypesTable.updateCssStyles({display:e?"block":"none"})}get dialogResult(){return this.result}async onFormFieldChange(){this.dialogObject.okButton.enabled=this.result.method!==o.AllObjectsOfTypes||this.result.objectTypes.length>0}}t.ObjectSelectionMethodDialog=s},3801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrincipalDialogBase=void 0;const r=n(9072),i=n(2576),o=n(7835),s=n(2022),a=n(7194),c=n(886),l=n(2765);class u extends o.ObjectManagementDialogBase{constructor(e,t){super(e,t),this.dialogOptions=t,this.securablePermissions=[]}async initializeUI(){this.securablePermissions=(0,a.deepClone)(this.objectInfo.securablePermissions)??[],this.initializeSecurableSection()}initializeSecurableSection(){const e=[],t=[i.NameText,i.ObjectTypeText];this.dialogOptions.isDatabaseLevelPrincipal&&t.splice(1,0,i.SchemaText),this.securableTable=this.createTable(i.SecurablesText,t,this.getSecurableTableData());const n={buttonAriaLabel:i.AddSecurableAriaLabel,buttonHandler:e=>this.onAddSecurableButtonClicked(e)},o={buttonAriaLabel:i.RemoveSecurableAriaLabel,buttonHandler:()=>this.onRemoveSecurableButtonClicked()},s=this.addButtonsForTable(this.securableTable,n,o);this.disposables.push(this.securableTable.onRowSelected((async()=>{await this.updatePermissionsTable()}))),this.explicitPermissionTableLabel=this.modelView.modelBuilder.text().withProps({value:i.ExplicitPermissionsTableLabel}).component(),this.permissionTable=this.modelView.modelBuilder.table().withProps({ariaLabel:i.ExplicitPermissionsTableLabel,columns:[{type:r.ColumnType.text,value:i.PermissionColumnHeader},{type:r.ColumnType.text,value:i.GrantorColumnHeader},{type:r.ColumnType.checkBox,value:i.GrantColumnHeader},{type:r.ColumnType.checkBox,value:i.WithGrantColumnHeader},{type:r.ColumnType.checkBox,value:i.DenyColumnHeader}],data:[],height:(0,c.getTableHeight)(0),width:c.DefaultTableWidth}).component(),this.disposables.push(this.permissionTable.onCellAction((async e=>{const t=this.permissionTable.data[e.row][0],n=this.securablePermissions[this.securableTable.selectedRows[0]];let r=n.permissions.find((e=>e.permission===t));r||(r={permission:t,grantor:""},n.permissions.push(r)),2===e.column?(r.grant=!!e.checked||void 0,e.checked||(r.withGrant=void 0)):3===e.column?(r.withGrant=!!e.checked||void 0,e.checked&&(r.grant=!0)):4===e.column&&(r.grant=!e.checked&&void 0,e.checked&&(r.withGrant=void 0)),await this.updatePermissionsTable(),this.updateSecurablePermissions(),this.permissionTable.setActiveCell(e.row,e.column)}))),e.push(this.securableTable,s,this.explicitPermissionTableLabel,this.permissionTable),this.showEffectivePermissions&&(this.effectivePermissionTableLabel=this.modelView.modelBuilder.text().withProps({value:i.EffectivePermissionsTableLabel}).component(),this.effectivePermissionTable=this.createTable(i.EffectivePermissionsTableLabel,[i.PermissionColumnHeader],[]),e.push(this.effectivePermissionTableLabel,this.effectivePermissionTable)),this.securableSection=this.createGroup(i.SecurablesText,e,!0,!0)}async onAddSecurableButtonClicked(e){const t=[];if(this.dialogOptions.isDatabaseLevelPrincipal){const e=new l.ObjectSelectionMethodDialog({objectTypes:this.viewInfo.supportedSecurableTypes,schemas:this.viewInfo.schemas});await e.open();const n=await e.waitForClose();if(n)switch(n.method){case l.ObjectSelectionMethod.AllObjectsOfTypes:t.push(...await this.searchForObjects(n.objectTypes.map((e=>e.name))));break;case l.ObjectSelectionMethod.AllObjectsOfSchema:t.push(...await this.searchForObjects(this.viewInfo.supportedSecurableTypes.map((e=>e.name)),n.schema));break;default:const e=await this.openFindObjectsDialog();e&&t.push(...e.selectedObjects)}}else{const e=await this.openFindObjectsDialog();e&&t.push(...e.selectedObjects)}if(t.length>0){t.forEach((e=>{if(this.securablePermissions.find((t=>t.type===e.type&&t.name===e.name&&t.schema===e.schema)))return;const t=this.viewInfo.supportedSecurableTypes.find((t=>t.name===e.type));this.securablePermissions.push({name:e.name,schema:e.schema,type:e.type,permissions:t.permissions.map((e=>({permission:e.name,grantor:"",grant:void 0,withGrant:void 0}))),effectivePermissions:[]})}));const e=this.getSecurableTableData();await this.setTableData(this.securableTable,e)}await e.focus()}async searchForObjects(e,t=void 0){this.updateLoadingStatus(!0,i.LoadingObjectsText);const n=await this.objectManagementService.search(this.contextId,e,void 0,t);return this.updateLoadingStatus(!1,i.LoadingObjectsText,i.LoadingObjectsCompletedText(n.length)),n}async openFindObjectsDialog(){const e=new s.FindObjectDialog(this.objectManagementService,{objectTypes:this.viewInfo.supportedSecurableTypes,selectAllObjectTypes:!1,multiSelect:!0,contextId:this.contextId,title:i.SelectSecurablesDialogTitle,showSchemaColumn:this.dialogOptions.isDatabaseLevelPrincipal});return await e.open(),await e.waitForClose()}async onRemoveSecurableButtonClicked(){if(1===this.securableTable.selectedRows.length){this.securablePermissions.splice(this.securableTable.selectedRows[0],1);const e=this.getSecurableTableData();await this.setTableData(this.securableTable,e),this.updateSecurablePermissions()}}getSecurableTableData(){return this.securablePermissions.map((e=>{const t=[e.name,this.getSecurableTypeDisplayName(e.type)];return this.dialogOptions.isDatabaseLevelPrincipal&&t.splice(1,0,e.schema),t}))}async updatePermissionsTable(){let e=[],t=[],n=i.ExplicitPermissionsTableLabel,r=i.EffectivePermissionsTableLabel;if(1===this.securableTable.selectedRows.length){const o=this.securablePermissions[this.securableTable.selectedRows[0]];if(o){const s=o.schema?`${o.schema}.${o.name}`:o.name;n=i.ExplicitPermissionsTableLabelSelected(s),r=i.EffectivePermissionsTableLabelSelected(s);const a=this.viewInfo.supportedSecurableTypes.find((e=>e.name===o.type));e=o.permissions.map((e=>[e.permission,e.grantor,{checked:!0===e.grant},{checked:!0===e.withGrant},{checked:!1===e.grant}])),e=a.permissions.map((e=>{const t=o.permissions.find((t=>t.permission===e.name));return[e.name,t?.grantor??"",{checked:!0===t?.grant},{checked:!0===t?.withGrant},{checked:!1===t?.grant}]})),t=o.effectivePermissions.map((e=>[e]))}}this.explicitPermissionTableLabel.value=n,await this.setTableData(this.permissionTable,e),this.showEffectivePermissions&&(this.effectivePermissionTableLabel.value=r,await this.setTableData(this.effectivePermissionTable,t))}updateSecurablePermissions(){this.objectInfo.securablePermissions=(0,a.deepClone)(this.securablePermissions.filter((e=>e.permissions.some((e=>void 0!==e.grant))))),this.objectInfo.securablePermissions.forEach((e=>{e.permissions=e.permissions.filter((e=>void 0!==e.grant))})),this.onFormFieldChange()}getSecurableTypeDisplayName(e){const t=this.viewInfo.supportedSecurableTypes.find((t=>t.name===e));return t?t.displayName:e}get showEffectivePermissions(){return!this.dialogOptions.isNewObject&&this.dialogOptions.supportEffectivePermissions}}t.PrincipalDialogBase=u},5756:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerPropertiesDialog=void 0;const r=n(9072),i=n(9496),o=n(7835),s=n(886),a=n(2576),c=n(3942),l=n(2611),u=n(2938);class d extends o.ObjectManagementDialogBase{constructor(e,t){super(e,t),this.generalTabId="generalId",this.memoryTabId="memoryId",this.processorsTabId="processorsId",this.securityTabId="securityId",this.databaseSettingsTabId="databaseSettingsId",this.advancedTabId="advancedId",this.shouldRestartServer=!1,this.disposables.push(this.dialogObject.onClosed((async e=>{"ok"===e&&await this.notifyServerRestart()})))}get helpUrl(){let e="";switch(this.activeTabId){case this.generalTabId:e=c.ViewGeneralServerPropertiesDocUrl;break;case this.memoryTabId:e=c.ViewMemoryServerPropertiesDocUrl;break;case this.processorsTabId:e=c.ViewProcessorsServerPropertiesDocUrl;break;case this.securityTabId:e=c.ViewSecurityServerPropertiesDocUrl;break;case this.databaseSettingsTabId:e=c.ViewDatabaseSettingsPropertiesDocUrl;break;case this.advancedTabId:e=c.ViewAdvancedServerPropertiesDocUrl}return e}async initializeUI(){const e=await r.connection.getServerInfo(this.options.objectExplorerContext.connectionProfile.id);this.engineEdition=e.engineEditionId,this.initializeGeneralSection(),this.initializeMemorySection(),this.initializeProcessorsSection(),this.initializeSecuritySection(),this.initializeDatabaseSettingsSection(),this.initializeAdvancedSection();const t={title:"",tabs:[this.generalTab,this.memoryTab,this.processorsTab,this.securityTab,this.databaseSettingsTab,this.advancedTab]},n=this.modelView.modelBuilder.tabbedPanel().withTabs([t]).withLayout({orientation:r.TabOrientation.Vertical}).withProps({CSSStyles:{margin:"-10px 0px 0px -10px"}}).component();this.disposables.push(n.onTabChanged((async e=>{this.activeTabId=e}))),this.formContainer.addItem(n)}initializeGeneralSection(){let e=[];if(this.objectInfo.hardwareGeneration){this.hardwareGenerationInput=this.createInputBox((async()=>{}),{ariaLabel:a.HardwareGenerationText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.hardwareGeneration.toString()});const t=this.createLabelInputContainer(a.HardwareGenerationText,this.hardwareGenerationInput);e.push(t)}this.nameInput=this.createInputBox((async()=>{}),{ariaLabel:a.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const t=this.createLabelInputContainer(a.NameText,this.nameInput);e.push(t),this.languageDropdown=this.createDropdown(a.LanguageText,(async()=>{}),[this.objectInfo.language],this.objectInfo.language,this.options.isNewObject);const n=this.createLabelInputContainer(a.LanguageText,this.languageDropdown);e.push(n),this.memoryInput=this.createInputBox((async()=>{}),{ariaLabel:a.MemoryText,inputType:"text",enabled:this.options.isNewObject,value:a.StringValueInMB(this.objectInfo.memoryInMB.toString())});const r=this.createLabelInputContainer(a.MemoryText,this.memoryInput);e.push(r),this.operatingSystemInput=this.createInputBox((async()=>{}),{ariaLabel:a.OperatingSystemText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.operatingSystem});const i=this.createLabelInputContainer(a.OperatingSystemText,this.operatingSystemInput);e.push(i),this.platformInput=this.createInputBox((async()=>{}),{ariaLabel:a.PlatformText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.platform});const o=this.createLabelInputContainer(a.PlatformText,this.platformInput);e.push(o),this.processorsInput=this.createInputBox((async()=>{}),{ariaLabel:a.ProcessorsText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.processors});const s=this.createLabelInputContainer(a.ProcessorsText,this.processorsInput);e.push(s);let c=[];this.isClusteredInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsClusteredText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isClustered.toString()});const l=this.createLabelInputContainer(a.IsClusteredText,this.isClusteredInput);c.push(l),this.isHadrEnabledInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsHadrEnabledText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isHadrEnabled.toString()});const d=this.createLabelInputContainer(a.IsHadrEnabledText,this.isHadrEnabledInput);if(c.push(d),!(0,u.isUndefinedOrNull)(this.objectInfo.isPolyBaseInstalled)){this.isPolyBaseInstalledInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsPolyBaseInstalledText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isPolyBaseInstalled.toString()});const e=this.createLabelInputContainer(a.IsPolyBaseInstalledText,this.isPolyBaseInstalledInput);c.push(e)}if(!(0,u.isUndefinedOrNull)(this.objectInfo.isXTPSupported)){this.isXTPSupportedInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsXTPSupportedText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isXTPSupported.toString()});const e=this.createLabelInputContainer(a.IsXTPSupportedText,this.isXTPSupportedInput);c.push(e)}this.productInput=this.createInputBox((async()=>{}),{ariaLabel:a.ProductText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.product});const p=this.createLabelInputContainer(a.ProductText,this.productInput);c.push(p),this.rootDirectoryInput=this.createInputBox((async()=>{}),{ariaLabel:a.RootDirectoryText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.rootDirectory});const h=this.createLabelInputContainer(a.RootDirectoryText,this.rootDirectoryInput);c.push(h),this.serverCollationInput=this.createInputBox((async()=>{}),{ariaLabel:a.ServerCollationText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.serverCollation});const f=this.createLabelInputContainer(a.ServerCollationText,this.serverCollationInput);c.push(f),this.versionInput=this.createInputBox((async()=>{}),{ariaLabel:a.VersionText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.version});const m=this.createLabelInputContainer(a.VersionText,this.versionInput);if(c.push(m),!(0,u.isUndefinedOrNull)(this.objectInfo.reservedStorageSizeMB)){this.reservedStorageSizeInMBInput=this.createInputBox((async()=>{}),{ariaLabel:a.ReservedStorageSizeInMBText,inputType:"text",enabled:this.options.isNewObject,value:a.StringValueInMB(this.objectInfo.reservedStorageSizeMB.toString())});const e=this.createLabelInputContainer(a.ReservedStorageSizeInMBText,this.reservedStorageSizeInMBInput);c.push(e)}if(this.objectInfo.serviceTier){this.serviceTierInput=this.createInputBox((async()=>{}),{ariaLabel:a.ServiceTierText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.serviceTier});const e=this.createLabelInputContainer(a.ServiceTierText,this.serviceTierInput);c.push(e)}if(!(0,u.isUndefinedOrNull)(this.objectInfo.storageSpaceUsageInMB)){this.storageSpaceUsageInMBInput=this.createInputBox((async()=>{}),{ariaLabel:a.StorageSpaceUsageInMBText,inputType:"text",enabled:this.options.isNewObject,value:a.StringValueInMB(this.objectInfo.storageSpaceUsageInMB.toString())});const e=this.createLabelInputContainer(a.StorageSpaceUsageInMBText,this.storageSpaceUsageInMBInput);c.push(e)}this.platformSection=this.createGroup("Platform",e,!0),this.sqlServerSection=this.createGroup("SQL Server",c,!0);const g=this.createGroup("",[this.platformSection,this.sqlServerSection]);this.generalTab=this.createTab(this.generalTabId,a.GeneralSectionHeader,g)}initializeMemorySection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance,t={ariaLabel:a.minServerMemoryText,inputType:"number",enabled:e,max:this.objectInfo.minServerMemory.maximumValue,min:this.objectInfo.minServerMemory.minimumValue,value:this.objectInfo.minServerMemory.value.toString(),required:!0};this.minServerMemoryInput=this.createInputBox((async e=>{this.objectInfo.minServerMemory.value=+e}),t);const n=this.createLabelInputContainer(a.minServerMemoryText,this.minServerMemoryInput),i={ariaLabel:a.maxServerMemoryText,inputType:"number",enabled:e,max:this.objectInfo.maxServerMemory.maximumValue,min:this.objectInfo.maxServerMemory.minimumValue,value:this.objectInfo.maxServerMemory.value.toString(),required:!0};this.maxServerMemoryInput=this.createInputBox((async e=>{this.objectInfo.maxServerMemory.value=+e}),i);const o=this.createLabelInputContainer(a.maxServerMemoryText,this.maxServerMemoryInput);this.memorySection=this.createGroup("",[n,o],!1),this.memoryTab=this.createTab(this.memoryTabId,a.MemoryText,this.memorySection)}async validateInput(){const e=await super.validateInput();return this.objectInfo.maxServerMemory.value<this.objectInfo.minServerMemory.value&&e.push(a.serverMemoryMaxLowerThanMinInputError),e}async notifyServerRestart(){this.shouldRestartServer&&(await i.window.showInformationMessage(a.needToRestartServer,{modal:!0}),this.shouldRestartServer=!1)}initializeProcessorsSection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance;let t=this.objectInfo.numaNodes,n=[],i=[];if(e)for(let e of t){let t=this.createProcessorTable(e);n.push(t),i.push(this.createGroup(a.serverNumaNodeLabel(e.numaNodeId),[t],!0))}this.autoSetProcessorAffinityMaskForAllCheckbox=this.createCheckbox(a.autoSetProcessorAffinityMaskForAllText,(async t=>{if(this.objectInfo.autoProcessorAffinityMaskForAll=t,e)for(let e of n){let n=e.data;for(let e=0;e<n.length;e++)t&&(n[e][l.AffinityType.ProcessorAffinity]=!1);await this.setTableData(e,n)}}),this.objectInfo.autoProcessorAffinityMaskForAll,e),this.autoSetProcessorIOAffinityMaskForAllCheckbox=this.createCheckbox(a.autoSetProcessorAffinityIOMaskForAllText,(async t=>{if(this.objectInfo.autoProcessorAffinityIOMaskForAll=t,e)for(let e of n){let n=e.data;for(let e=0;e<n.length;e++)t&&(n[e][l.AffinityType.IOAffinity]=!1);await this.setTableData(e,n),this.resetNumaNodes()}}),this.objectInfo.autoProcessorAffinityIOMaskForAll,e),this.processorsSection=this.createGroup("",[this.autoSetProcessorAffinityMaskForAllCheckbox,this.autoSetProcessorIOAffinityMaskForAllCheckbox],!1),this.processorsSection.addItems(i),this.processorsTab=this.createTab(this.processorsTabId,a.ProcessorsText,this.processorsSection)}createProcessorTable(e){const t="no-borders";let n=e.processors.map((e=>[a.serverCPULabel(e.processorId),e.affinity,e.ioAffinity])),i=this.createTable(a.processorLabel,[{name:a.processorColumnText,value:a.processorColumnText,type:r.ColumnType.text,cssClass:t,headerCssClass:t},{name:a.processorAffinityColumnText,value:a.processorAffinityColumnText,type:r.ColumnType.checkBox,width:s.DefaultColumnCheckboxWidth,action:r.ActionOnCellCheckboxCheck.customAction,cssClass:t,headerCssClass:t},{name:a.processorIOAffinityColumnText,value:a.processorIOAffinityColumnText,type:r.ColumnType.checkBox,width:s.DefaultColumnCheckboxWidth,action:r.ActionOnCellCheckboxCheck.customAction,cssClass:t,headerCssClass:t}],n);return this.disposables.push(i.onCellAction((async t=>{if(i.selectedRows.length>0){const n=i.data;let r=t,o=r.column===l.AffinityType.ProcessorAffinity?l.AffinityType.IOAffinity:l.AffinityType.ProcessorAffinity;n[r.row][o]&&(n[r.row][o]=!r.checked,i.updateCells=n[r.row]),r.column===l.AffinityType.ProcessorAffinity&&(this.autoSetProcessorAffinityMaskForAllCheckbox.checked=!1,this.objectInfo.autoProcessorAffinityMaskForAll=!1,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].affinity=r.checked,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].ioAffinity=!1),r.column===l.AffinityType.IOAffinity&&(this.autoSetProcessorIOAffinityMaskForAllCheckbox.checked=!1,this.objectInfo.autoProcessorAffinityIOMaskForAll=!1,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].ioAffinity=r.checked,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].affinity=!1),this.onFormFieldChange()}}))),i}resetNumaNodes(){for(let e of this.objectInfo.numaNodes)for(let t of e.processors)t.ioAffinity=!1}initializeSecuritySection(){const e=this.objectInfo.platform===c.Windows,t=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance&&e,n="serverAuthenticationRadioGroup";this.onlyWindowsAuthRadioButton=this.createRadioButton(a.onlyWindowsAuthModeText,n,1===this.objectInfo.authenticationMode,(async()=>{await this.handleAuthModeChange()})),this.sqlServerAndWindowsAuthRadioButton=this.createRadioButton(a.sqlServerAndWindowsAuthText,n,2===this.objectInfo.authenticationMode,(async()=>{await this.handleAuthModeChange()})),this.onlyWindowsAuthRadioButton.enabled=t,this.sqlServerAndWindowsAuthRadioButton.enabled=t;const i=this.createGroup(a.serverAuthenticationText,[this.onlyWindowsAuthRadioButton,this.sqlServerAndWindowsAuthRadioButton],!0),o="serverLoginsRadioGroup";this.noneRadioButton=this.createRadioButton(a.noLoginAuditingText,o,0===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.failedLoginsOnlyRadioButton=this.createRadioButton(a.failedLoginsOnlyText,o,2===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.successfulLoginsOnlyRadioButton=this.createRadioButton(a.successfulLoginsOnlyText,o,1===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.bothFailedAndSuccessfulLoginsRadioButton=this.createRadioButton(a.bothFailedAndSuccessfulLoginsText,o,3===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.noneRadioButton.enabled=e,this.failedLoginsOnlyRadioButton.enabled=e,this.successfulLoginsOnlyRadioButton.enabled=e,this.bothFailedAndSuccessfulLoginsRadioButton.enabled=e;const s=this.createGroup(a.loginAuditingText,[this.noneRadioButton,this.failedLoginsOnlyRadioButton,this.successfulLoginsOnlyRadioButton,this.bothFailedAndSuccessfulLoginsRadioButton],!0);this.securitySection=this.createGroup("",[i,s],!0),this.securityTab=this.createTab(this.securityTabId,a.securityText,this.securitySection)}async handleAuthModeChange(){this.onlyWindowsAuthRadioButton.checked&&(this.objectInfo.authenticationMode=1),this.sqlServerAndWindowsAuthRadioButton.checked&&(this.objectInfo.authenticationMode=2),this.objectInfo.authenticationMode!==this.originalObjectInfo.authenticationMode&&(this.shouldRestartServer=!0)}async handleAuditLevelChange(){this.noneRadioButton.checked&&(this.objectInfo.loginAuditing=0),this.failedLoginsOnlyRadioButton.checked&&(this.objectInfo.loginAuditing=2),this.successfulLoginsOnlyRadioButton.checked&&(this.objectInfo.loginAuditing=1),this.bothFailedAndSuccessfulLoginsRadioButton.checked&&(this.objectInfo.loginAuditing=3)}initializeDatabaseSettingsSection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance,t={ariaLabel:a.dataLocationText,enabled:e,value:this.objectInfo.dataLocation,required:!0},n={ariaLabel:a.logLocationText,enabled:e,value:this.objectInfo.logLocation,required:!0},i={ariaLabel:a.backupLocationText,enabled:e,value:this.objectInfo.backupLocation,required:!0};this.compressBackupCheckbox=this.createCheckbox(a.compressBackupText,(async e=>{this.objectInfo.checkCompressBackup=e}),this.objectInfo.checkCompressBackup),this.backupChecksumCheckbox=this.createCheckbox(a.backupChecksumText,(async e=>{this.objectInfo.checkBackupChecksum=e}),this.objectInfo.checkBackupChecksum);const o=this.createGroup(a.backupAndRestoreText,[this.compressBackupCheckbox,this.backupChecksumCheckbox],!1);this.dataLocationInput=this.createInputBox((async e=>{this.objectInfo.dataLocation=e,this.objectInfo.dataLocation!==this.originalObjectInfo.dataLocation&&(this.shouldRestartServer=!0)}),t);const s=this.createBrowseButton((async()=>{const e=await this.selectFolder(this.objectInfo.dataLocation);e&&(this.dataLocationInput.value=e,this.objectInfo.dataLocation=e),this.objectInfo.dataLocation!==this.originalObjectInfo.dataLocation&&(this.shouldRestartServer=!0)}),e),c=this.createLabelInputContainer(a.dataLocationText,[this.dataLocationInput,s]);this.logLocationInput=this.createInputBox((async e=>{this.objectInfo.logLocation=e,this.objectInfo.logLocation!==this.originalObjectInfo.logLocation&&(this.shouldRestartServer=!0)}),n);const l=this.createBrowseButton((async()=>{const e=await this.selectFolder(this.objectInfo.logLocation);e&&(this.logLocationInput.value=e,this.objectInfo.logLocation=e),this.objectInfo.logLocation!==this.originalObjectInfo.logLocation&&(this.shouldRestartServer=!0)}),e),u=this.createLabelInputContainer(a.logLocationText,[this.logLocationInput,l]);this.backupLocationInput=this.createInputBox((async e=>{this.objectInfo.backupLocation=e}),i);const d=this.createBrowseButton((async()=>{const e=await this.selectFolder(this.objectInfo.backupLocation);e&&(this.backupLocationInput.value=e,this.objectInfo.backupLocation=e)}),e),p=this.createLabelInputContainer(a.backupLocationText,[this.backupLocationInput,d]),h=this.createGroup(a.defaultLocationsLabel,[c,u,p],!1);this.databaseSettingsSection=this.createGroup("",[o,h],!1),this.databaseSettingsTab=this.createTab(this.databaseSettingsTabId,a.databaseSettingsText,this.databaseSettingsSection)}async selectFolder(e){let t=await this.objectManagementService.getDataFolder(this.options.connectionUri);return await r.window.openServerFileBrowserDialog(this.options.connectionUri,t,[{label:a.allFiles,filters:["*"]}],!0)}initializeAdvancedSection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance;this.allowTriggerToFireOthersDropdown=this.createDropdown(a.allowTriggerToFireOthersLabel,(async e=>{this.objectInfo.allowTriggerToFireOthers="True"===e}),["True","False"],this.objectInfo.allowTriggerToFireOthers?"True":"False");const t=this.createLabelInputContainer(a.allowTriggerToFireOthersLabel,this.allowTriggerToFireOthersDropdown);this.blockedProcThresholdInput=this.createInputBox((async e=>{this.objectInfo.blockedProcThreshold.value=+e}),{ariaLabel:a.blockedProcThresholdLabel,inputType:"number",min:this.objectInfo.blockedProcThreshold.minimumValue,max:this.objectInfo.blockedProcThreshold.maximumValue,value:this.objectInfo.blockedProcThreshold.value.toString()});const n=this.createLabelInputContainer(a.blockedProcThresholdLabel,this.blockedProcThresholdInput);this.cursorThresholdInput=this.createInputBox((async e=>{this.objectInfo.cursorThreshold.value=+e}),{ariaLabel:a.cursorThresholdLabel,inputType:"number",min:this.objectInfo.cursorThreshold.minimumValue,max:this.objectInfo.cursorThreshold.maximumValue,value:this.objectInfo.cursorThreshold.value.toString()});const i=this.createLabelInputContainer(a.cursorThresholdLabel,this.cursorThresholdInput);this.defaultFullTextLanguageInput=this.createInputBox((async e=>{this.objectInfo.defaultFullTextLanguage=e}),{ariaLabel:a.defaultFullTextLanguageLabel,value:this.objectInfo.defaultFullTextLanguage});const o=this.createLabelInputContainer(a.defaultFullTextLanguageLabel,this.defaultFullTextLanguageInput);this.defaultLanguageDropdown=this.createDropdown(a.defaultLanguageLabel,(async e=>{this.objectInfo.defaultLanguage=e}),this.viewInfo.languageOptions,this.objectInfo.defaultLanguage);const s=this.createLabelInputContainer(a.defaultLanguageLabel,this.defaultLanguageDropdown);this.fullTextUpgradeOptionDropdown=this.createDropdown(a.fullTextUpgradeOptionLabel,(async e=>{this.objectInfo.fullTextUpgradeOption=e}),this.viewInfo.fullTextUpgradeOptions,this.objectInfo.fullTextUpgradeOption,!!this.objectInfo.fullTextUpgradeOption);const c=this.createLabelInputContainer(a.fullTextUpgradeOptionLabel,this.fullTextUpgradeOptionDropdown);this.maxTextReplicationSizeInput=this.createInputBox((async e=>{this.objectInfo.maxTextReplicationSize.value=+e}),{ariaLabel:a.maxTextReplicationSizeLabel,inputType:"number",min:this.objectInfo.maxTextReplicationSize.minimumValue,max:this.objectInfo.maxTextReplicationSize.maximumValue,value:this.objectInfo.maxTextReplicationSize.value.toString()});const l=this.createLabelInputContainer(a.maxTextReplicationSizeLabel,this.maxTextReplicationSizeInput);this.optimizeAdHocWorkloadsDropdown=this.createDropdown(a.optimizeAdHocWorkloadsLabel,(async e=>{this.objectInfo.optimizeAdHocWorkloads="True"===e}),["True","False"],this.objectInfo.optimizeAdHocWorkloads?"True":"False");const u=this.createLabelInputContainer(a.optimizeAdHocWorkloadsLabel,this.optimizeAdHocWorkloadsDropdown);this.scanStartupProcsDropdown=this.createDropdown(a.scanStartupProcsLabel,(async e=>{this.objectInfo.scanStartupProcs="True"===e}),["True","False"],this.objectInfo.scanStartupProcs?"True":"False",e);const d=this.createLabelInputContainer(a.scanStartupProcsLabel,this.scanStartupProcsDropdown);this.twoDigitYearCutoffInput=this.createInputBox((async e=>{this.objectInfo.twoDigitYearCutoff=+e}),{ariaLabel:a.twoDigitYearCutoffLabel,inputType:"number",value:this.objectInfo.twoDigitYearCutoff.toString()});const p=this.createLabelInputContainer(a.twoDigitYearCutoffLabel,this.twoDigitYearCutoffInput);this.costThresholdParallelismInput=this.createInputBox((async e=>{this.objectInfo.costThresholdParallelism.value=+e}),{ariaLabel:a.costThresholdParallelismLabel,inputType:"number",min:this.objectInfo.costThresholdParallelism.minimumValue,max:this.objectInfo.costThresholdParallelism.maximumValue,value:this.objectInfo.costThresholdParallelism.value.toString()});const h=this.createLabelInputContainer(a.costThresholdParallelismLabel,this.costThresholdParallelismInput);this.locksInput=this.createInputBox((async e=>{this.objectInfo.locks.value=+e}),{ariaLabel:a.locksLabel,inputType:"number",enabled:e,max:this.objectInfo.locks.maximumValue,min:0,value:this.objectInfo.locks.value.toString(),validationErrorMessage:a.locksValidation(this.objectInfo.locks.minimumValue)},(async()=>!(+this.locksInput.value<this.objectInfo.locks.minimumValue&&0!=+this.locksInput.value)));const f=this.createLabelInputContainer(a.locksLabel,this.locksInput);this.maxDegreeParallelismInput=this.createInputBox((async e=>{this.objectInfo.maxDegreeParallelism.value=+e}),{ariaLabel:a.maxDegreeParallelismLabel,inputType:"number",min:this.objectInfo.maxDegreeParallelism.minimumValue,max:this.objectInfo.maxDegreeParallelism.maximumValue,value:this.objectInfo.maxDegreeParallelism.value.toString()});const m=this.createLabelInputContainer(a.maxDegreeParallelismLabel,this.maxDegreeParallelismInput);this.queryWaitInput=this.createInputBox((async e=>{this.objectInfo.queryWait.value=+e}),{ariaLabel:a.queryWaitLabel,inputType:"number",min:this.objectInfo.queryWait.minimumValue,max:this.objectInfo.queryWait.maximumValue,value:this.objectInfo.queryWait.value.toString()});const g=this.createLabelInputContainer(a.queryWaitLabel,this.queryWaitInput),y=this.createGroup("Miscellaneous",[t,n,i,o,s,c,l,u,d,p],!0),v=this.createGroup("Parallelism",[h,f,m,g],!0),b=this.createGroup("",[y,v]);this.advancedTab=this.createTab(this.advancedTabId,a.AdvancedSectionHeader,b)}}t.ServerPropertiesDialog=d},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerRoleDialog=void 0;const r=n(2576),i=n(3942),o=n(2022),s=n(3801);class a extends s.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!1,supportEffectivePermissions:!1})}get helpUrl(){return this.options.isNewObject?i.CreateServerRoleDocUrl:i.AlterServerRoleDocUrl}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeMemberSection();const e=[this.generalSection,this.memberSection];this.viewInfo.isFixedRole||(this.initializeMembershipSection(),e.push(this.membershipSection),e.push(this.securableSection)),this.formContainer.addItems(e,this.getSectionItemLayout())}initializeGeneralSection(){this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:r.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const e=this.createLabelInputContainer(r.NameText,this.nameInput);this.ownerInput=this.createInputBox((async e=>{this.objectInfo.owner=e}),{ariaLabel:r.OwnerText,inputType:"text",enabled:!this.viewInfo.isFixedRole,value:this.objectInfo.owner,width:210});const t=this.createButton(r.BrowseText,r.BrowseOwnerButtonAriaLabel,(async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["ServerLevelLogin","ServerLevelServerRole"]),selectAllObjectTypes:!0,multiSelect:!1,contextId:this.contextId,title:r.SelectServerRoleOwnerDialogTitle});await e.open();const t=await e.waitForClose();t.selectedObjects.length>0&&(this.ownerInput.value=t.selectedObjects[0].name)}),!this.viewInfo.isFixedRole),n=this.createLabelInputContainer(r.OwnerText,this.ownerInput);n.addItems([t],{flex:"0 0 auto"}),this.generalSection=this.createGroup(r.GeneralSectionHeader,[e,n],!1)}initializeMemberSection(){this.memberTable=this.createTable(r.MemberSectionHeader,[r.NameText],this.objectInfo.members.map((e=>[e])));const e=this.addButtonsForTable(this.memberTable,{buttonAriaLabel:r.AddMemberAriaLabel,buttonHandler:async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["ServerLevelLogin","ServerLevelServerRole"]),selectAllObjectTypes:!0,multiSelect:!0,contextId:this.contextId,title:r.SelectServerRoleMemberDialogTitle});await e.open();const t=await e.waitForClose();await this.addMembers(t.selectedObjects.map((e=>e.name)))}},{buttonAriaLabel:r.RemoveMemberAriaLabel,buttonHandler:async()=>{1===this.memberTable.selectedRows.length&&await this.removeMember(this.memberTable.selectedRows[0])}});this.memberSection=this.createGroup(r.MemberSectionHeader,[this.memberTable,e])}async addMembers(e){e.forEach((e=>{-1===this.objectInfo.members.indexOf(e)&&this.objectInfo.members.push(e)})),await this.updateMembersTable()}async removeMember(e){this.objectInfo.members.splice(e,1),await this.updateMembersTable()}async updateMembersTable(){await this.setTableData(this.memberTable,this.objectInfo.members.map((e=>[e]))),this.onFormFieldChange()}initializeMembershipSection(){this.membershipTable=this.createTableList(r.MembershipSectionHeader,[r.ServerRoleTypeDisplayNameInTitle],this.viewInfo.serverRoles,this.objectInfo.memberships),this.membershipSection=this.createGroup(r.MembershipSectionHeader,[this.membershipTable])}}t.ServerRoleDialog=a},9897:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDialog=void 0;const r=n(2576),i=n(3942),o=n(3307),s=n(886),a=n(3801);class c extends a.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!0,supportEffectivePermissions:!0})}get helpUrl(){return this.options.isNewObject?i.CreateUserDocUrl:i.AlterUserDocUrl}postInitializeData(){this.objectInfo.password=this.objectInfo.password??""}async validateInput(){const e=await super.validateInput();return"SqlAuthentication"===this.objectInfo.type?(this.objectInfo.password||e.push(r.PasswordCannotBeEmptyError),this.objectInfo.password!==this.confirmPasswordInput.value&&e.push(r.PasswordsNotMatchError),(0,o.isValidSQLPassword)(this.objectInfo.password,this.objectInfo.name)||!this.options.isNewObject&&this.objectInfo.password===this.originalObjectInfo.password||e.push(r.InvalidPasswordError)):"LoginMapped"!==this.objectInfo.type||this.objectInfo.loginName||e.push(r.LoginNotSelectedError),e}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeOwnedSchemaSection(),this.initializeMembershipSection(),this.initializeAdvancedSection(),this.formContainer.addItems([this.generalSection,this.ownedSchemaSection,this.membershipSection,this.securableSection,this.advancedSection],this.getSectionItemLayout()),setTimeout((()=>{this.setViewByUserType()}),100)}initializeGeneralSection(){const e={ariaLabel:r.NameText,value:this.objectInfo.name,enabled:this.options.isNewObject};this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),e);const t=this.createLabelInputContainer(r.NameText,this.nameInput);this.defaultSchemaDropdown=this.createDropdown(r.DefaultSchemaText,(async e=>{this.objectInfo.defaultSchema=e}),this.viewInfo.schemas,this.objectInfo.defaultSchema),this.defaultSchemaContainer=this.createLabelInputContainer(r.DefaultSchemaText,this.defaultSchemaDropdown),this.typeDropdown=this.createDropdown(r.UserTypeText,(async e=>{this.objectInfo.type=r.getUserTypeByDisplayName(e),this.setViewByUserType()}),this.viewInfo.userTypes.map((e=>r.getUserTypeDisplayName(e))),r.getUserTypeDisplayName(this.objectInfo.type),this.options.isNewObject),this.typeContainer=this.createLabelInputContainer(r.UserTypeText,this.typeDropdown),this.loginDropdown=this.createDropdown(r.LoginText,(async e=>{this.objectInfo.loginName=e}),this.options.isNewObject?this.viewInfo.logins:[this.objectInfo.loginName],this.objectInfo.loginName,this.options.isNewObject),this.loginContainer=this.createLabelInputContainer(r.LoginText,this.loginDropdown),this.passwordInput=this.createPasswordInputBox(r.PasswordText,(async e=>{this.objectInfo.password=e}),this.objectInfo.password??""),this.passwordContainer=this.createLabelInputContainer(r.PasswordText,this.passwordInput),this.confirmPasswordInput=this.createPasswordInputBox(r.ConfirmPasswordText,(async()=>{}),this.objectInfo.password??""),this.confirmPasswordContainer=this.createLabelInputContainer(r.ConfirmPasswordText,this.confirmPasswordInput),this.generalSection=this.createGroup(r.GeneralSectionHeader,[t,this.defaultSchemaContainer,this.typeContainer,this.loginContainer,this.passwordContainer,this.confirmPasswordContainer],!1)}initializeOwnedSchemaSection(){this.ownedSchemaTable=this.createTableList(r.OwnedSchemaSectionHeader,[r.SchemaText],this.viewInfo.schemas,this.objectInfo.ownedSchemas,s.DefaultMaxTableRowCount,(e=>-1===this.objectInfo.ownedSchemas.indexOf(e))),this.ownedSchemaSection=this.createGroup(r.OwnedSchemaSectionHeader,[this.ownedSchemaTable])}initializeMembershipSection(){this.membershipTable=this.createTableList(r.MembershipSectionHeader,[r.DatabaseRoleTypeDisplayNameInTitle],this.viewInfo.databaseRoles,this.objectInfo.databaseRoles),this.membershipSection=this.createGroup(r.MembershipSectionHeader,[this.membershipTable])}initializeAdvancedSection(){this.defaultLanguageDropdown=this.createDropdown(r.DefaultLanguageText,(async e=>{this.objectInfo.defaultLanguage=e}),this.viewInfo.languages,this.objectInfo.defaultLanguage);const e=this.createLabelInputContainer(r.DefaultLanguageText,this.defaultLanguageDropdown);this.advancedSection=this.createGroup(r.AdvancedSectionHeader,[e])}setViewByUserType(){switch(this.removeItem(this.generalSection,this.loginContainer),this.removeItem(this.generalSection,this.passwordContainer),this.removeItem(this.generalSection,this.confirmPasswordContainer),this.removeItem(this.formContainer,this.advancedSection),this.objectInfo.type){case"LoginMapped":this.addItem(this.generalSection,this.loginContainer);break;case"AADAuthentication":this.addItem(this.formContainer,this.advancedSection);break;case"SqlAuthentication":this.addItem(this.generalSection,this.passwordContainer),this.addItem(this.generalSection,this.confirmPasswordContainer),this.addItem(this.formContainer,this.advancedSection);break;case"WindowsUser":this.objectInfo.loginName&&this.addItem(this.generalSection,this.loginContainer)}}}t.UserDialog=c},3307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeSingleQuotes=t.convertNumToTwoDecimalStringInMB=t.isValidSQLPassword=t.refreshNode=t.refreshParentNode=void 0;const r=n(9072),i=n(9496),o=n(8682),s=n(2576);t.refreshParentNode=async function(e){if(e)try{const t=await r.objectexplorer.getNode(e.connectionProfile.id,e.nodeInfo?.nodePath),n=await(t?.getParent());await(n?.refresh())}catch(e){await i.window.showErrorMessage(s.RefreshObjectExplorerError((0,o.getErrorMessage)(e)))}},t.refreshNode=async function(e){if(e)try{const t=await r.objectexplorer.getNode(e.connectionProfile.id,e.nodeInfo?.nodePath);await(t?.refresh())}catch(e){await i.window.showErrorMessage(s.RefreshObjectExplorerError((0,o.getErrorMessage)(e)))}},t.isValidSQLPassword=function(e,t="sa"){const n=e&&t&&e.toUpperCase().includes(t.toUpperCase()),r=/[A-Z]/.test(e)?1:0,i=/[a-z]/.test(e)?1:0,o=/\d/.test(e)?1:0,s=/\W/.test(e)?1:0;return!n&&e.length>=8&&e.length<=128&&r+i+o+s>=3},t.convertNumToTwoDecimalStringInMB=function(e){return s.StringValueInMB(e?.toFixed(2))},t.escapeSingleQuotes=function(e){return e.replace(/'/g,"'")}},2426:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryStoreService=void 0;const r=n(8129),i=n(8682),o=n(6825),s=n(5868);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"queryStore").queryStore=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.QueryStoreService,this)}async getRegressedQueriesSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeIntervalRecent:t,timeIntervalHistory:n,minExecutionCount:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetRegressedQueriesSummaryRequest.type,u)}async getRegressedQueriesDetailedSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeIntervalRecent:t,timeIntervalHistory:n,minExecutionCount:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetRegressedQueriesDetailedSummaryRequest.type,u)}async getTrackedQueriesReport(e){const t={querySearchText:e};return await this.runWithErrorHandling(o.GetTrackedQueriesReportRequest.type,t)}async getHighVariationQueriesSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetHighVariationQueriesSummaryRequest.type,u)}async getHighVariationQueriesDetailedSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetHighVariationQueriesDetailedSummaryRequest.type,u)}async getTopResourceConsumersSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetTopResourceConsumersSummaryRequest.type,u)}async getTopResourceConsumersDetailedSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetTopResourceConsumersDetailedSummaryRequest.type,u)}async getPlanSummaryChartView(e,t,n,r,i,s){const a={connectionOwnerUri:e,queryId:t,timeIntervalMode:n,timeInterval:r,selectedMetric:i,selectedStatistic:s};return await this.runWithErrorHandling(o.GetPlanSummaryChartViewRequest.type,a)}async getPlanSummaryGridView(e,t,n,r,i,s,a,c){const l={connectionOwnerUri:e,orderByColumnId:t,descending:n,queryId:r,timeIntervalMode:i,timeInterval:s,selectedMetric:a,selectedStatistic:c};return await this.runWithErrorHandling(o.GetPlanSummaryGridViewRequest.type,l)}async getForcedPlan(e,t,n){const r={connectionOwnerUri:e,queryId:t,planId:n};return await this.runWithErrorHandling(o.GetForcedPlanRequest.type,r)}async getForcedPlanQueriesReport(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetForcedPlanQueriesReportRequest.type,u)}async getOverallResourceConsumptionReport(e,t,n,r,i,s,a,c){const l={connectionOwnerUri:e,specifiedTimeInterval:t,specifiedBucketInterval:n,selectedMetric:r,selectedStatistic:i,topQueriesReturned:s,returnAllQueries:a,minNumberOfQueryPlans:c};return await this.runWithErrorHandling(o.GetOverallResourceConsumptionReportRequest.type,l)}}t.QueryStoreService=a},7196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerId=t.serviceName=void 0,t.serviceName="AzureResourceProvider",t.providerId="azureresourceProvider"},1822:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HandleFirewallRuleRequest=t.CreateFirewallRuleRequest=void 0;const r=n(3056);var i,o;!function(e){e.type=new r.RequestType("resource/createFirewallRule")}(i||(t.CreateFirewallRuleRequest=i={})),function(e){e.type=new r.RequestType("resource/handleFirewallRule")}(o||(t.HandleFirewallRuleRequest=o={}))},6217:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AzureResourceProvider=void 0;const r=n(9072),i=n(5868),o=n(3056),s=n(4489),a=n(1822),c=n(7196),l=n(8682);class u extends i.SqlOpsFeature{constructor(e){super(e,u.messagesTypes)}fillClientCapabilities(e){l.ensure(l.ensure(e,"firewall"),"firwall").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:s.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return r.resources.registerResourceProvider({displayName:"Azure SQL Resource Provider",id:"Microsoft.Azure.SQL.ResourceProvider",settings:{}},{handleFirewallRule:(e,n,r)=>{let i={errorCode:e,errorMessage:n,connectionTypeId:r};return t.sendRequest(a.HandleFirewallRuleRequest.type,i)},createFirewallRule:(e,n)=>t.sendRequest(a.CreateFirewallRuleRequest.type,function(e,t){return{account:e,firewallRuleName:t.firewallRuleName,serverName:t.serverName,startIpAddress:t.startIpAddress||"",endIpAddress:t.endIpAddress||"",securityTokenMappings:t.securityTokenMappings}}(e,n))})}}u.messagesTypes=[a.CreateFirewallRuleRequest.type,a.HandleFirewallRuleRequest.type],t.AzureResourceProvider=class{constructor(e,t){this.logPath=e,t&&(this._config=JSON.parse(JSON.stringify(t)),this._config.executableFiles=["SqlToolsResourceProviderService.exe","SqlToolsResourceProviderService"])}async start(){let e={providerId:c.providerId,features:[u]};const t=await l.getOrDownloadServer(this._config);let n=this.generateServerOptions(t);this._client=new i.SqlOpsDataClient(c.serviceName,n,e),this._client.start()}async dispose(){this._client&&await this._client.stop()}generateServerOptions(e){return{command:e,args:l.getCommonLaunchArgsAndCleanupOldLogFiles(this.logPath,"resourceprovider.log",e),transport:o.TransportKind.stdio}}}},8095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaCompareService=void 0;const r=n(8129),i=n(8682),o=n(6825),s=n(5868);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"schemaCompare").schemaCompare=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.SchemaCompareService,this)}async schemaCompare(e,t,n,r,i){const s={operationId:e,sourceEndpointInfo:t,targetEndpointInfo:n,taskExecutionMode:r,deploymentOptions:i};return this.runWithErrorHandling(o.SchemaCompareRequest.type,s)}async schemaCompareGenerateScript(e,t,n,r){const i={operationId:e,targetServerName:t,targetDatabaseName:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaCompareGenerateScriptRequest.type,i)}async schemaComparePublishDatabaseChanges(e,t,n,r){const i={operationId:e,targetServerName:t,targetDatabaseName:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaComparePublishDatabaseChangesRequest.type,i)}async schemaComparePublishProjectChanges(e,t,n,r){const i={operationId:e,targetProjectPath:t,targetFolderStructure:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaComparePublishProjectChangesRequest.type,i)}async schemaCompareGetDefaultOptions(){return this.runWithErrorHandling(o.SchemaCompareGetDefaultOptionsRequest.type,{})}async schemaCompareIncludeExcludeNode(e,t,n,r){const i={operationId:e,diffEntry:t,includeRequest:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaCompareIncludeExcludeNodeRequest.type,i)}async schemaCompareOpenScmp(e){const t={filePath:e};return this.runWithErrorHandling(o.SchemaCompareOpenScmpRequest.type,t)}async schemaCompareSaveScmp(e,t,n,r,i,s,a){const c={sourceEndpointInfo:e,targetEndpointInfo:t,taskExecutionMode:n,deploymentOptions:r,scmpFilePath:i,excludedSourceObjects:s,excludedTargetObjects:a};return this.runWithErrorHandling(o.SchemaCompareSaveScmpRequest.type,c)}async schemaCompareCancel(e){const t={operationId:e};return this.runWithErrorHandling(o.SchemaCompareCancellationRequest.type,t)}}t.SchemaCompareService=a},3263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlAssessmentService=void 0;const r=n(6825),i=n(8129),o=n(5868);class s extends o.BaseService{static asFeature(e){return class extends s{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){}}}constructor(e,t){super(t),e.registerService(i.SqlAssessmentService,this)}async assessmentInvoke(e,t){let n={ownerUri:e,targetType:t};return this.runWithErrorHandling(r.SqlAssessmentInvokeRequest.type,n)}async getAssessmentItems(e,t){let n={ownerUri:e,targetType:t};return this.runWithErrorHandling(r.GetSqlAssessmentItemsRequest.type,n)}async generateAssessmentScript(e,t,n,i){let o={items:e,targetServerName:t,targetDatabaseName:n,taskExecutionMode:i};return this.runWithErrorHandling(r.GenerateSqlAssessmentScriptRequest.type,o)}}t.SqlAssessmentService=s},3768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlProjectsService=void 0;const r=n(8129),i=n(8682),o=n(6825),s=n(5868);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"sqlProjects").sqlProjects=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.SqlProjectsService,this)}async addDacpacReference(e,t,n,r,i,s){const a={projectUri:e,dacpacPath:t,suppressMissingDependencies:n,databaseVariable:r,serverVariable:i,databaseLiteral:s};return await this.runWithErrorHandling(o.AddDacpacReferenceRequest.type,a)}async addSqlProjectReference(e,t,n,r,i,s,a){const c={projectUri:e,projectPath:t,projectGuid:n,suppressMissingDependencies:r,databaseVariable:i,serverVariable:s,databaseLiteral:a};return await this.runWithErrorHandling(o.AddSqlProjectReferenceRequest.type,c)}async addSystemDatabaseReference(e,t,n,r,i){const s={projectUri:e,systemDatabase:t,suppressMissingDependencies:n,referenceType:r,databaseLiteral:i};return await this.runWithErrorHandling(o.AddSystemDatabaseReferenceRequest.type,s)}async addNugetPackageReference(e,t,n,r,i,s,a){const c={projectUri:e,packageName:t,packageVersion:n,suppressMissingDependencies:r,databaseVariable:i,serverVariable:s,databaseLiteral:a};return await this.runWithErrorHandling(o.AddNugetPackageReferenceRequest.type,c)}async deleteDatabaseReference(e,t){const n={projectUri:e,name:t};return await this.runWithErrorHandling(o.DeleteDatabaseReferenceRequest.type,n)}async addFolder(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddFolderRequest.type,n)}async deleteFolder(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeleteFolderRequest.type,n)}async addPostDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddPostDeploymentScriptRequest.type,n)}async addPreDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddPreDeploymentScriptRequest.type,n)}async deletePostDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeletePostDeploymentScriptRequest.type,n)}async deletePreDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeletePreDeploymentScriptRequest.type,n)}async excludePostDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludePostDeploymentScriptRequest.type,n)}async excludePreDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludePreDeploymentScriptRequest.type,n)}async movePostDeploymentScript(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MovePostDeploymentScriptRequest.type,r)}async movePreDeploymentScript(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MovePreDeploymentScriptRequest.type,r)}async closeProject(e){const t={projectUri:e};return await this.runWithErrorHandling(o.CloseSqlProjectRequest.type,t)}async createProject(e,t,n,r){const i={projectUri:e,sqlProjectType:t,databaseSchemaProvider:n,buildSdkVersion:r};return await this.runWithErrorHandling(o.CreateSqlProjectRequest.type,i)}async getCrossPlatformCompatibility(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetCrossPlatformCompatibilityRequest.type,t)}async openProject(e){const t={projectUri:e};return await this.runWithErrorHandling(o.OpenSqlProjectRequest.type,t)}async updateProjectForCrossPlatform(e){const t={projectUri:e};return await this.runWithErrorHandling(o.UpdateProjectForCrossPlatformRequest.type,t)}async getProjectProperties(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetProjectPropertiesRequest.type,t)}async setDatabaseSource(e,t){const n={projectUri:e,databaseSource:t};return await this.runWithErrorHandling(o.SetDatabaseSourceRequest.type,n)}async setDatabaseSchemaProvider(e,t){const n={projectUri:e,databaseSchemaProvider:t};return await this.runWithErrorHandling(o.SetDatabaseSchemaProviderRequest.type,n)}async addSqlCmdVariable(e,t,n){const r={projectUri:e,name:t,defaultValue:n};return await this.runWithErrorHandling(o.AddSqlCmdVariableRequest.type,r)}async deleteSqlCmdVariable(e,t){const n={projectUri:e,name:t};return await this.runWithErrorHandling(o.DeleteSqlCmdVariableRequest.type,n)}async updateSqlCmdVariable(e,t,n){const r={projectUri:e,name:t,defaultValue:n};return await this.runWithErrorHandling(o.UpdateSqlCmdVariableRequest.type,r)}async addSqlObjectScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddSqlObjectScriptRequest.type,n)}async deleteSqlObjectScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeleteSqlObjectScriptRequest.type,n)}async excludeSqlObjectScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludeSqlObjectScriptRequest.type,n)}async moveSqlObjectScript(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MoveSqlObjectScriptRequest.type,r)}async getDatabaseReferences(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetDatabaseReferencesRequest.type,t)}async getFolders(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetFoldersRequest.type,t)}async getPostDeploymentScripts(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetPostDeploymentScriptsRequest.type,t)}async getPreDeploymentScripts(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetPreDeploymentScriptsRequest.type,t)}async getSqlCmdVariables(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetSqlCmdVariablesRequest.type,t)}async getSqlObjectScripts(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetSqlObjectScriptsRequest.type,t)}async addNoneItem(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddNoneItemRequest.type,n)}async deleteNoneItem(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeleteNoneItemRequest.type,n)}async excludeNoneItem(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludeNoneItemRequest.type,n)}async getNoneItems(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetNoneItemsRequest.type,t)}async moveNoneItem(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MoveNoneItemRequest.type,r)}async excludeFolder(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludeFolderRequest.type,n)}async moveFolder(e,t,n){const r={projectUri:e,path:t,destinationPath:n};return await this.runWithErrorHandling(o.MoveFolderRequest.type,r)}}t.SqlProjectsService=a},3462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlToolsServer=void 0;const r=n(3056),i=n(8129),o=n(9496),s=n(9072),a=n(1017),c=n(8682),l=n(7475),u=n(5868),d=n(7476),p=n(1863),h=n(6217),f=n(8095),m=n(2862),g=n(4309),y=n(6825),v=n(7147),b=n(3403),S=n(9081),w=n(3263),T=n(2882),_=n(7035),E=n(7694),C=n(368),R=n(3768),x=n(252),I=n(2426),O=n(6462),P=b.loadMessageBundle(n(1017).join(__dirname,"sqlToolsServer.ts")),D=o.window.createOutputChannel(i.serviceName),A=o.window.createStatusBarItem(o.StatusBarAlignment.Left),N={[c.TracingLevel.All]:0,[c.TracingLevel.Critical]:4,[c.TracingLevel.Error]:3,[c.TracingLevel.Information]:1,[c.TracingLevel.Verbose]:0,[c.TracingLevel.Warning]:2};function k(e,...t){let n=0;switch(e){case"install_start":D.show(!0),A.show(),D.appendLine(P(3,null,i.serviceName,t[0])),A.text=P(4,null,i.serviceName);break;case"install_end":D.appendLine(P(5,null,i.serviceName));break;case"download_start":D.appendLine(P(6,null,t[0])),D.append(P(7,null,Math.ceil(t[1]/1024).toLocaleString(o.env.language))),A.text=P(8,null,i.serviceName);break;case"download_progress":let e=Math.ceil(t[0]/5);e>n&&(D.append(".".repeat(e-n)),n=e);break;case"download_end":D.appendLine(""),D.appendLine(P(9,null,i.serviceName));break;case"entry_extracted":D.appendLine(P(10,null,t[0],t[1],t[2]));break;case"log_emitted":const r=N[(0,c.getConfigTracingLevel)()],s=t[0],a=t[1];void 0!==r&&s>=r&&D.appendLine(a)}}t.SqlToolsServer=class{constructor(){this.disposables=new Array}async start(e){try{const t=Date.now(),n=await this.download(e);this.installDirectory=a.dirname(n);const p=Date.now();let h=function(e,t){const n=(0,c.getCommonLaunchArgsAndCleanupOldLogFiles)(e,"sqltools.log",t);if((0,c.getParallelMessageProcessingConfig)()){n.push("--parallel-message-processing");const e=(0,c.getParallelMessageProcessingLimitConfig)();n.push("--parallel-message-processing-limit"),n.push(String(e))}return!0===(0,c.getEnableSqlAuthenticationProviderConfig)()&&n.push("--enable-sql-authentication-provider"),(0,c.getEnableConnectionPoolingConfig)()&&n.push("--enable-connection-pooling"),{command:t,args:n,transport:r.TransportKind.stdio}}(e.extensionContext.logPath,n),v=function(e){return{documentSelector:["sql"],synchronize:{configurationSection:[i.extensionConfigSectionName,i.telemetryConfigSectionName,i.queryEditorConfigSectionName]},providerId:i.providerId,errorHandler:new l.LanguageClientErrorHandler,features:[...u.SqlOpsDataClient.defaultFeatures,d.TelemetryFeature,d.AccountFeature,d.AgentServicesFeature,d.SerializationFeature,d.SqlAssessmentServicesFeature,O.ConnectionService.asFeature(e),f.SchemaCompareService.asFeature(e),S.LanguageExtensionService.asFeature(e),m.DacFxService.asFeature(e),R.SqlProjectsService.asFeature(e),g.CmsService.asFeature(e),w.SqlAssessmentService.asFeature(e),T.NotebookConvertService.asFeature(e),d.ProfilerFeature,_.SqlCredentialService.asFeature(e),d.TableDesignerFeature,d.ExecutionPlanServiceFeature,C.ErrorDiagnosticsProvider.asFeature(e),x.ObjectManagementService.asFeature(e),I.QueryStoreService.asFeature(e)],outputChannel:D,revealOutputChannelOn:s.env.quality===s.env.AppQuality.dev?r.RevealOutputChannelOn.Error:r.RevealOutputChannelOn.Never}}(e);this.client=new u.SqlOpsDataClient("mssql",i.serviceName,h,v);const b=Date.now(),E=this.client.onReady().then((()=>{const e=Date.now();A.text=P(0,null,i.serviceName),setTimeout((()=>{A.hide()}),1500),o.commands.registerCommand("mssql.loadCompletionExtension",(e=>this.client.sendRequest(y.CompletionExtLoadRequest.type,e))),l.TelemetryReporter.sendTelemetryEvent("startup/LanguageClientStarted",{installationTime:String(p-t),processStartupTime:String(e-b),totalTime:String(e-t),beginningTimestamp:String(t)})}));return A.show(),A.text=P(1,null,i.serviceName),this.client.start(),await Promise.all([this.activateFeatures(e),E]),await this.handleEncryptionKeyEventNotification(this.client),this.client}catch(e){throw l.TelemetryReporter.sendTelemetryEvent("ServiceInitializingFailed"),o.window.showErrorMessage(P(2,null,i.serviceName)),e}}async handleEncryptionKeyEventNotification(e){if((0,c.getEnableSqlAuthenticationProviderConfig)()){let t=await this.getAzureCoreAPI();(0,t.onEncryptionKeysUpdated)((t=>{e.sendNotification(y.EncryptionKeysChangedNotification.type,t)}));try{const n=await t.getEncryptionKeys();e.sendNotification(y.EncryptionKeysChangedNotification.type,n)}catch(e){console.error(`An error occurred when fetching encryption keys: ${e}`)}(0,c.logDebug)("SqlToolsServer: Registered encryption key event handler.")}}async getAzureCoreAPI(){const e=await(o.extensions.getExtension("Microsoft.azurecore")?.activate());if(!e)throw new Error("Azure core extension could not be activated.");return e}async download(e){const t=e.extensionContext.extensionPath,n=await v.promises.readFile(a.join(t,"config.json"));return this.config=JSON.parse(n.toString()),this.config.installDirectory=a.join(t,this.config.installDirectory),this.config.proxy=o.workspace.getConfiguration("http").get("proxy",""),this.config.strictSSL=o.workspace.getConfiguration("http").get("proxyStrictSSL",!0),(0,c.getOrDownloadServer)(this.config,k)}activateFeatures(e){const t=new p.CredentialStore(e,this.config),n=new h.AzureResourceProvider(e.extensionContext.logPath,this.config);return this.disposables.push(t),this.disposables.push(n),e.registerService(i.AzureBlobService,new E.AzureBlobService(this.client)),Promise.all([t.start(),n.start()]).then()}async dispose(){this.disposables.forEach((e=>e.dispose())),this.client&&await this.client.stop()}}},860:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTableDesignerCommands=void 0;const r=n(9072),i=n(9496),o=n(8129),s=n(4489),a=n(7475),c=n(3403),l=n(8682),u=c.loadMessageBundle(n(1017).join(__dirname,"tableDesigner\\tableDesigner.ts")),d=u(0,null),p="tableDesigner.DidInformUser",h=u(1,null);async function f(e,t){const n=await r.connection.getServerInfo(e.connectionProfile.id),i={tableType:t};return(0,a.fillServerInfo)(i,n),i}async function m(e){if((0,l.getConfigPreloadDatabaseModel)())return;if(e.extensionContext.globalState.get(p))return;e.extensionContext.globalState.update(p,!0);const t=u(2,null),n=u(3,null);await i.window.showInformationMessage(u(4,null),t,n)===t&&(0,l.setConfigPreloadDatabaseModel)(!0)}t.registerTableDesignerCommands=function(e){e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newTable",(async t=>{try{m(e);const n=await r.connection.getConnectionString(t.connectionProfile.id,!0);if(!n)throw new Error(h);const i=t.nodeInfo.nodeSubType,a=await f(t,i);let c=await r.connection.getNonDefaultOptions(t.connectionProfile);await r.designers.openTableDesigner(o.sqlProviderName,{title:d,tooltip:t.connectionProfile.connectionName?`${t.connectionProfile.connectionName} - ${d}`:`${t.connectionProfile.serverName} - ${t.connectionProfile.databaseName} - ${d}`,server:t.connectionProfile.serverName,database:t.connectionProfile.databaseName,isNewTable:!0,id:(0,s.generateUuid)(),connectionString:n,accessToken:t.connectionProfile.options.azureAccountToken,tableIcon:i,additionalInfo:`${t.connectionProfile.serverName+" - "+t.connectionProfile.databaseName}${c}`},a,t)}catch(e){console.error(e),await i.window.showErrorMessage((0,l.getErrorMessage)(e),{modal:!0})}}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.designTable",(async t=>{try{m(e);const n=t.connectionProfile.connectionName,i=t.connectionProfile.serverName,s=t.connectionProfile.databaseName,a=t.nodeInfo.metadata.schema,c=t.nodeInfo.metadata.name,l=await r.connection.getConnectionString(t.connectionProfile.id,!0);if(!l)throw new Error(h);const u=t.nodeInfo.nodeSubType,d=await f(t,u);let p=await r.connection.getNonDefaultOptions(t.connectionProfile);await r.designers.openTableDesigner(o.sqlProviderName,{title:`${a}.${c}`,tooltip:n?`${n} - ${a}.${c}`:`${i} - ${s} - ${a}.${c}`,server:i,database:s,isNewTable:!1,name:c,schema:a,id:`${o.sqlProviderName}|${i}|${s}|${a}|${c}`,connectionString:l,accessToken:t.connectionProfile.options.azureAccountToken,tableIcon:u,additionalInfo:`${i+" - "+s}${p}`},d,t)}catch(e){console.error(e),await i.window.showErrorMessage((0,l.getErrorMessage)(e),{modal:!0})}})))}},7475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryActions=t.TelemetryViews=t.LanguageClientErrorHandler=t.fillServerInfo=t.TelemetryReporter=void 0;const r=n(9496),i=n(7437),o=n(3056),s=n(8129),a=n(3403).loadMessageBundle(n(1017).join(__dirname,"telemetry.ts")),c=a(0,null),l=r.extensions.getExtension(s.packageName)?.packageJSON;var u,d;t.TelemetryReporter=new i.default(l?.name,l?.version,l?.aiKey),t.fillServerInfo=function(e,t){e.serverEdition=t?.serverEdition,e.serverLevel=t?.serverLevel,e.serverMajorVersion=t?.serverMajorVersion?.toString()||"",e.serverMinorVersion=t?.serverMinorVersion?.toString()||"",e.isCloud=t?.isCloud.toString()},t.LanguageClientErrorHandler=class{showOnErrorPrompt(){t.TelemetryReporter.sendTelemetryEvent(s.serviceName+"Crash"),r.window.showErrorMessage(a(1,null,s.serviceName),c).then((e=>{e&&e===c&&r.env.openExternal(r.Uri.parse(s.serviceCrashLink))}))}error(e,t,n){return this.showOnErrorPrompt(),o.ErrorAction.Shutdown}closed(){return this.showOnErrorPrompt(),o.CloseAction.DoNotRestart}},function(e){e.MssqlObjectExplorer="mssqlObjectExplorer",e.MssqlConnections="mssqlConnections"}(u||(t.TelemetryViews=u={})),function(e){e.GroupBySchemaEnabled="objectExplorerGroupBySchemaEnabled",e.GroupBySchemaDisabled="objectExplorerGroupBySchemaDisabled",e.EnableGroupBySchemaContextMenu="objectExplorerEnableGroupBySchemaContextMenu",e.DisableGroupBySchemaContextMenu="objectExplorerDisableGroupBySchemaContextMenu",e.EnableGroupByServerViewTitleAction="objectExplorerEnableGroupByServerViewTitleAction",e.DisableGroupByServerViewTitleAction="objectExplorerDisableGroupByServerViewTitleAction",e.EnableFeatureAsyncParallelProcessing="enableFeatureAsyncParallelProcessing",e.EnableFeatureSqlAuthenticationProvider="enableFeatureSqlAuthenticationProvider",e.EnableFeatureConnectionPooling="enableFeatureConnectionPooling"}(d||(t.TelemetryActions=d={}))},2938:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUndefined=t.isUndefinedOrNull=void 0;const n="undefined";function r(e){return typeof e===n}t.isUndefinedOrNull=function(e){return r(e)||null===e},t.isUndefined=r},886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogBase=t.DefaultTableListItemComparer=t.DefaultTableListItemValueGetter=t.DefaultTableListItemEnabledStateGetter=t.getTableHeight=t.DefaultMinTableRowCount=t.DefaultMaxTableRowCount=t.DefaultTableWidth=t.DefaultColumnCheckboxWidth=t.DefaultInputWidth=t.DefaultLabelWidth=void 0;const r=n(9072),i=n(2037),o=n(1959),s=n(5150);function a(e,n=t.DefaultMinTableRowCount,r=t.DefaultMaxTableRowCount){return 25*Math.min(Math.max(e,n),r)+30}t.DefaultLabelWidth=150,t.DefaultInputWidth=300,t.DefaultColumnCheckboxWidth=150,t.DefaultTableWidth=t.DefaultInputWidth+t.DefaultLabelWidth,t.DefaultMaxTableRowCount=10,t.DefaultMinTableRowCount=1,t.getTableHeight=a,t.DefaultTableListItemEnabledStateGetter=e=>!0,t.DefaultTableListItemValueGetter=e=>[e?.toString()??""],t.DefaultTableListItemComparer=(e,t)=>e===t,t.DialogBase=class{constructor(e,t,n="narrow",i="flyout"){this.disposables=[],this.dialogObject=r.window.createModelViewDialog(e,t,n,i),this.dialogObject.okButton.label=o.OkText,this.dialogObject.registerCloseValidator((async()=>!!await this.onConfirmation()&&await this.runValidation())),this._closePromise=new Promise((e=>{this.disposables.push(this.dialogObject.onClosed((async t=>{await this.dispose(t);const n="ok"===t?this.dialogResult:void 0;e(n)})))}))}waitForClose(){return this._closePromise}get dialogResult(){}async onConfirmation(){return!0}get formContainer(){return this._formContainer}get modelView(){return this._modelView}onFormFieldChange(){}removeButtonEnabled(e){return!0}addButtonEnabled(e){return!0}validateInput(){return Promise.resolve([])}async open(){try{this.updateLoadingStatus(!0);const e=new Promise((async e=>{this.dialogObject.registerContent((async t=>{this._modelView=t,this._formContainer=this.createFormContainer([]),this.disposables.push(this._formContainer),this._loadingComponent=t.modelBuilder.loadingComponent().withItem(this._formContainer).withProps({loading:!0,loadingText:o.LoadingDialogText,loadingCompletedText:o.LoadingDialogCompletedText,showText:!0,CSSStyles:{width:"100%",height:"100%"}}).component(),await t.initializeModel(this._loadingComponent),e()}))}));r.window.openDialog(this.dialogObject),await e,await this.initialize(),this.updateLoadingStatus(!1)}catch(e){throw r.window.closeDialog(this.dialogObject),e}}async dispose(e){this.disposables.forEach((e=>e.dispose()))}async runValidation(e=!0){const t=await this.validateInput();return t.length>0&&(this.dialogObject.message?.text||e)?this.dialogObject.message={text:t.join(i.EOL),level:r.window.MessageLevel.Error}:this.dialogObject.message=void 0,0===t.length}createLabelInputContainer(e,n,r=!1){let i;if(Array.isArray(n)){const o=this.modelView.modelBuilder.text().withProps({width:t.DefaultLabelWidth-40,value:e,requiredIndicator:r,CSSStyles:{"padding-right":"10px"}}).component();i=this.modelView.modelBuilder.flexContainer().withItems([o,...n],{CSSStyles:{"margin-right":"5px","margin-bottom":"10px"}}).withLayout({flexFlow:"row",alignItems:"center"}).component()}else{const o=this.modelView.modelBuilder.text().withProps({width:t.DefaultLabelWidth,value:e,requiredIndicator:r,CSSStyles:{"padding-right":"10px"}}).component();i=this.modelView.modelBuilder.flexContainer().withLayout({flexFlow:"horizontal",flexWrap:"nowrap",alignItems:"center"}).withItems([o],{flex:"0 0 auto"}).component(),i.addItem(n,{flex:"1 1 auto"})}return i}createCheckbox(e,t,n=!1,r=!0){const i=this.modelView.modelBuilder.checkBox().withProps({label:e,checked:n,enabled:r}).component();return this.disposables.push(i.onChanged((async()=>{await t(i.checked),this.onFormFieldChange(),await this.runValidation(!1)}))),i}createPasswordInputBox(e,n,r="",i=!0,o=t.DefaultInputWidth){return this.createInputBox(n,{ariaLabel:e,value:r,enabled:i,inputType:"password",width:o})}createInputBox(e,n,r){n.width=n.width??t.DefaultInputWidth,n.inputType=n.inputType??"text",n.value=n.value??"",n.enabled=n.enabled??!0;const i=this.modelView.modelBuilder.inputBox().withProps(n);r&&i.withValidation(r);const o=i.component();return this.disposables.push(o.onTextChanged((async()=>{await e(o.value),this.onFormFieldChange(),await this.runValidation(!1)}))),o}createGroup(e,t,n=!0,r=!1){return this.modelView.modelBuilder.groupContainer().withLayout({header:e,collapsible:n,collapsed:r}).withItems(t).component()}createTab(e,t,n){return{title:t,content:n,id:e}}createTableList(e,n,i,s,c=t.DefaultMaxTableRowCount,l=t.DefaultTableListItemEnabledStateGetter,u=t.DefaultTableListItemValueGetter,d=t.DefaultTableListItemComparer){const p=this.getDataForTableList(i,s,l,u,d),h=this.modelView.modelBuilder.table().withProps({ariaLabel:e,data:p,columns:[{value:o.SelectText,type:r.ColumnType.checkBox,options:{actionOnCheckbox:r.ActionOnCellCheckboxCheck.customAction}},...n.map((e=>({value:e})))],width:t.DefaultTableWidth,height:a(p.length,t.DefaultMinTableRowCount,c)}).component();return this.disposables.push(h.onCellAction((e=>{const t=i[e.row],n=s.findIndex((e=>d(e,t)));e.checked&&-1===n?s.push(t):e.checked||-1===n||s.splice(n,1),this.onFormFieldChange()}))),h}async setTableData(e,n,r=t.DefaultMaxTableRowCount){await e.updateProperties({data:n,height:a(n.length,t.DefaultMinTableRowCount,r)})}getDataForTableList(e,n,r=t.DefaultTableListItemEnabledStateGetter,i=t.DefaultTableListItemValueGetter,o=t.DefaultTableListItemComparer){return e.map((e=>{const t=n.findIndex((t=>o(t,e)));return[{checked:-1!==t,enabled:r(e)},...i(e)]}))}createTable(e,n,r,i=t.DefaultMaxTableRowCount){return this.modelView.modelBuilder.table().withProps({ariaLabel:e,data:r,columns:n,width:t.DefaultTableWidth,height:a(r.length,t.DefaultMinTableRowCount,i)}).component()}addButtonsForTable(e,t,n,r=void 0){let i,s,a,c=[];const l=(t=void 0)=>{this.onFormFieldChange();const n=1===e.selectedRows?.length&&-1!==e.selectedRows[0]&&e.selectedRows[0]<e.data.length;void 0!==r&&(s.enabled=n),i.enabled=this.addButtonEnabled(e),a.enabled=!!t&&n};return i=this.createButton(o.AddText,t.buttonAriaLabel,(async()=>{await t.buttonHandler(i),l()}),t.enabled??!0),c.push(i),void 0!==r&&(s=this.createButton(o.EditText,r.buttonAriaLabel,(async()=>{await r.buttonHandler(s),l()}),!1),c.push(s)),a=this.createButton(o.RemoveText,n.buttonAriaLabel,(async()=>{await n.buttonHandler(a),1===e.selectedRows.length&&e.selectedRows[0]>=e.data.length&&(e.selectedRows=[e.data.length-1]),l()}),!1),c.push(a),this.disposables.push(e.onRowSelected((()=>{const t=this.removeButtonEnabled(e);l(t)}))),this.createButtonContainer(c)}createDropdown(e,n,r,i,o=!0,s=t.DefaultInputWidth,a,c){const l=[];l.push(...r),i||l.unshift("");const u=this.modelView.modelBuilder.dropDown().withProps({ariaLabel:e,values:l,value:i,width:s,enabled:o,editable:a,strictSelection:c}).component();return this.disposables.push(u.onValueChanged((async()=>{await n(u.value),this.onFormFieldChange(),await this.runValidation(!1)}))),u}createButton(e,t,n,r=!0){const i=this.modelView.modelBuilder.button().withProps({label:e,ariaLabel:t,enabled:r,secondary:!0,CSSStyles:{"min-width":"70px","margin-left":"5px"}}).component();return this.disposables.push(i.onDidClick((async()=>{await n()}))),i}createButtonContainer(e,t="flex-end"){return this.modelView.modelBuilder.flexContainer().withProps({CSSStyles:{margin:"5px 0"}}).withLayout({flexFlow:"horizontal",flexWrap:"nowrap",justifyContent:t}).withItems(e,{flex:"0 0 auto"}).component()}createHorizontalContainer(e,t){return this.modelView.modelBuilder.flexContainer().withItems(t,{CSSStyles:{"margin-right":"5px","margin-bottom":"10px"}}).withLayout({flexFlow:"row",alignItems:"center"}).component()}createBrowseButton(e,t=!0){const n=this.dialogObject.modelView.modelBuilder.button().withProps({ariaLabel:"browse",iconPath:s.IconPathHelper.folder,width:"18px",height:"20px",enabled:t}).component();return this.disposables.push(n.onDidClick((async()=>{await e()}))),n}createRadioButton(e,t,n,r,i=!0){const o=this.modelView.modelBuilder.radioButton().withProps({label:e,name:t,checked:n,enabled:i}).component();return this.disposables.push(o.onDidChangeCheckedState((async e=>{await r(e),this.onFormFieldChange(),await this.runValidation(!1)}))),o}removeItem(e,t){-1!==e.items.indexOf(t)&&e.removeItem(t)}addItem(e,t,n,r){-1===e.items.indexOf(t)&&(void 0===r?e.addItem(t,n):e.insertItem(t,r,n))}updateLoadingStatus(e,t=o.LoadingDialogText,n=o.LoadingDialogCompletedText){this._loadingComponent&&(this._loadingComponent.loadingText=t,this._loadingComponent.loadingCompletedText=n,this._loadingComponent.loading=e)}createFormContainer(e){return this.modelView.modelBuilder.divContainer().withLayout({width:"calc(100% - 20px)",height:"calc(100% - 20px)"}).withProps({CSSStyles:{padding:"10px"}}).withItems(e,this.getSectionItemLayout()).component()}getSectionItemLayout(){return{CSSStyles:{"margin-block-end":"5px"}}}createHyperlink(e,t){return this.modelView.modelBuilder.hyperlink().withProps({label:e,ariaLabel:e,url:t,showLinkIcon:!0}).component()}}},1959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scriptError=t.GeneratingScriptCompletedText=t.GeneratingScriptText=t.ScriptGeneratedText=t.NoActionScriptedMessage=t.RemoveText=t.EditText=t.AddText=t.SelectText=t.ScriptText=t.LoadingDialogCompletedText=t.LoadingDialogText=t.OkText=t.YesText=t.HelpText=void 0;const r=n(3403).loadMessageBundle(n(1017).join(__dirname,"ui\\localizedConstants.ts"));t.HelpText=r(0,null),t.YesText=r(1,null),t.OkText=r(2,null),t.LoadingDialogText=r(3,null),t.LoadingDialogCompletedText=r(4,null),t.ScriptText=r(5,null),t.SelectText=r(6,null),t.AddText=r(7,null),t.EditText=r(8,null),t.RemoveText=r(9,null),t.NoActionScriptedMessage=r(10,null),t.ScriptGeneratedText=r(11,null),t.GeneratingScriptText=r(12,null),t.GeneratingScriptCompletedText=r(13,null),t.scriptError=function(e){return r(14,null,e)}},1887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptableDialogBase=void 0;const r=n(9072),i=n(9496),o=n(1959),s=n(886),a=n(8682),c=n(8129);class l extends s.DialogBase{constructor(e,t,n){super(e,t,n.width||"narrow","flyout"),this.options=n,this._helpButton=r.window.createButton(o.HelpText,"left"),this.disposables.push(this._helpButton.onClick((async()=>{await i.commands.executeCommand("vscode.open",i.Uri.parse(this.helpUrl))}))),this._scriptButton=r.window.createButton(o.ScriptText,"left"),this.disposables.push(this._scriptButton.onClick((async()=>{await this.onScriptButtonClick()}))),this.dialogObject.customButtons=[this._helpButton,this._scriptButton]}onFormFieldChange(){this.updateScriptButtonState(),this.dialogObject.okButton.enabled=this.isDirty}async initialize(){await this.initializeData(),await this.initializeUI(),this.disposables.push(this.modelView.onValidityChanged((()=>{this.updateScriptButtonState()})))}updateLoadingStatus(e,t,n){super.updateLoadingStatus(e,t,n),this._helpButton.enabled=!e,this.dialogObject.okButton.enabled=this._scriptButton.enabled=!e&&this.isDirty}async onScriptButtonClick(){this.updateLoadingStatus(!0,o.GeneratingScriptText,o.GeneratingScriptCompletedText);try{if(!await this.runValidation())return;let e;const t=await this.generateScript();if(t){e=o.ScriptGeneratedText;let n=await r.queryeditor.openQueryDocument({content:t},c.providerId);if(this.options.objectExplorerContext?.connectionProfile){let e=this.options.objectExplorerContext?.connectionProfile,t={providerId:e.providerName,connectionId:e.id,connectionName:e.connectionName,serverName:e.serverName,databaseName:e.databaseName,userName:e.userName,password:e.password,authenticationType:e.authenticationType,savePassword:e.savePassword,groupFullName:e.groupFullName,groupId:e.groupId,saveProfile:e.savePassword,azureTenantId:e.azureTenantId,options:e.options};await n.connect(t)}}else e=o.NoActionScriptedMessage;this.dialogObject.message={text:e,level:r.window.MessageLevel.Information}}catch(e){this.dialogObject.message={text:o.scriptError((0,a.getErrorMessage)(e)),level:r.window.MessageLevel.Error}}finally{this.updateLoadingStatus(!1,o.GeneratingScriptText,o.GeneratingScriptCompletedText)}}updateScriptButtonState(){this._scriptButton.enabled=this.isDirty&&this.modelView.valid}}t.ScriptableDialogBase=l},6447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=t.flatten=t.equals=void 0,t.equals=function(e,t,n=((e,t)=>e===t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0},t.flatten=function(e){return[].concat.apply([],e)},t.groupBy=function(e,t){const n=[];let r;for(const i of e.slice(0).sort(t))r&&0===t(r[0],i)?r.push(i):(r=[i],n.push(r));return n}},7326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataItemCache=void 0,t.DataItemCache=class{constructor(e,t){this.millisecondsToLive=1e3*t,this.getValueFunction=e,this.cachedItem=void 0,this.fetchDate=new Date(0)}isCacheExpired(){return this.fetchDate.getTime()+this.millisecondsToLive<(new Date).getTime()}async getData(...e){if(!this.cachedItem||this.isCacheExpired()){let t=await this.getValueFunction(...e);return this.cachedItem=t,this.fetchDate=new Date,t}return this.cachedItem}resetCache(){this.fetchDate=new Date(0)}}},7274:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,t.Disposable=class{constructor(){this._isDisposed=!1,this._disposables=[]}dispose(){this._isDisposed||(this._isDisposed=!0,function(e){for(;e.length;){const t=e.pop();t?.dispose()}}(this._disposables))}_register(e){return this._isDisposed?e.dispose():this._disposables.push(e),e}get isDisposed(){return this._isDisposed}}},7194:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=t.equals=void 0,t.equals=function e(t,n,r=!0){if(t===n)return!0;if(null==t||null==n)return!1;if(typeof t!=typeof n)return!1;if("object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;let i,o;if(Array.isArray(t)){if(t.length!==n.length)return!1;for(i=0;i<t.length;i++)if(r){if(!e(t[i],n[i],r))return!1}else{let o=!1;for(let s=0;s<n.length;s++)if(e(t[i],n[s],r)){o=!0;break}if(!o)return!1}}else{const s=[];for(o in t)s.push(o);s.sort();const a=[];for(o in n)a.push(o);if(a.sort(),!e(s,a,r))return!1;for(i=0;i<s.length;i++)if(!e(t[s[i]],n[s[i]],r))return!1}return!0},t.deepClone=function e(t){if(!t||"object"!=typeof t)return t;if(t instanceof RegExp)return t;const n=Array.isArray(t)?[]:{};return Object.keys(t).forEach((r=>{t[r]&&"object"==typeof t[r]?n[r]=e(t[r]):n[r]=t[r]})),n}},8682:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOrDownloadServer=t.exists=t.logDebug=t.isValidNumber=t.getUserHome=t.isObjectExplorerContext=t.removeErrorHeader=t.getErrorMessage=t.verifyPlatform=t.ensure=t.getCommonLaunchArgsAndCleanupOldLogFiles=t.getLogFileName=t.getEnableConnectionPoolingConfig=t.getEnableSqlAuthenticationProviderConfig=t.getParallelMessageProcessingLimitConfig=t.getParallelMessageProcessingConfig=t.setConfigPreloadDatabaseModel=t.getConfigPreloadDatabaseModel=t.getConfigPiiLogging=t.getConfigTracingLevel=t.TracingLevel=t.getHttpProxyStrictSSL=t.getHttpProxyUrl=t.getConfigLogRetentionSeconds=t.getConfigLogFilesRemovalLimit=t.getConfiguration=t.removeOldLogFiles=t.findNextUntitledEditorName=t.getAppDataPath=t.isLinux=void 0;const r=n(9072),i=n(9496),o=n(1017),s=n(2037),a=n(5763),c=n(7147),l=n(9707),u=n(7282),d="logRetentionMinutes",p="logFilesRemovalLimit",h="mssql",f="enableConnectionPooling",m="tableDesigner.preloadDatabaseModel",g="http";function y(){switch(process.platform){case"win32":return process.env.APPDATA||o.join(process.env.USERPROFILE||"","AppData","Roaming");case"darwin":return o.join(s.homedir(),"Library","Application Support");case"linux":return process.env.XDG_CONFIG_HOME||o.join(s.homedir(),".config");default:throw new Error("Platform not supported")}}function v(e,t){return a(e,{age:{seconds:w()},limit:S()})}function b(e=h){return i.workspace.getConfiguration(e)}function S(){let e=b();return e?Number(e[p].toFixed(0)):void 0}function w(){let e=b();return e?Number((60*e[d]).toFixed(0)):void 0}function T(){let e=b(g);if(e)return e.proxy}function _(){let e=b(g);return!e||e.get("proxyStrictSSL",!0)}var E;function C(){let e=b();return e?e.tracingLevel:E.Critical}function R(){let e=b();return!!e&&e.piiLogging}function x(e){if(e&&""!==e){let t="Error:";e.startsWith(t)&&(e=e.substring(t.length))}return e}async function I(e){try{return await c.promises.access(e),!0}catch(e){return!1}}t.isLinux="linux"===s.platform(),t.getAppDataPath=y,t.findNextUntitledEditorName=function(e){const t=o.extname(e),n=o.basename(e,t);let i=0,s=`${n}`;do{s=`${n}${0===i?"":`-${i}`}`,i++}while(r.nb.notebookDocuments.findIndex((e=>e.isUntitled&&e.fileName===s))>-1);return s},t.removeOldLogFiles=v,t.getConfiguration=b,t.getConfigLogFilesRemovalLimit=S,t.getConfigLogRetentionSeconds=w,t.getHttpProxyUrl=T,t.getHttpProxyStrictSSL=_,function(e){e.All="All",e.Off="Off",e.Critical="Critical",e.Error="Error",e.Warning="Warning",e.Information="Information",e.Verbose="Verbose"}(E||(t.TracingLevel=E={})),t.getConfigTracingLevel=C,t.getConfigPiiLogging=R,t.getConfigPreloadDatabaseModel=function(){let e=b();return!!e&&e.get(m,!1)},t.setConfigPreloadDatabaseModel=function(e){let t=b();t&&t.update(m,e,!0)},t.getParallelMessageProcessingConfig=function(){const e=b();return!e||e.parallelMessageProcessing},t.getParallelMessageProcessingLimitConfig=function(){const e=b();return e?e.parallelMessageProcessingLimit:100},t.getEnableSqlAuthenticationProviderConfig=function(){const e=b();return!e||e.get("enableSqlAuthenticationProvider",!0)},t.getEnableConnectionPoolingConfig=function(){const e=b();if(e){const t=e.inspect(f);return r.env.quality===r.env.AppQuality.dev&&void 0===t?.globalValue&&void 0===t?.workspaceValue||e[f]}return!0},t.getLogFileName=function(e,t){return`${e}_${t}.log`},t.getCommonLaunchArgsAndCleanupOldLogFiles=function(e,t,n){let r=[];r.push("--application-name","azuredatastudio"),r.push("--data-path",y()),r.push("--locale",i.env.language),r.push("--log-file");let s=o.join(e,t);r.push(s),console.log(`logFile for ${o.basename(n)} is ${s}`),console.log(`This process (ui Extension Host) is pid: ${process.pid}`);let a=v(e);console.log(`Old log files deletion report: ${JSON.stringify(a)}`),r.push("--tracing-level"),r.push(C()),R()&&r.push("--pii-logging"),r.push("--autoflush-log");let c=T();return c&&(r.push("--http-proxy-url"),r.push(c),_()&&r.push("--http-proxy-strict-ssl")),r},t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},t.verifyPlatform=function(){return"darwin"===s.platform()&&parseFloat(s.release())<16?Promise.resolve(!1):Promise.resolve(!0)},t.getErrorMessage=function(e,t=!1){let n;return e instanceof Error?n=e.message:e.responseText?(n=e.responseText,e.status&&(n+=` (${e.status})`)):n=JSON.stringify(e.toString()),t&&(n=x(n)),n},t.removeErrorHeader=x,t.isObjectExplorerContext=function(e){return"connectionProfile"in e&&"isConnectionNode"in e},t.getUserHome=function(){return process.env.HOME||process.env.USERPROFILE||""},t.isValidNumber=function(e){return null!=e&&""!==e&&!isNaN(Number(e.toString()))},t.logDebug=function(e){if(!0==!!i.workspace.getConfiguration(h).logDebugInfo){let t="["+(new Date).toLocaleTimeString()+"]: "+e?e.toString():0;console.log(t)}},t.exists=I;let O=!1;t.getOrDownloadServer=async function(e,t){try{const t=u.env.ADS_SQLTOOLSSERVICE;if(t){for(const n of e.executableFiles){const e=o.join(t,n);if(await I(e)){const r=`Using ${n} from ${t}`;return O||(O=!0,i.window.showInformationMessage(r)),console.log(r),e}}console.warn(`Could not find valid SQL Tools Service EXE from ${JSON.stringify(e.executableFiles)} at ${t}, falling back to config`)}}catch(e){console.warn("Unexpected error getting override path for SQL Tools Service client ",e)}const n=new l.ServerProvider(e);return t&&n.eventEmitter.onAny(t),n.getOrDownloadServer()}},9166:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},9072:e=>{"use strict";e.exports=require("azdata")},9496:e=>{"use strict";e.exports=require("vscode")},9491:e=>{"use strict";e.exports=require("assert")},852:e=>{"use strict";e.exports=require("async_hooks")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},6206:e=>{"use strict";e.exports=require("console")},2057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},8188:e=>{"use strict";e.exports=require("module")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},4074:e=>{"use strict";e.exports=require("perf_hooks")},7282:e=>{"use strict";e.exports=require("process")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},9512:e=>{"use strict";e.exports=require("timers")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.deactivate=e.activate=void 0;const t=n(9496),i=n(9072),o=n(1017),s=n(2037),a=n(8129),c=n(4817),l=n(8682),u=n(2236),d=n(2846),p=n(8742),h=n(4831),f=n(6469),m=n(3462),g=n(7147),y=n(5150),v=n(3403),b=n(860),S=n(200),w=n(7475),T=n(5760),_=n(149),E=v.loadMessageBundle(n(1017).join(__dirname,"main.ts"));async function C(){const e=E(2,null),n=E(3,null);return await t.window.showInformationMessage(e,n)===n&&(await t.commands.executeCommand("workbench.action.reloadWindow"),!0)}e.activate=async function(e){if(!await l.verifyPlatform()){const e=(0,T.unsupportedPlatform)(s.platform());throw t.window.showErrorMessage(e),new Error((0,T.unsupportedPlatform)(e))}await l.exists(e.logPath)||await g.promises.mkdir(e.logPath),y.IconPathHelper.setExtensionContext(e);let n=new u.AppContext(e),r=new d.MssqlIconProvider;i.dataprotocol.registerIconProvider(r),t.commands.registerCommand("mssql.searchServers",(()=>{t.window.showInputBox({placeHolder:E(4,null)}).then((e=>{e&&t.commands.executeCommand("registeredServers.searchServer",e)}))})),t.commands.registerCommand("mssql.clearSearchServerResult",(()=>{t.commands.executeCommand("registeredServers.clearSearchServerResult")})),e.subscriptions.push(new c.default),function(e){e.subscriptions.push(t.commands.registerCommand("mssql.showLogFile",(async()=>{const n=await t.window.showQuickPick(R);if(n){const r=await t.workspace.openTextDocument(t.Uri.file(o.join(e.logPath,n)));r&&t.window.showTextDocument(r)}})))}(e);const v=(0,p.getBookExtensionContributions)(e);e.subscriptions.push(v),(0,h.registerBooksWidget)(v);const x=new m.SqlToolsServer;return e.subscriptions.push(x),await x.start(n),e.subscriptions.push(t.commands.registerCommand("mssql.exportSqlAsNotebook",(async e=>{try{const r=await n.getService(a.NotebookConvertService).convertSqlToNotebook(e.toString());if(!r)throw new Error(T.noConvertResult);const o=function(){let e=0;for(;;){let t=`Notebook-${e}`;if(!(i.nb.notebookDocuments.findIndex((e=>e.isUntitled&&e.fileName===t))>-1))return t;e++}}(),s=t.Uri.parse(`untitled:${o}`);await i.nb.showNotebookDocument(s,{initialContent:r.content})}catch(e){t.window.showErrorMessage(E(0,null,e.toString()))}}))),e.subscriptions.push(t.commands.registerCommand("mssql.exportNotebookToSql",(async e=>{try{const r=t.workspace.textDocuments.find((t=>t.uri.toString()===e.toString()));if(!r)throw new Error((0,T.noDocumentFound)(e.toString()));const o=await n.getService(a.NotebookConvertService).convertNotebookToSql(r.getText());if(!o)throw new Error(T.noConvertResult);await i.queryeditor.openQueryDocument({content:o.content})}catch(e){t.window.showErrorMessage(E(1,null,e.toString()))}}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerEnableGroupBySchemaCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.EnableGroupBySchemaContextMenu),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!0,!0)}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerDisableGroupBySchemaCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.DisableGroupBySchemaContextMenu),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!1,!0)}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.EnableGroupByServerViewTitleAction),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!0,!0)}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerDisableGroupBySchemaTitleCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.DisableGroupByServerViewTitleAction),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!1,!0)}))),e.subscriptions.push(t.workspace.onDidChangeConfiguration((async e=>{if(e.affectsConfiguration(a.configObjectExplorerGroupBySchemaFlagName)){const e=t.workspace.getConfiguration().get(a.configObjectExplorerGroupBySchemaFlagName)?w.TelemetryActions.GroupBySchemaEnabled:w.TelemetryActions.GroupBySchemaDisabled;w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,e);const n=await i.objectexplorer.getActiveConnectionNodes(),r=await i.connection.getConnections();n.forEach((async e=>{const t=r.find((t=>t.connectionId===e.connectionId));t?.providerId===a.providerId&&await e.refresh()}))}if(e.affectsConfiguration(a.configParallelMessageProcessingName)&&(l.getParallelMessageProcessingConfig()&&w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlConnections,w.TelemetryActions.EnableFeatureAsyncParallelProcessing),await C()),l.getParallelMessageProcessingConfig()&&e.affectsConfiguration(a.configParallelMessageProcessingLimitName)){let e;e.parallelMessageProcessingLimit=l.getParallelMessageProcessingLimitConfig(),w.TelemetryReporter.sendMetricsEvent(e,a.configParallelMessageProcessingLimitName),await C()}e.affectsConfiguration(a.configEnableSqlAuthenticationProviderName)&&(l.getEnableSqlAuthenticationProviderConfig()&&w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlConnections,w.TelemetryActions.EnableFeatureSqlAuthenticationProvider),await C()),e.affectsConfiguration(a.configEnableConnectionPoolingName)&&(l.getEnableConnectionPoolingConfig()&&w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlConnections,w.TelemetryActions.EnableFeatureConnectionPooling),await C()),(e.affectsConfiguration(a.configHttpProxy)||e.affectsConfiguration(a.configHttpProxyStrictSSL))&&await C()}))),(0,b.registerTableDesignerCommands)(n),(0,S.registerObjectManagementCommands)(n),(0,_.registerConnectionCommands)(n),e.subscriptions.push(w.TelemetryReporter),(0,f.createMssqlApi)(n,x)};const R=["resourceprovider.log","sqltools.log","credentialstore.log"];e.deactivate=function(){}})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
//# sourceMappingURL=https://sqlopsbuilds.blob.core.windows.net/sourcemaps/b6f7beb01f92adaa4b79b6b6f3ac704e95cafe6e/extensions/mssql/dist/main.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit