github-issue-tower-defence-management 2.40.0 → 2.40.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/adapter/entry-points/console/ui-dist/assets/{index-CqVIONFD.js → index-IcsaovYL.js}
RENAMED
|
@@ -19,7 +19,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19
19
|
`+u),Se&&(u=Tt(u)),w&&je?te(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ct(e),Te=!0,Ee=L,De=R},t.clearConfig=function(){at=null,Te=!1,Ee=null,De=null,w=E,T=``},t.isValidAttribute=function(e,t,n){at||ct({});let r=it(e),i=it(t);return It(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Go(N,e)&&Mo(N[e],t)},t.removeHook=function(e,t){if(Go(N,e)){if(t!==void 0){let n=Ao(N[e],t);return n===-1?void 0:No(N[e],n,1)[0]}return jo(N[e])}},t.removeHooks=function(e){Go(N,e)&&(N[e]=[])},t.removeAllHooks=function(){N=Ns()},t}var Ls=Is(),Rs={100:`💯`,1234:`🔢`,grinning:`😀`,smiley:`😃`,smile:`😄`,grin:`😁`,laughing:`😆`,satisfied:`😆`,sweat_smile:`😅`,rofl:`🤣`,joy:`😂`,slightly_smiling_face:`🙂`,upside_down_face:`🙃`,melting_face:`🫠`,wink:`😉`,blush:`😊`,innocent:`😇`,smiling_face_with_three_hearts:`🥰`,heart_eyes:`😍`,star_struck:`🤩`,kissing_heart:`😘`,kissing:`😗`,relaxed:`☺️`,kissing_closed_eyes:`😚`,kissing_smiling_eyes:`😙`,smiling_face_with_tear:`🥲`,yum:`😋`,stuck_out_tongue:`😛`,stuck_out_tongue_winking_eye:`😜`,zany_face:`🤪`,stuck_out_tongue_closed_eyes:`😝`,money_mouth_face:`🤑`,hugs:`🤗`,hand_over_mouth:`🤭`,face_with_open_eyes_and_hand_over_mouth:`🫢`,face_with_peeking_eye:`🫣`,shushing_face:`🤫`,thinking:`🤔`,saluting_face:`🫡`,zipper_mouth_face:`🤐`,raised_eyebrow:`🤨`,neutral_face:`😐`,expressionless:`😑`,no_mouth:`😶`,dotted_line_face:`🫥`,face_in_clouds:`😶🌫️`,smirk:`😏`,unamused:`😒`,roll_eyes:`🙄`,grimacing:`😬`,face_exhaling:`😮💨`,lying_face:`🤥`,shaking_face:`🫨`,relieved:`😌`,pensive:`😔`,sleepy:`😪`,drooling_face:`🤤`,sleeping:`😴`,mask:`😷`,face_with_thermometer:`🤒`,face_with_head_bandage:`🤕`,nauseated_face:`🤢`,vomiting_face:`🤮`,sneezing_face:`🤧`,hot_face:`🥵`,cold_face:`🥶`,woozy_face:`🥴`,dizzy_face:`😵`,face_with_spiral_eyes:`😵💫`,exploding_head:`🤯`,cowboy_hat_face:`🤠`,partying_face:`🥳`,disguised_face:`🥸`,sunglasses:`😎`,nerd_face:`🤓`,monocle_face:`🧐`,confused:`😕`,face_with_diagonal_mouth:`🫤`,worried:`😟`,slightly_frowning_face:`🙁`,frowning_face:`☹️`,open_mouth:`😮`,hushed:`😯`,astonished:`😲`,flushed:`😳`,pleading_face:`🥺`,face_holding_back_tears:`🥹`,frowning:`😦`,anguished:`😧`,fearful:`😨`,cold_sweat:`😰`,disappointed_relieved:`😥`,cry:`😢`,sob:`😭`,scream:`😱`,confounded:`😖`,persevere:`😣`,disappointed:`😞`,sweat:`😓`,weary:`😩`,tired_face:`😫`,yawning_face:`🥱`,triumph:`😤`,rage:`😡`,pout:`😡`,angry:`😠`,cursing_face:`🤬`,smiling_imp:`😈`,imp:`👿`,skull:`💀`,skull_and_crossbones:`☠️`,hankey:`💩`,poop:`💩`,shit:`💩`,clown_face:`🤡`,japanese_ogre:`👹`,japanese_goblin:`👺`,ghost:`👻`,alien:`👽`,space_invader:`👾`,robot:`🤖`,smiley_cat:`😺`,smile_cat:`😸`,joy_cat:`😹`,heart_eyes_cat:`😻`,smirk_cat:`😼`,kissing_cat:`😽`,scream_cat:`🙀`,crying_cat_face:`😿`,pouting_cat:`😾`,see_no_evil:`🙈`,hear_no_evil:`🙉`,speak_no_evil:`🙊`,love_letter:`💌`,cupid:`💘`,gift_heart:`💝`,sparkling_heart:`💖`,heartpulse:`💗`,heartbeat:`💓`,revolving_hearts:`💞`,two_hearts:`💕`,heart_decoration:`💟`,heavy_heart_exclamation:`❣️`,broken_heart:`💔`,heart_on_fire:`❤️🔥`,mending_heart:`❤️🩹`,heart:`❤️`,pink_heart:`🩷`,orange_heart:`🧡`,yellow_heart:`💛`,green_heart:`💚`,blue_heart:`💙`,light_blue_heart:`🩵`,purple_heart:`💜`,brown_heart:`🤎`,black_heart:`🖤`,grey_heart:`🩶`,white_heart:`🤍`,kiss:`💋`,anger:`💢`,boom:`💥`,collision:`💥`,dizzy:`💫`,sweat_drops:`💦`,dash:`💨`,hole:`🕳️`,speech_balloon:`💬`,eye_speech_bubble:`👁️🗨️`,left_speech_bubble:`🗨️`,right_anger_bubble:`🗯️`,thought_balloon:`💭`,zzz:`💤`,wave:`👋`,raised_back_of_hand:`🤚`,raised_hand_with_fingers_splayed:`🖐️`,hand:`✋`,raised_hand:`✋`,vulcan_salute:`🖖`,rightwards_hand:`🫱`,leftwards_hand:`🫲`,palm_down_hand:`🫳`,palm_up_hand:`🫴`,leftwards_pushing_hand:`🫷`,rightwards_pushing_hand:`🫸`,ok_hand:`👌`,pinched_fingers:`🤌`,pinching_hand:`🤏`,v:`✌️`,crossed_fingers:`🤞`,hand_with_index_finger_and_thumb_crossed:`🫰`,love_you_gesture:`🤟`,metal:`🤘`,call_me_hand:`🤙`,point_left:`👈`,point_right:`👉`,point_up_2:`👆`,middle_finger:`🖕`,fu:`🖕`,point_down:`👇`,point_up:`☝️`,index_pointing_at_the_viewer:`🫵`,"+1":`👍`,thumbsup:`👍`,"-1":`👎`,thumbsdown:`👎`,fist_raised:`✊`,fist:`✊`,fist_oncoming:`👊`,facepunch:`👊`,punch:`👊`,fist_left:`🤛`,fist_right:`🤜`,clap:`👏`,raised_hands:`🙌`,heart_hands:`🫶`,open_hands:`👐`,palms_up_together:`🤲`,handshake:`🤝`,pray:`🙏`,writing_hand:`✍️`,nail_care:`💅`,selfie:`🤳`,muscle:`💪`,mechanical_arm:`🦾`,mechanical_leg:`🦿`,leg:`🦵`,foot:`🦶`,ear:`👂`,ear_with_hearing_aid:`🦻`,nose:`👃`,brain:`🧠`,anatomical_heart:`🫀`,lungs:`🫁`,tooth:`🦷`,bone:`🦴`,eyes:`👀`,eye:`👁️`,tongue:`👅`,lips:`👄`,biting_lip:`🫦`,baby:`👶`,child:`🧒`,boy:`👦`,girl:`👧`,adult:`🧑`,blond_haired_person:`👱`,man:`👨`,bearded_person:`🧔`,man_beard:`🧔♂️`,woman_beard:`🧔♀️`,red_haired_man:`👨🦰`,curly_haired_man:`👨🦱`,white_haired_man:`👨🦳`,bald_man:`👨🦲`,woman:`👩`,red_haired_woman:`👩🦰`,person_red_hair:`🧑🦰`,curly_haired_woman:`👩🦱`,person_curly_hair:`🧑🦱`,white_haired_woman:`👩🦳`,person_white_hair:`🧑🦳`,bald_woman:`👩🦲`,person_bald:`🧑🦲`,blond_haired_woman:`👱♀️`,blonde_woman:`👱♀️`,blond_haired_man:`👱♂️`,older_adult:`🧓`,older_man:`👴`,older_woman:`👵`,frowning_person:`🙍`,frowning_man:`🙍♂️`,frowning_woman:`🙍♀️`,pouting_face:`🙎`,pouting_man:`🙎♂️`,pouting_woman:`🙎♀️`,no_good:`🙅`,no_good_man:`🙅♂️`,ng_man:`🙅♂️`,no_good_woman:`🙅♀️`,ng_woman:`🙅♀️`,ok_person:`🙆`,ok_man:`🙆♂️`,ok_woman:`🙆♀️`,tipping_hand_person:`💁`,information_desk_person:`💁`,tipping_hand_man:`💁♂️`,sassy_man:`💁♂️`,tipping_hand_woman:`💁♀️`,sassy_woman:`💁♀️`,raising_hand:`🙋`,raising_hand_man:`🙋♂️`,raising_hand_woman:`🙋♀️`,deaf_person:`🧏`,deaf_man:`🧏♂️`,deaf_woman:`🧏♀️`,bow:`🙇`,bowing_man:`🙇♂️`,bowing_woman:`🙇♀️`,facepalm:`🤦`,man_facepalming:`🤦♂️`,woman_facepalming:`🤦♀️`,shrug:`🤷`,man_shrugging:`🤷♂️`,woman_shrugging:`🤷♀️`,health_worker:`🧑⚕️`,man_health_worker:`👨⚕️`,woman_health_worker:`👩⚕️`,student:`🧑🎓`,man_student:`👨🎓`,woman_student:`👩🎓`,teacher:`🧑🏫`,man_teacher:`👨🏫`,woman_teacher:`👩🏫`,judge:`🧑⚖️`,man_judge:`👨⚖️`,woman_judge:`👩⚖️`,farmer:`🧑🌾`,man_farmer:`👨🌾`,woman_farmer:`👩🌾`,cook:`🧑🍳`,man_cook:`👨🍳`,woman_cook:`👩🍳`,mechanic:`🧑🔧`,man_mechanic:`👨🔧`,woman_mechanic:`👩🔧`,factory_worker:`🧑🏭`,man_factory_worker:`👨🏭`,woman_factory_worker:`👩🏭`,office_worker:`🧑💼`,man_office_worker:`👨💼`,woman_office_worker:`👩💼`,scientist:`🧑🔬`,man_scientist:`👨🔬`,woman_scientist:`👩🔬`,technologist:`🧑💻`,man_technologist:`👨💻`,woman_technologist:`👩💻`,singer:`🧑🎤`,man_singer:`👨🎤`,woman_singer:`👩🎤`,artist:`🧑🎨`,man_artist:`👨🎨`,woman_artist:`👩🎨`,pilot:`🧑✈️`,man_pilot:`👨✈️`,woman_pilot:`👩✈️`,astronaut:`🧑🚀`,man_astronaut:`👨🚀`,woman_astronaut:`👩🚀`,firefighter:`🧑🚒`,man_firefighter:`👨🚒`,woman_firefighter:`👩🚒`,police_officer:`👮`,cop:`👮`,policeman:`👮♂️`,policewoman:`👮♀️`,detective:`🕵️`,male_detective:`🕵️♂️`,female_detective:`🕵️♀️`,guard:`💂`,guardsman:`💂♂️`,guardswoman:`💂♀️`,ninja:`🥷`,construction_worker:`👷`,construction_worker_man:`👷♂️`,construction_worker_woman:`👷♀️`,person_with_crown:`🫅`,prince:`🤴`,princess:`👸`,person_with_turban:`👳`,man_with_turban:`👳♂️`,woman_with_turban:`👳♀️`,man_with_gua_pi_mao:`👲`,woman_with_headscarf:`🧕`,person_in_tuxedo:`🤵`,man_in_tuxedo:`🤵♂️`,woman_in_tuxedo:`🤵♀️`,person_with_veil:`👰`,man_with_veil:`👰♂️`,woman_with_veil:`👰♀️`,bride_with_veil:`👰♀️`,pregnant_woman:`🤰`,pregnant_man:`🫃`,pregnant_person:`🫄`,breast_feeding:`🤱`,woman_feeding_baby:`👩🍼`,man_feeding_baby:`👨🍼`,person_feeding_baby:`🧑🍼`,angel:`👼`,santa:`🎅`,mrs_claus:`🤶`,mx_claus:`🧑🎄`,superhero:`🦸`,superhero_man:`🦸♂️`,superhero_woman:`🦸♀️`,supervillain:`🦹`,supervillain_man:`🦹♂️`,supervillain_woman:`🦹♀️`,mage:`🧙`,mage_man:`🧙♂️`,mage_woman:`🧙♀️`,fairy:`🧚`,fairy_man:`🧚♂️`,fairy_woman:`🧚♀️`,vampire:`🧛`,vampire_man:`🧛♂️`,vampire_woman:`🧛♀️`,merperson:`🧜`,merman:`🧜♂️`,mermaid:`🧜♀️`,elf:`🧝`,elf_man:`🧝♂️`,elf_woman:`🧝♀️`,genie:`🧞`,genie_man:`🧞♂️`,genie_woman:`🧞♀️`,zombie:`🧟`,zombie_man:`🧟♂️`,zombie_woman:`🧟♀️`,troll:`🧌`,massage:`💆`,massage_man:`💆♂️`,massage_woman:`💆♀️`,haircut:`💇`,haircut_man:`💇♂️`,haircut_woman:`💇♀️`,walking:`🚶`,walking_man:`🚶♂️`,walking_woman:`🚶♀️`,standing_person:`🧍`,standing_man:`🧍♂️`,standing_woman:`🧍♀️`,kneeling_person:`🧎`,kneeling_man:`🧎♂️`,kneeling_woman:`🧎♀️`,person_with_probing_cane:`🧑🦯`,man_with_probing_cane:`👨🦯`,woman_with_probing_cane:`👩🦯`,person_in_motorized_wheelchair:`🧑🦼`,man_in_motorized_wheelchair:`👨🦼`,woman_in_motorized_wheelchair:`👩🦼`,person_in_manual_wheelchair:`🧑🦽`,man_in_manual_wheelchair:`👨🦽`,woman_in_manual_wheelchair:`👩🦽`,runner:`🏃`,running:`🏃`,running_man:`🏃♂️`,running_woman:`🏃♀️`,woman_dancing:`💃`,dancer:`💃`,man_dancing:`🕺`,business_suit_levitating:`🕴️`,dancers:`👯`,dancing_men:`👯♂️`,dancing_women:`👯♀️`,sauna_person:`🧖`,sauna_man:`🧖♂️`,sauna_woman:`🧖♀️`,climbing:`🧗`,climbing_man:`🧗♂️`,climbing_woman:`🧗♀️`,person_fencing:`🤺`,horse_racing:`🏇`,skier:`⛷️`,snowboarder:`🏂`,golfing:`🏌️`,golfing_man:`🏌️♂️`,golfing_woman:`🏌️♀️`,surfer:`🏄`,surfing_man:`🏄♂️`,surfing_woman:`🏄♀️`,rowboat:`🚣`,rowing_man:`🚣♂️`,rowing_woman:`🚣♀️`,swimmer:`🏊`,swimming_man:`🏊♂️`,swimming_woman:`🏊♀️`,bouncing_ball_person:`⛹️`,bouncing_ball_man:`⛹️♂️`,basketball_man:`⛹️♂️`,bouncing_ball_woman:`⛹️♀️`,basketball_woman:`⛹️♀️`,weight_lifting:`🏋️`,weight_lifting_man:`🏋️♂️`,weight_lifting_woman:`🏋️♀️`,bicyclist:`🚴`,biking_man:`🚴♂️`,biking_woman:`🚴♀️`,mountain_bicyclist:`🚵`,mountain_biking_man:`🚵♂️`,mountain_biking_woman:`🚵♀️`,cartwheeling:`🤸`,man_cartwheeling:`🤸♂️`,woman_cartwheeling:`🤸♀️`,wrestling:`🤼`,men_wrestling:`🤼♂️`,women_wrestling:`🤼♀️`,water_polo:`🤽`,man_playing_water_polo:`🤽♂️`,woman_playing_water_polo:`🤽♀️`,handball_person:`🤾`,man_playing_handball:`🤾♂️`,woman_playing_handball:`🤾♀️`,juggling_person:`🤹`,man_juggling:`🤹♂️`,woman_juggling:`🤹♀️`,lotus_position:`🧘`,lotus_position_man:`🧘♂️`,lotus_position_woman:`🧘♀️`,bath:`🛀`,sleeping_bed:`🛌`,people_holding_hands:`🧑🤝🧑`,two_women_holding_hands:`👭`,couple:`👫`,two_men_holding_hands:`👬`,couplekiss:`💏`,couplekiss_man_woman:`👩❤️💋👨`,couplekiss_man_man:`👨❤️💋👨`,couplekiss_woman_woman:`👩❤️💋👩`,couple_with_heart:`💑`,couple_with_heart_woman_man:`👩❤️👨`,couple_with_heart_man_man:`👨❤️👨`,couple_with_heart_woman_woman:`👩❤️👩`,family:`👪`,family_man_woman_boy:`👨👩👦`,family_man_woman_girl:`👨👩👧`,family_man_woman_girl_boy:`👨👩👧👦`,family_man_woman_boy_boy:`👨👩👦👦`,family_man_woman_girl_girl:`👨👩👧👧`,family_man_man_boy:`👨👨👦`,family_man_man_girl:`👨👨👧`,family_man_man_girl_boy:`👨👨👧👦`,family_man_man_boy_boy:`👨👨👦👦`,family_man_man_girl_girl:`👨👨👧👧`,family_woman_woman_boy:`👩👩👦`,family_woman_woman_girl:`👩👩👧`,family_woman_woman_girl_boy:`👩👩👧👦`,family_woman_woman_boy_boy:`👩👩👦👦`,family_woman_woman_girl_girl:`👩👩👧👧`,family_man_boy:`👨👦`,family_man_boy_boy:`👨👦👦`,family_man_girl:`👨👧`,family_man_girl_boy:`👨👧👦`,family_man_girl_girl:`👨👧👧`,family_woman_boy:`👩👦`,family_woman_boy_boy:`👩👦👦`,family_woman_girl:`👩👧`,family_woman_girl_boy:`👩👧👦`,family_woman_girl_girl:`👩👧👧`,speaking_head:`🗣️`,bust_in_silhouette:`👤`,busts_in_silhouette:`👥`,people_hugging:`🫂`,footprints:`👣`,monkey_face:`🐵`,monkey:`🐒`,gorilla:`🦍`,orangutan:`🦧`,dog:`🐶`,dog2:`🐕`,guide_dog:`🦮`,service_dog:`🐕🦺`,poodle:`🐩`,wolf:`🐺`,fox_face:`🦊`,raccoon:`🦝`,cat:`🐱`,cat2:`🐈`,black_cat:`🐈⬛`,lion:`🦁`,tiger:`🐯`,tiger2:`🐅`,leopard:`🐆`,horse:`🐴`,moose:`🫎`,donkey:`🫏`,racehorse:`🐎`,unicorn:`🦄`,zebra:`🦓`,deer:`🦌`,bison:`🦬`,cow:`🐮`,ox:`🐂`,water_buffalo:`🐃`,cow2:`🐄`,pig:`🐷`,pig2:`🐖`,boar:`🐗`,pig_nose:`🐽`,ram:`🐏`,sheep:`🐑`,goat:`🐐`,dromedary_camel:`🐪`,camel:`🐫`,llama:`🦙`,giraffe:`🦒`,elephant:`🐘`,mammoth:`🦣`,rhinoceros:`🦏`,hippopotamus:`🦛`,mouse:`🐭`,mouse2:`🐁`,rat:`🐀`,hamster:`🐹`,rabbit:`🐰`,rabbit2:`🐇`,chipmunk:`🐿️`,beaver:`🦫`,hedgehog:`🦔`,bat:`🦇`,bear:`🐻`,polar_bear:`🐻❄️`,koala:`🐨`,panda_face:`🐼`,sloth:`🦥`,otter:`🦦`,skunk:`🦨`,kangaroo:`🦘`,badger:`🦡`,feet:`🐾`,paw_prints:`🐾`,turkey:`🦃`,chicken:`🐔`,rooster:`🐓`,hatching_chick:`🐣`,baby_chick:`🐤`,hatched_chick:`🐥`,bird:`🐦`,penguin:`🐧`,dove:`🕊️`,eagle:`🦅`,duck:`🦆`,swan:`🦢`,owl:`🦉`,dodo:`🦤`,feather:`🪶`,flamingo:`🦩`,peacock:`🦚`,parrot:`🦜`,wing:`🪽`,black_bird:`🐦⬛`,goose:`🪿`,frog:`🐸`,crocodile:`🐊`,turtle:`🐢`,lizard:`🦎`,snake:`🐍`,dragon_face:`🐲`,dragon:`🐉`,sauropod:`🦕`,"t-rex":`🦖`,whale:`🐳`,whale2:`🐋`,dolphin:`🐬`,flipper:`🐬`,seal:`🦭`,fish:`🐟`,tropical_fish:`🐠`,blowfish:`🐡`,shark:`🦈`,octopus:`🐙`,shell:`🐚`,coral:`🪸`,jellyfish:`🪼`,snail:`🐌`,butterfly:`🦋`,bug:`🐛`,ant:`🐜`,bee:`🐝`,honeybee:`🐝`,beetle:`🪲`,lady_beetle:`🐞`,cricket:`🦗`,cockroach:`🪳`,spider:`🕷️`,spider_web:`🕸️`,scorpion:`🦂`,mosquito:`🦟`,fly:`🪰`,worm:`🪱`,microbe:`🦠`,bouquet:`💐`,cherry_blossom:`🌸`,white_flower:`💮`,lotus:`🪷`,rosette:`🏵️`,rose:`🌹`,wilted_flower:`🥀`,hibiscus:`🌺`,sunflower:`🌻`,blossom:`🌼`,tulip:`🌷`,hyacinth:`🪻`,seedling:`🌱`,potted_plant:`🪴`,evergreen_tree:`🌲`,deciduous_tree:`🌳`,palm_tree:`🌴`,cactus:`🌵`,ear_of_rice:`🌾`,herb:`🌿`,shamrock:`☘️`,four_leaf_clover:`🍀`,maple_leaf:`🍁`,fallen_leaf:`🍂`,leaves:`🍃`,empty_nest:`🪹`,nest_with_eggs:`🪺`,mushroom:`🍄`,grapes:`🍇`,melon:`🍈`,watermelon:`🍉`,tangerine:`🍊`,orange:`🍊`,mandarin:`🍊`,lemon:`🍋`,banana:`🍌`,pineapple:`🍍`,mango:`🥭`,apple:`🍎`,green_apple:`🍏`,pear:`🍐`,peach:`🍑`,cherries:`🍒`,strawberry:`🍓`,blueberries:`🫐`,kiwi_fruit:`🥝`,tomato:`🍅`,olive:`🫒`,coconut:`🥥`,avocado:`🥑`,eggplant:`🍆`,potato:`🥔`,carrot:`🥕`,corn:`🌽`,hot_pepper:`🌶️`,bell_pepper:`🫑`,cucumber:`🥒`,leafy_green:`🥬`,broccoli:`🥦`,garlic:`🧄`,onion:`🧅`,peanuts:`🥜`,beans:`🫘`,chestnut:`🌰`,ginger_root:`🫚`,pea_pod:`🫛`,bread:`🍞`,croissant:`🥐`,baguette_bread:`🥖`,flatbread:`🫓`,pretzel:`🥨`,bagel:`🥯`,pancakes:`🥞`,waffle:`🧇`,cheese:`🧀`,meat_on_bone:`🍖`,poultry_leg:`🍗`,cut_of_meat:`🥩`,bacon:`🥓`,hamburger:`🍔`,fries:`🍟`,pizza:`🍕`,hotdog:`🌭`,sandwich:`🥪`,taco:`🌮`,burrito:`🌯`,tamale:`🫔`,stuffed_flatbread:`🥙`,falafel:`🧆`,egg:`🥚`,fried_egg:`🍳`,shallow_pan_of_food:`🥘`,stew:`🍲`,fondue:`🫕`,bowl_with_spoon:`🥣`,green_salad:`🥗`,popcorn:`🍿`,butter:`🧈`,salt:`🧂`,canned_food:`🥫`,bento:`🍱`,rice_cracker:`🍘`,rice_ball:`🍙`,rice:`🍚`,curry:`🍛`,ramen:`🍜`,spaghetti:`🍝`,sweet_potato:`🍠`,oden:`🍢`,sushi:`🍣`,fried_shrimp:`🍤`,fish_cake:`🍥`,moon_cake:`🥮`,dango:`🍡`,dumpling:`🥟`,fortune_cookie:`🥠`,takeout_box:`🥡`,crab:`🦀`,lobster:`🦞`,shrimp:`🦐`,squid:`🦑`,oyster:`🦪`,icecream:`🍦`,shaved_ice:`🍧`,ice_cream:`🍨`,doughnut:`🍩`,cookie:`🍪`,birthday:`🎂`,cake:`🍰`,cupcake:`🧁`,pie:`🥧`,chocolate_bar:`🍫`,candy:`🍬`,lollipop:`🍭`,custard:`🍮`,honey_pot:`🍯`,baby_bottle:`🍼`,milk_glass:`🥛`,coffee:`☕`,teapot:`🫖`,tea:`🍵`,sake:`🍶`,champagne:`🍾`,wine_glass:`🍷`,cocktail:`🍸`,tropical_drink:`🍹`,beer:`🍺`,beers:`🍻`,clinking_glasses:`🥂`,tumbler_glass:`🥃`,pouring_liquid:`🫗`,cup_with_straw:`🥤`,bubble_tea:`🧋`,beverage_box:`🧃`,mate:`🧉`,ice_cube:`🧊`,chopsticks:`🥢`,plate_with_cutlery:`🍽️`,fork_and_knife:`🍴`,spoon:`🥄`,hocho:`🔪`,knife:`🔪`,jar:`🫙`,amphora:`🏺`,earth_africa:`🌍`,earth_americas:`🌎`,earth_asia:`🌏`,globe_with_meridians:`🌐`,world_map:`🗺️`,japan:`🗾`,compass:`🧭`,mountain_snow:`🏔️`,mountain:`⛰️`,volcano:`🌋`,mount_fuji:`🗻`,camping:`🏕️`,beach_umbrella:`🏖️`,desert:`🏜️`,desert_island:`🏝️`,national_park:`🏞️`,stadium:`🏟️`,classical_building:`🏛️`,building_construction:`🏗️`,bricks:`🧱`,rock:`🪨`,wood:`🪵`,hut:`🛖`,houses:`🏘️`,derelict_house:`🏚️`,house:`🏠`,house_with_garden:`🏡`,office:`🏢`,post_office:`🏣`,european_post_office:`🏤`,hospital:`🏥`,bank:`🏦`,hotel:`🏨`,love_hotel:`🏩`,convenience_store:`🏪`,school:`🏫`,department_store:`🏬`,factory:`🏭`,japanese_castle:`🏯`,european_castle:`🏰`,wedding:`💒`,tokyo_tower:`🗼`,statue_of_liberty:`🗽`,church:`⛪`,mosque:`🕌`,hindu_temple:`🛕`,synagogue:`🕍`,shinto_shrine:`⛩️`,kaaba:`🕋`,fountain:`⛲`,tent:`⛺`,foggy:`🌁`,night_with_stars:`🌃`,cityscape:`🏙️`,sunrise_over_mountains:`🌄`,sunrise:`🌅`,city_sunset:`🌆`,city_sunrise:`🌇`,bridge_at_night:`🌉`,hotsprings:`♨️`,carousel_horse:`🎠`,playground_slide:`🛝`,ferris_wheel:`🎡`,roller_coaster:`🎢`,barber:`💈`,circus_tent:`🎪`,steam_locomotive:`🚂`,railway_car:`🚃`,bullettrain_side:`🚄`,bullettrain_front:`🚅`,train2:`🚆`,metro:`🚇`,light_rail:`🚈`,station:`🚉`,tram:`🚊`,monorail:`🚝`,mountain_railway:`🚞`,train:`🚋`,bus:`🚌`,oncoming_bus:`🚍`,trolleybus:`🚎`,minibus:`🚐`,ambulance:`🚑`,fire_engine:`🚒`,police_car:`🚓`,oncoming_police_car:`🚔`,taxi:`🚕`,oncoming_taxi:`🚖`,car:`🚗`,red_car:`🚗`,oncoming_automobile:`🚘`,blue_car:`🚙`,pickup_truck:`🛻`,truck:`🚚`,articulated_lorry:`🚛`,tractor:`🚜`,racing_car:`🏎️`,motorcycle:`🏍️`,motor_scooter:`🛵`,manual_wheelchair:`🦽`,motorized_wheelchair:`🦼`,auto_rickshaw:`🛺`,bike:`🚲`,kick_scooter:`🛴`,skateboard:`🛹`,roller_skate:`🛼`,busstop:`🚏`,motorway:`🛣️`,railway_track:`🛤️`,oil_drum:`🛢️`,fuelpump:`⛽`,wheel:`🛞`,rotating_light:`🚨`,traffic_light:`🚥`,vertical_traffic_light:`🚦`,stop_sign:`🛑`,construction:`🚧`,anchor:`⚓`,ring_buoy:`🛟`,boat:`⛵`,sailboat:`⛵`,canoe:`🛶`,speedboat:`🚤`,passenger_ship:`🛳️`,ferry:`⛴️`,motor_boat:`🛥️`,ship:`🚢`,airplane:`✈️`,small_airplane:`🛩️`,flight_departure:`🛫`,flight_arrival:`🛬`,parachute:`🪂`,seat:`💺`,helicopter:`🚁`,suspension_railway:`🚟`,mountain_cableway:`🚠`,aerial_tramway:`🚡`,artificial_satellite:`🛰️`,rocket:`🚀`,flying_saucer:`🛸`,bellhop_bell:`🛎️`,luggage:`🧳`,hourglass:`⌛`,hourglass_flowing_sand:`⏳`,watch:`⌚`,alarm_clock:`⏰`,stopwatch:`⏱️`,timer_clock:`⏲️`,mantelpiece_clock:`🕰️`,clock12:`🕛`,clock1230:`🕧`,clock1:`🕐`,clock130:`🕜`,clock2:`🕑`,clock230:`🕝`,clock3:`🕒`,clock330:`🕞`,clock4:`🕓`,clock430:`🕟`,clock5:`🕔`,clock530:`🕠`,clock6:`🕕`,clock630:`🕡`,clock7:`🕖`,clock730:`🕢`,clock8:`🕗`,clock830:`🕣`,clock9:`🕘`,clock930:`🕤`,clock10:`🕙`,clock1030:`🕥`,clock11:`🕚`,clock1130:`🕦`,new_moon:`🌑`,waxing_crescent_moon:`🌒`,first_quarter_moon:`🌓`,moon:`🌔`,waxing_gibbous_moon:`🌔`,full_moon:`🌕`,waning_gibbous_moon:`🌖`,last_quarter_moon:`🌗`,waning_crescent_moon:`🌘`,crescent_moon:`🌙`,new_moon_with_face:`🌚`,first_quarter_moon_with_face:`🌛`,last_quarter_moon_with_face:`🌜`,thermometer:`🌡️`,sunny:`☀️`,full_moon_with_face:`🌝`,sun_with_face:`🌞`,ringed_planet:`🪐`,star:`⭐`,star2:`🌟`,stars:`🌠`,milky_way:`🌌`,cloud:`☁️`,partly_sunny:`⛅`,cloud_with_lightning_and_rain:`⛈️`,sun_behind_small_cloud:`🌤️`,sun_behind_large_cloud:`🌥️`,sun_behind_rain_cloud:`🌦️`,cloud_with_rain:`🌧️`,cloud_with_snow:`🌨️`,cloud_with_lightning:`🌩️`,tornado:`🌪️`,fog:`🌫️`,wind_face:`🌬️`,cyclone:`🌀`,rainbow:`🌈`,closed_umbrella:`🌂`,open_umbrella:`☂️`,umbrella:`☔`,parasol_on_ground:`⛱️`,zap:`⚡`,snowflake:`❄️`,snowman_with_snow:`☃️`,snowman:`⛄`,comet:`☄️`,fire:`🔥`,droplet:`💧`,ocean:`🌊`,jack_o_lantern:`🎃`,christmas_tree:`🎄`,fireworks:`🎆`,sparkler:`🎇`,firecracker:`🧨`,sparkles:`✨`,balloon:`🎈`,tada:`🎉`,confetti_ball:`🎊`,tanabata_tree:`🎋`,bamboo:`🎍`,dolls:`🎎`,flags:`🎏`,wind_chime:`🎐`,rice_scene:`🎑`,red_envelope:`🧧`,ribbon:`🎀`,gift:`🎁`,reminder_ribbon:`🎗️`,tickets:`🎟️`,ticket:`🎫`,medal_military:`🎖️`,trophy:`🏆`,medal_sports:`🏅`,"1st_place_medal":`🥇`,"2nd_place_medal":`🥈`,"3rd_place_medal":`🥉`,soccer:`⚽`,baseball:`⚾`,softball:`🥎`,basketball:`🏀`,volleyball:`🏐`,football:`🏈`,rugby_football:`🏉`,tennis:`🎾`,flying_disc:`🥏`,bowling:`🎳`,cricket_game:`🏏`,field_hockey:`🏑`,ice_hockey:`🏒`,lacrosse:`🥍`,ping_pong:`🏓`,badminton:`🏸`,boxing_glove:`🥊`,martial_arts_uniform:`🥋`,goal_net:`🥅`,golf:`⛳`,ice_skate:`⛸️`,fishing_pole_and_fish:`🎣`,diving_mask:`🤿`,running_shirt_with_sash:`🎽`,ski:`🎿`,sled:`🛷`,curling_stone:`🥌`,dart:`🎯`,yo_yo:`🪀`,kite:`🪁`,gun:`🔫`,"8ball":`🎱`,crystal_ball:`🔮`,magic_wand:`🪄`,video_game:`🎮`,joystick:`🕹️`,slot_machine:`🎰`,game_die:`🎲`,jigsaw:`🧩`,teddy_bear:`🧸`,pinata:`🪅`,mirror_ball:`🪩`,nesting_dolls:`🪆`,spades:`♠️`,hearts:`♥️`,diamonds:`♦️`,clubs:`♣️`,chess_pawn:`♟️`,black_joker:`🃏`,mahjong:`🀄`,flower_playing_cards:`🎴`,performing_arts:`🎭`,framed_picture:`🖼️`,art:`🎨`,thread:`🧵`,sewing_needle:`🪡`,yarn:`🧶`,knot:`🪢`,eyeglasses:`👓`,dark_sunglasses:`🕶️`,goggles:`🥽`,lab_coat:`🥼`,safety_vest:`🦺`,necktie:`👔`,shirt:`👕`,tshirt:`👕`,jeans:`👖`,scarf:`🧣`,gloves:`🧤`,coat:`🧥`,socks:`🧦`,dress:`👗`,kimono:`👘`,sari:`🥻`,one_piece_swimsuit:`🩱`,swim_brief:`🩲`,shorts:`🩳`,bikini:`👙`,womans_clothes:`👚`,folding_hand_fan:`🪭`,purse:`👛`,handbag:`👜`,pouch:`👝`,shopping:`🛍️`,school_satchel:`🎒`,thong_sandal:`🩴`,mans_shoe:`👞`,shoe:`👞`,athletic_shoe:`👟`,hiking_boot:`🥾`,flat_shoe:`🥿`,high_heel:`👠`,sandal:`👡`,ballet_shoes:`🩰`,boot:`👢`,hair_pick:`🪮`,crown:`👑`,womans_hat:`👒`,tophat:`🎩`,mortar_board:`🎓`,billed_cap:`🧢`,military_helmet:`🪖`,rescue_worker_helmet:`⛑️`,prayer_beads:`📿`,lipstick:`💄`,ring:`💍`,gem:`💎`,mute:`🔇`,speaker:`🔈`,sound:`🔉`,loud_sound:`🔊`,loudspeaker:`📢`,mega:`📣`,postal_horn:`📯`,bell:`🔔`,no_bell:`🔕`,musical_score:`🎼`,musical_note:`🎵`,notes:`🎶`,studio_microphone:`🎙️`,level_slider:`🎚️`,control_knobs:`🎛️`,microphone:`🎤`,headphones:`🎧`,radio:`📻`,saxophone:`🎷`,accordion:`🪗`,guitar:`🎸`,musical_keyboard:`🎹`,trumpet:`🎺`,violin:`🎻`,banjo:`🪕`,drum:`🥁`,long_drum:`🪘`,maracas:`🪇`,flute:`🪈`,iphone:`📱`,calling:`📲`,phone:`☎️`,telephone:`☎️`,telephone_receiver:`📞`,pager:`📟`,fax:`📠`,battery:`🔋`,low_battery:`🪫`,electric_plug:`🔌`,computer:`💻`,desktop_computer:`🖥️`,printer:`🖨️`,keyboard:`⌨️`,computer_mouse:`🖱️`,trackball:`🖲️`,minidisc:`💽`,floppy_disk:`💾`,cd:`💿`,dvd:`📀`,abacus:`🧮`,movie_camera:`🎥`,film_strip:`🎞️`,film_projector:`📽️`,clapper:`🎬`,tv:`📺`,camera:`📷`,camera_flash:`📸`,video_camera:`📹`,vhs:`📼`,mag:`🔍`,mag_right:`🔎`,candle:`🕯️`,bulb:`💡`,flashlight:`🔦`,izakaya_lantern:`🏮`,lantern:`🏮`,diya_lamp:`🪔`,notebook_with_decorative_cover:`📔`,closed_book:`📕`,book:`📖`,open_book:`📖`,green_book:`📗`,blue_book:`📘`,orange_book:`📙`,books:`📚`,notebook:`📓`,ledger:`📒`,page_with_curl:`📃`,scroll:`📜`,page_facing_up:`📄`,newspaper:`📰`,newspaper_roll:`🗞️`,bookmark_tabs:`📑`,bookmark:`🔖`,label:`🏷️`,moneybag:`💰`,coin:`🪙`,yen:`💴`,dollar:`💵`,euro:`💶`,pound:`💷`,money_with_wings:`💸`,credit_card:`💳`,receipt:`🧾`,chart:`💹`,envelope:`✉️`,email:`📧`,"e-mail":`📧`,incoming_envelope:`📨`,envelope_with_arrow:`📩`,outbox_tray:`📤`,inbox_tray:`📥`,package:`📦`,mailbox:`📫`,mailbox_closed:`📪`,mailbox_with_mail:`📬`,mailbox_with_no_mail:`📭`,postbox:`📮`,ballot_box:`🗳️`,pencil2:`✏️`,black_nib:`✒️`,fountain_pen:`🖋️`,pen:`🖊️`,paintbrush:`🖌️`,crayon:`🖍️`,memo:`📝`,pencil:`📝`,briefcase:`💼`,file_folder:`📁`,open_file_folder:`📂`,card_index_dividers:`🗂️`,date:`📅`,calendar:`📆`,spiral_notepad:`🗒️`,spiral_calendar:`🗓️`,card_index:`📇`,chart_with_upwards_trend:`📈`,chart_with_downwards_trend:`📉`,bar_chart:`📊`,clipboard:`📋`,pushpin:`📌`,round_pushpin:`📍`,paperclip:`📎`,paperclips:`🖇️`,straight_ruler:`📏`,triangular_ruler:`📐`,scissors:`✂️`,card_file_box:`🗃️`,file_cabinet:`🗄️`,wastebasket:`🗑️`,lock:`🔒`,unlock:`🔓`,lock_with_ink_pen:`🔏`,closed_lock_with_key:`🔐`,key:`🔑`,old_key:`🗝️`,hammer:`🔨`,axe:`🪓`,pick:`⛏️`,hammer_and_pick:`⚒️`,hammer_and_wrench:`🛠️`,dagger:`🗡️`,crossed_swords:`⚔️`,bomb:`💣`,boomerang:`🪃`,bow_and_arrow:`🏹`,shield:`🛡️`,carpentry_saw:`🪚`,wrench:`🔧`,screwdriver:`🪛`,nut_and_bolt:`🔩`,gear:`⚙️`,clamp:`🗜️`,balance_scale:`⚖️`,probing_cane:`🦯`,link:`🔗`,chains:`⛓️`,hook:`🪝`,toolbox:`🧰`,magnet:`🧲`,ladder:`🪜`,alembic:`⚗️`,test_tube:`🧪`,petri_dish:`🧫`,dna:`🧬`,microscope:`🔬`,telescope:`🔭`,satellite:`📡`,syringe:`💉`,drop_of_blood:`🩸`,pill:`💊`,adhesive_bandage:`🩹`,crutch:`🩼`,stethoscope:`🩺`,x_ray:`🩻`,door:`🚪`,elevator:`🛗`,mirror:`🪞`,window:`🪟`,bed:`🛏️`,couch_and_lamp:`🛋️`,chair:`🪑`,toilet:`🚽`,plunger:`🪠`,shower:`🚿`,bathtub:`🛁`,mouse_trap:`🪤`,razor:`🪒`,lotion_bottle:`🧴`,safety_pin:`🧷`,broom:`🧹`,basket:`🧺`,roll_of_paper:`🧻`,bucket:`🪣`,soap:`🧼`,bubbles:`🫧`,toothbrush:`🪥`,sponge:`🧽`,fire_extinguisher:`🧯`,shopping_cart:`🛒`,smoking:`🚬`,coffin:`⚰️`,headstone:`🪦`,funeral_urn:`⚱️`,nazar_amulet:`🧿`,hamsa:`🪬`,moyai:`🗿`,placard:`🪧`,identification_card:`🪪`,atm:`🏧`,put_litter_in_its_place:`🚮`,potable_water:`🚰`,wheelchair:`♿`,mens:`🚹`,womens:`🚺`,restroom:`🚻`,baby_symbol:`🚼`,wc:`🚾`,passport_control:`🛂`,customs:`🛃`,baggage_claim:`🛄`,left_luggage:`🛅`,warning:`⚠️`,children_crossing:`🚸`,no_entry:`⛔`,no_entry_sign:`🚫`,no_bicycles:`🚳`,no_smoking:`🚭`,do_not_litter:`🚯`,"non-potable_water":`🚱`,no_pedestrians:`🚷`,no_mobile_phones:`📵`,underage:`🔞`,radioactive:`☢️`,biohazard:`☣️`,arrow_up:`⬆️`,arrow_upper_right:`↗️`,arrow_right:`➡️`,arrow_lower_right:`↘️`,arrow_down:`⬇️`,arrow_lower_left:`↙️`,arrow_left:`⬅️`,arrow_upper_left:`↖️`,arrow_up_down:`↕️`,left_right_arrow:`↔️`,leftwards_arrow_with_hook:`↩️`,arrow_right_hook:`↪️`,arrow_heading_up:`⤴️`,arrow_heading_down:`⤵️`,arrows_clockwise:`🔃`,arrows_counterclockwise:`🔄`,back:`🔙`,end:`🔚`,on:`🔛`,soon:`🔜`,top:`🔝`,place_of_worship:`🛐`,atom_symbol:`⚛️`,om:`🕉️`,star_of_david:`✡️`,wheel_of_dharma:`☸️`,yin_yang:`☯️`,latin_cross:`✝️`,orthodox_cross:`☦️`,star_and_crescent:`☪️`,peace_symbol:`☮️`,menorah:`🕎`,six_pointed_star:`🔯`,khanda:`🪯`,aries:`♈`,taurus:`♉`,gemini:`♊`,cancer:`♋`,leo:`♌`,virgo:`♍`,libra:`♎`,scorpius:`♏`,sagittarius:`♐`,capricorn:`♑`,aquarius:`♒`,pisces:`♓`,ophiuchus:`⛎`,twisted_rightwards_arrows:`🔀`,repeat:`🔁`,repeat_one:`🔂`,arrow_forward:`▶️`,fast_forward:`⏩`,next_track_button:`⏭️`,play_or_pause_button:`⏯️`,arrow_backward:`◀️`,rewind:`⏪`,previous_track_button:`⏮️`,arrow_up_small:`🔼`,arrow_double_up:`⏫`,arrow_down_small:`🔽`,arrow_double_down:`⏬`,pause_button:`⏸️`,stop_button:`⏹️`,record_button:`⏺️`,eject_button:`⏏️`,cinema:`🎦`,low_brightness:`🔅`,high_brightness:`🔆`,signal_strength:`📶`,wireless:`🛜`,vibration_mode:`📳`,mobile_phone_off:`📴`,female_sign:`♀️`,male_sign:`♂️`,transgender_symbol:`⚧️`,heavy_multiplication_x:`✖️`,heavy_plus_sign:`➕`,heavy_minus_sign:`➖`,heavy_division_sign:`➗`,heavy_equals_sign:`🟰`,infinity:`♾️`,bangbang:`‼️`,interrobang:`⁉️`,question:`❓`,grey_question:`❔`,grey_exclamation:`❕`,exclamation:`❗`,heavy_exclamation_mark:`❗`,wavy_dash:`〰️`,currency_exchange:`💱`,heavy_dollar_sign:`💲`,medical_symbol:`⚕️`,recycle:`♻️`,fleur_de_lis:`⚜️`,trident:`🔱`,name_badge:`📛`,beginner:`🔰`,o:`⭕`,white_check_mark:`✅`,ballot_box_with_check:`☑️`,heavy_check_mark:`✔️`,x:`❌`,negative_squared_cross_mark:`❎`,curly_loop:`➰`,loop:`➿`,part_alternation_mark:`〽️`,eight_spoked_asterisk:`✳️`,eight_pointed_black_star:`✴️`,sparkle:`❇️`,copyright:`©️`,registered:`®️`,tm:`™️`,hash:`#️⃣`,asterisk:`*️⃣`,zero:`0️⃣`,one:`1️⃣`,two:`2️⃣`,three:`3️⃣`,four:`4️⃣`,five:`5️⃣`,six:`6️⃣`,seven:`7️⃣`,eight:`8️⃣`,nine:`9️⃣`,keycap_ten:`🔟`,capital_abcd:`🔠`,abcd:`🔡`,symbols:`🔣`,abc:`🔤`,a:`🅰️`,ab:`🆎`,b:`🅱️`,cl:`🆑`,cool:`🆒`,free:`🆓`,information_source:`ℹ️`,id:`🆔`,m:`Ⓜ️`,new:`🆕`,ng:`🆖`,o2:`🅾️`,ok:`🆗`,parking:`🅿️`,sos:`🆘`,up:`🆙`,vs:`🆚`,koko:`🈁`,sa:`🈂️`,u6708:`🈷️`,u6709:`🈶`,u6307:`🈯`,ideograph_advantage:`🉐`,u5272:`🈹`,u7121:`🈚`,u7981:`🈲`,accept:`🉑`,u7533:`🈸`,u5408:`🈴`,u7a7a:`🈳`,congratulations:`㊗️`,secret:`㊙️`,u55b6:`🈺`,u6e80:`🈵`,red_circle:`🔴`,orange_circle:`🟠`,yellow_circle:`🟡`,green_circle:`🟢`,large_blue_circle:`🔵`,purple_circle:`🟣`,brown_circle:`🟤`,black_circle:`⚫`,white_circle:`⚪`,red_square:`🟥`,orange_square:`🟧`,yellow_square:`🟨`,green_square:`🟩`,blue_square:`🟦`,purple_square:`🟪`,brown_square:`🟫`,black_large_square:`⬛`,white_large_square:`⬜`,black_medium_square:`◼️`,white_medium_square:`◻️`,black_medium_small_square:`◾`,white_medium_small_square:`◽`,black_small_square:`▪️`,white_small_square:`▫️`,large_orange_diamond:`🔶`,large_blue_diamond:`🔷`,small_orange_diamond:`🔸`,small_blue_diamond:`🔹`,small_red_triangle:`🔺`,small_red_triangle_down:`🔻`,diamond_shape_with_a_dot_inside:`💠`,radio_button:`🔘`,white_square_button:`🔳`,black_square_button:`🔲`,checkered_flag:`🏁`,triangular_flag_on_post:`🚩`,crossed_flags:`🎌`,black_flag:`🏴`,white_flag:`🏳️`,rainbow_flag:`🏳️🌈`,transgender_flag:`🏳️⚧️`,pirate_flag:`🏴☠️`,ascension_island:`🇦🇨`,andorra:`🇦🇩`,united_arab_emirates:`🇦🇪`,afghanistan:`🇦🇫`,antigua_barbuda:`🇦🇬`,anguilla:`🇦🇮`,albania:`🇦🇱`,armenia:`🇦🇲`,angola:`🇦🇴`,antarctica:`🇦🇶`,argentina:`🇦🇷`,american_samoa:`🇦🇸`,austria:`🇦🇹`,australia:`🇦🇺`,aruba:`🇦🇼`,aland_islands:`🇦🇽`,azerbaijan:`🇦🇿`,bosnia_herzegovina:`🇧🇦`,barbados:`🇧🇧`,bangladesh:`🇧🇩`,belgium:`🇧🇪`,burkina_faso:`🇧🇫`,bulgaria:`🇧🇬`,bahrain:`🇧🇭`,burundi:`🇧🇮`,benin:`🇧🇯`,st_barthelemy:`🇧🇱`,bermuda:`🇧🇲`,brunei:`🇧🇳`,bolivia:`🇧🇴`,caribbean_netherlands:`🇧🇶`,brazil:`🇧🇷`,bahamas:`🇧🇸`,bhutan:`🇧🇹`,bouvet_island:`🇧🇻`,botswana:`🇧🇼`,belarus:`🇧🇾`,belize:`🇧🇿`,canada:`🇨🇦`,cocos_islands:`🇨🇨`,congo_kinshasa:`🇨🇩`,central_african_republic:`🇨🇫`,congo_brazzaville:`🇨🇬`,switzerland:`🇨🇭`,cote_divoire:`🇨🇮`,cook_islands:`🇨🇰`,chile:`🇨🇱`,cameroon:`🇨🇲`,cn:`🇨🇳`,colombia:`🇨🇴`,clipperton_island:`🇨🇵`,costa_rica:`🇨🇷`,cuba:`🇨🇺`,cape_verde:`🇨🇻`,curacao:`🇨🇼`,christmas_island:`🇨🇽`,cyprus:`🇨🇾`,czech_republic:`🇨🇿`,de:`🇩🇪`,diego_garcia:`🇩🇬`,djibouti:`🇩🇯`,denmark:`🇩🇰`,dominica:`🇩🇲`,dominican_republic:`🇩🇴`,algeria:`🇩🇿`,ceuta_melilla:`🇪🇦`,ecuador:`🇪🇨`,estonia:`🇪🇪`,egypt:`🇪🇬`,western_sahara:`🇪🇭`,eritrea:`🇪🇷`,es:`🇪🇸`,ethiopia:`🇪🇹`,eu:`🇪🇺`,european_union:`🇪🇺`,finland:`🇫🇮`,fiji:`🇫🇯`,falkland_islands:`🇫🇰`,micronesia:`🇫🇲`,faroe_islands:`🇫🇴`,fr:`🇫🇷`,gabon:`🇬🇦`,gb:`🇬🇧`,uk:`🇬🇧`,grenada:`🇬🇩`,georgia:`🇬🇪`,french_guiana:`🇬🇫`,guernsey:`🇬🇬`,ghana:`🇬🇭`,gibraltar:`🇬🇮`,greenland:`🇬🇱`,gambia:`🇬🇲`,guinea:`🇬🇳`,guadeloupe:`🇬🇵`,equatorial_guinea:`🇬🇶`,greece:`🇬🇷`,south_georgia_south_sandwich_islands:`🇬🇸`,guatemala:`🇬🇹`,guam:`🇬🇺`,guinea_bissau:`🇬🇼`,guyana:`🇬🇾`,hong_kong:`🇭🇰`,heard_mcdonald_islands:`🇭🇲`,honduras:`🇭🇳`,croatia:`🇭🇷`,haiti:`🇭🇹`,hungary:`🇭🇺`,canary_islands:`🇮🇨`,indonesia:`🇮🇩`,ireland:`🇮🇪`,israel:`🇮🇱`,isle_of_man:`🇮🇲`,india:`🇮🇳`,british_indian_ocean_territory:`🇮🇴`,iraq:`🇮🇶`,iran:`🇮🇷`,iceland:`🇮🇸`,it:`🇮🇹`,jersey:`🇯🇪`,jamaica:`🇯🇲`,jordan:`🇯🇴`,jp:`🇯🇵`,kenya:`🇰🇪`,kyrgyzstan:`🇰🇬`,cambodia:`🇰🇭`,kiribati:`🇰🇮`,comoros:`🇰🇲`,st_kitts_nevis:`🇰🇳`,north_korea:`🇰🇵`,kr:`🇰🇷`,kuwait:`🇰🇼`,cayman_islands:`🇰🇾`,kazakhstan:`🇰🇿`,laos:`🇱🇦`,lebanon:`🇱🇧`,st_lucia:`🇱🇨`,liechtenstein:`🇱🇮`,sri_lanka:`🇱🇰`,liberia:`🇱🇷`,lesotho:`🇱🇸`,lithuania:`🇱🇹`,luxembourg:`🇱🇺`,latvia:`🇱🇻`,libya:`🇱🇾`,morocco:`🇲🇦`,monaco:`🇲🇨`,moldova:`🇲🇩`,montenegro:`🇲🇪`,st_martin:`🇲🇫`,madagascar:`🇲🇬`,marshall_islands:`🇲🇭`,macedonia:`🇲🇰`,mali:`🇲🇱`,myanmar:`🇲🇲`,mongolia:`🇲🇳`,macau:`🇲🇴`,northern_mariana_islands:`🇲🇵`,martinique:`🇲🇶`,mauritania:`🇲🇷`,montserrat:`🇲🇸`,malta:`🇲🇹`,mauritius:`🇲🇺`,maldives:`🇲🇻`,malawi:`🇲🇼`,mexico:`🇲🇽`,malaysia:`🇲🇾`,mozambique:`🇲🇿`,namibia:`🇳🇦`,new_caledonia:`🇳🇨`,niger:`🇳🇪`,norfolk_island:`🇳🇫`,nigeria:`🇳🇬`,nicaragua:`🇳🇮`,netherlands:`🇳🇱`,norway:`🇳🇴`,nepal:`🇳🇵`,nauru:`🇳🇷`,niue:`🇳🇺`,new_zealand:`🇳🇿`,oman:`🇴🇲`,panama:`🇵🇦`,peru:`🇵🇪`,french_polynesia:`🇵🇫`,papua_new_guinea:`🇵🇬`,philippines:`🇵🇭`,pakistan:`🇵🇰`,poland:`🇵🇱`,st_pierre_miquelon:`🇵🇲`,pitcairn_islands:`🇵🇳`,puerto_rico:`🇵🇷`,palestinian_territories:`🇵🇸`,portugal:`🇵🇹`,palau:`🇵🇼`,paraguay:`🇵🇾`,qatar:`🇶🇦`,reunion:`🇷🇪`,romania:`🇷🇴`,serbia:`🇷🇸`,ru:`🇷🇺`,rwanda:`🇷🇼`,saudi_arabia:`🇸🇦`,solomon_islands:`🇸🇧`,seychelles:`🇸🇨`,sudan:`🇸🇩`,sweden:`🇸🇪`,singapore:`🇸🇬`,st_helena:`🇸🇭`,slovenia:`🇸🇮`,svalbard_jan_mayen:`🇸🇯`,slovakia:`🇸🇰`,sierra_leone:`🇸🇱`,san_marino:`🇸🇲`,senegal:`🇸🇳`,somalia:`🇸🇴`,suriname:`🇸🇷`,south_sudan:`🇸🇸`,sao_tome_principe:`🇸🇹`,el_salvador:`🇸🇻`,sint_maarten:`🇸🇽`,syria:`🇸🇾`,swaziland:`🇸🇿`,tristan_da_cunha:`🇹🇦`,turks_caicos_islands:`🇹🇨`,chad:`🇹🇩`,french_southern_territories:`🇹🇫`,togo:`🇹🇬`,thailand:`🇹🇭`,tajikistan:`🇹🇯`,tokelau:`🇹🇰`,timor_leste:`🇹🇱`,turkmenistan:`🇹🇲`,tunisia:`🇹🇳`,tonga:`🇹🇴`,tr:`🇹🇷`,trinidad_tobago:`🇹🇹`,tuvalu:`🇹🇻`,taiwan:`🇹🇼`,tanzania:`🇹🇿`,ukraine:`🇺🇦`,uganda:`🇺🇬`,us_outlying_islands:`🇺🇲`,united_nations:`🇺🇳`,us:`🇺🇸`,uruguay:`🇺🇾`,uzbekistan:`🇺🇿`,vatican_city:`🇻🇦`,st_vincent_grenadines:`🇻🇨`,venezuela:`🇻🇪`,british_virgin_islands:`🇻🇬`,us_virgin_islands:`🇻🇮`,vietnam:`🇻🇳`,vanuatu:`🇻🇺`,wallis_futuna:`🇼🇫`,samoa:`🇼🇸`,kosovo:`🇽🇰`,yemen:`🇾🇪`,mayotte:`🇾🇹`,south_africa:`🇿🇦`,zambia:`🇿🇲`,zimbabwe:`🇿🇼`,england:`🏴`,scotland:`🏴`,wales:`🏴`};function zs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bs=zs();function Vs(e){Bs=e}var Hs={exec:()=>null};function Us(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Gs.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ws=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Gs={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Us(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Us(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Us(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Us(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Us(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:Us(e=>RegExp(`^ {0,${e}}>`))},Ks=/^(?:[ \t]*(?:\n|$))+/,qs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Js=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ys=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xs=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zs=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$s=q(Qs).replace(/bull/g,Zs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),ec=q(Qs).replace(/bull/g,Zs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),tc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,nc=/^[^\n]+/,rc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ic=q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,rc).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ac=q(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Zs).getRegex(),oc=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,sc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,cc=q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,sc).replace(`tag`,oc).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lc=e=>q(tc).replace(`hr`,Ys).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,oc).getRegex(),uc=lc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),dc=lc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),fc={blockquote:q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,dc).getRegex(),code:qs,def:ic,fences:Js,heading:Xs,hr:Ys,html:cc,lheading:$s,list:ac,newline:Ks,paragraph:uc,table:Hs,text:nc},pc=q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Ys).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,oc).getRegex(),mc={...fc,lheading:ec,table:pc,paragraph:q(tc).replace(`hr`,Ys).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,pc).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,oc).getRegex()},hc={...fc,html:q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,sc).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Hs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:q(tc).replace(`hr`,Ys).replace(`heading`,` *#{1,6} *[^
|
|
20
20
|
]`).replace(`lheading`,$s).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},gc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,_c=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vc=/^( {2,}|\\)\n(?!\s*$)/,yc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bc=/[\p{P}\p{S}]/u,xc=/[\s\p{P}\p{S}]/u,Sc=/[^\s\p{P}\p{S}]/u,Cc=q(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,xc).getRegex(),wc=/[\p{Pi}\p{Ps}"']/u,Tc=/(?!~)[\p{P}\p{S}]/u,Ec=/(?!~)[\s\p{P}\p{S}]/u,Dc=/(?:[^\s\p{P}\p{S}]|~)/u,Oc=q(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Ws?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),kc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ac=q(kc,`u`).replace(/punct/g,bc).getRegex(),jc=q(kc,`u`).replace(/punct/g,Tc).getRegex(),Mc=q(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,wc).replace(/punct/g,bc).getRegex(),Nc=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Pc=q(Nc,`gu`).replace(/notPunctSpace/g,Sc).replace(/punctSpace/g,xc).replace(/punct/g,bc).getRegex(),Fc=q(Nc,`gu`).replace(/notPunctSpace/g,Dc).replace(/punctSpace/g,Ec).replace(/punct/g,Tc).getRegex(),Ic=q(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Sc).replace(/punctSpace/g,xc).replace(/punct/g,bc).getRegex(),Lc=q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Sc).replace(/punctSpace/g,xc).replace(/punct/g,bc).getRegex(),Rc=q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Sc).replace(/punctSpace/g,xc).replace(/punct/g,bc).getRegex(),zc=q(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,bc).getRegex(),Bc=q(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Sc).replace(/punctSpace/g,xc).replace(/punct/g,bc).getRegex(),Vc=q(/\\(punct)/,`gu`).replace(/punct/g,bc).getRegex(),Hc=q(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Uc=q(sc).replace(`(?:-->|$)`,`-->`).getRegex(),Wc=q(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Uc).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Gc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Kc=q(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,Gc).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qc=q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Gc).replace(`ref`,rc).getRegex(),Jc=q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,rc).getRegex(),Yc=q(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,qc).replace(`nolink`,Jc).getRegex(),Xc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Zc={_backpedal:Hs,anyPunctuation:Vc,autolink:Hc,blockSkip:Oc,br:vc,code:_c,del:Hs,delLDelim:Hs,delRDelim:Hs,emStrongLDelim:Ac,emStrongRDelimAst:Pc,emStrongRDelimUnd:Lc,escape:gc,link:Kc,nolink:Jc,punctuation:Cc,reflink:qc,reflinkSearch:Yc,tag:Wc,text:yc,url:Hs},Qc={...Zc,emStrongLDelim:Mc,emStrongRDelimAst:Ic,emStrongRDelimUnd:Rc,link:q(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Gc).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Gc).getRegex()},$c={...Zc,emStrongRDelimAst:Fc,emStrongLDelim:jc,delLDelim:zc,delRDelim:Bc,url:q(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Xc).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:q(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Xc).getRegex()},el={...$c,br:q(vc).replace(`{2,}`,`*`).getRegex(),text:q($c.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},tl={normal:fc,gfm:mc,pedantic:hc},nl={normal:Zc,gfm:$c,breaks:el,pedantic:Qc},rl={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},il=e=>rl[e];function J(e,t){if(t){if(Gs.escapeTest.test(e))return e.replace(Gs.escapeReplace,il)}else if(Gs.escapeTestNoEncode.test(e))return e.replace(Gs.escapeReplaceNoEncode,il);return e}function al(e){try{e=encodeURI(e).replace(Gs.percentDecode,`%`)}catch{return null}return e}function ol(e,t){let n=e.replace(Gs.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Gs.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(Gs.slashPipe,`|`);return n}function sl(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function cl(e){let t=e.split(`
|
|
21
21
|
`),n=t.length-1;for(;n>=0&&Gs.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
22
|
-
`)}function ll(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function ul(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function dl(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`)
|
|
22
|
+
`)}function ll(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function ul(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function dl(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function fl(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
23
23
|
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
24
24
|
`)}var pl=class{options;rules;lexer;constructor(e){this.options=e||Bs}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:cl(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=fl(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=sl(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:sl(t[0],`
|
|
25
25
|
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:sl(t[0],`
|
|
@@ -47,7 +47,7 @@ ${a}`,r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){
|
|
|
47
47
|
`):[],a={type:`table`,raw:sl(t[0],`
|
|
48
48
|
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(ol(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:sl(t[0],`
|
|
49
49
|
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
50
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=sl(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=ll(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),dl(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return dl(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},ml=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Bs,this.options.tokenizer=this.options.tokenizer||new pl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Gs,block:tl.normal,inline:nl.normal};this.options.pedantic?(t.block=tl.pedantic,t.inline=nl.pedantic):this.options.gfm&&(t.block=tl.gfm,t.inline=this.options.breaks?nl.breaks:nl.gfm),this.tokenizer.rules=t}static get rules(){return{block:tl,inline:nl}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Gs.carriageReturn,`
|
|
50
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=sl(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=ll(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),dl(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return dl(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},ml=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Bs,this.options.tokenizer=this.options.tokenizer||new pl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:Gs,block:tl.normal,inline:nl.normal};this.options.pedantic?(t.block=tl.pedantic,t.inline=nl.pedantic):this.options.gfm&&(t.block=tl.gfm,t.inline=this.options.breaks?nl.breaks:nl.gfm),this.tokenizer.rules=t}static get rules(){return{block:tl,inline:nl}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Gs.carriageReturn,`
|
|
51
51
|
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Gs.tabCharGlobal,` `).replace(Gs.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
52
52
|
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
53
53
|
`)?``:`
|
|
@@ -61,7 +61,7 @@ ${a}`,r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){
|
|
|
61
61
|
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
62
62
|
`)?``:`
|
|
63
63
|
`)+i.raw,n.text+=`
|
|
64
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}
|
|
64
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(!(e.charAt(0)===`!`||!Object.hasOwn(this.tokens.links,e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,n.slice(r+1,-1)))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},hl=class{options;parser;constructor(e){this.options=e||Bs}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Gs.notSpaceStart)?.[0],i=e.replace(Gs.endingNewline,``)+`
|
|
65
65
|
`;return r?`<pre><code class="language-`+J(r)+`">`+(n?i:J(i,!0))+`</code></pre>
|
|
66
66
|
`:`<pre><code>`+(n?i:J(i,!0))+`</code></pre>
|
|
67
67
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
@@ -85,4 +85,4 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
85
85
|
`)}),o+=1,r=[])};for(let e of t){if(a){r.push(e),Fl(e)&&(a=!1);continue}if(i===null&&Pl(e)){s(),i=[];continue}if(i!==null){if(Fl(e)){n.push({kind:`mermaid`,key:`mermaid:${o}`,code:i.join(`
|
|
86
86
|
`)}),o+=1,i=null;continue}i.push(e);continue}if(X(e)){r.push(e),a=!0;continue}r.push(e)}return i!==null&&r.push("```mermaid",...i),s(),n},Q=({code:e,label:t=`Copy code`})=>(0,x.jsx)(Mn,{value:e,idleText:t,idleAriaLabel:t,copiedAriaLabel:`Code copied to clipboard`,className:`console-copy-code-button`}),Il=`https://cdn.jsdelivr.net/npm/mermaid@10.9.6/dist/mermaid.min.js`,Ll=null,Rl=0,zl=e=>(e.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`dark`,themeVariables:{background:`#0d1117`,primaryColor:`#161b22`,primaryTextColor:`#e6edf3`,primaryBorderColor:`#30363d`,lineColor:`#8b949e`,fontSize:`14px`}}),e),Bl=()=>Ll===null?window.mermaid===void 0?(Ll=new Promise((e,t)=>{let n=document.createElement(`script`);n.src=Il,n.async=!0,n.onload=()=>{if(window.mermaid===void 0){t(Error(`mermaid failed to load`));return}e(zl(window.mermaid))},n.onerror=()=>t(Error(`mermaid script failed to load`)),document.head.appendChild(n)}),Ll):(Ll=Promise.resolve(zl(window.mermaid)),Ll):Ll,Vl=async e=>{let t=await Bl();Rl+=1;let n=`console-mermaid-${Rl}`,{svg:r}=await t.render(n,e);return Ls.sanitize(r,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:[`foreignObject`]})},Hl=.5,Ul=e=>Number.isNaN(e)||e<1?1:e>6?6:e,Wl=e=>Ul(Ul(e)+Hl),Gl=e=>Ul(Ul(e)-Hl),Kl=e=>Ul(e)<=1,ql=e=>Ul(e)>=6,Jl=e=>`${Math.round(Ul(e)*100)}%`,Yl=e=>`${Ul(e)*100}%`,Xl=({svg:e,onClose:t})=>{let[n,r]=(0,y.useState)(1),i=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let t=i.current;if(t===null)return;t.innerHTML=e;let n=t.querySelector(`svg`);n!==null&&(n.style.removeProperty(`max-width`),n.style.setProperty(`width`,`100%`),n.style.setProperty(`height`,`auto`))},[e]),(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t]),(0,x.jsxs)(`div`,{className:`console-mermaid-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Enlarged diagram`,children:[(0,x.jsxs)(`div`,{className:`console-mermaid-modal-bar`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-modal-button`,"aria-label":`Zoom out`,disabled:Kl(n),onClick:()=>r(Gl(n)),children:`−`}),(0,x.jsx)(`span`,{className:`console-mermaid-modal-scale`,children:Jl(n)}),(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-modal-button`,"aria-label":`Zoom in`,disabled:ql(n),onClick:()=>r(Wl(n)),children:`+`}),(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-modal-close`,"aria-label":`Close enlarged diagram`,onClick:t,children:`✕`})]}),(0,x.jsx)(`div`,{className:`console-mermaid-modal-viewport`,children:(0,x.jsx)(`div`,{ref:i,className:`console-mermaid-modal-canvas`,style:{width:Yl(n)}})})]})},Zl=({code:e})=>{let[t,n]=(0,y.useState)({status:`loading`}),[r,i]=(0,y.useState)(!1),a=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let t=!1;return n({status:`loading`}),Vl(e).then(e=>{t||n({status:`ready`,svg:e})}).catch(e=>{t||n({status:`error`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!0}},[e]),(0,y.useEffect)(()=>{let e=a.current;e!==null&&(e.innerHTML=t.status===`ready`?t.svg:``)},[t]),t.status===`loading`?(0,x.jsx)(`div`,{className:`console-mermaid-loading`,children:`Rendering diagram...`}):t.status===`error`?(0,x.jsxs)(`div`,{className:`console-mermaid`,children:[(0,x.jsxs)(`div`,{className:`console-mermaid-error`,children:[`Mermaid render error: `,t.message]}),(0,x.jsx)(`pre`,{className:`console-mermaid-source`,children:(0,x.jsx)(`code`,{children:e})})]}):(0,x.jsxs)(`div`,{className:`console-mermaid`,children:[(0,x.jsx)(`div`,{ref:a,className:`console-mermaid-rendered`}),(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-enlarge`,onClick:()=>i(!0),children:`Enlarge diagram`}),r&&(0,x.jsx)(Xl,{svg:t.svg,onClose:()=>i(!1)})]})},Ql=e=>{let t=e.querySelectorAll(`a[href]`),n=[];return t.forEach((e,t)=>{let r=e.getAttribute(`href`)??``;if(ao(r)===null)return;let i=e.textContent??r,a=document.createElement(`span`);a.className=`console-markdown-reference-host`,e.replaceWith(a),n.push({key:`${t}:${r}`,host:a,href:r,fallbackText:i})}),n},$l=e=>{let t=e.querySelectorAll(`pre > code`),n=[];return t.forEach((e,t)=>{let r=e.parentElement;if(r===null)return;let i=e.textContent??``,a=document.createElement(`div`);a.className=`console-markdown-code-block`;let o=document.createElement(`div`);o.className=`console-markdown-code-copy-host`,r.replaceWith(a),a.append(o,r),n.push({key:`code:${t}`,host:o,code:i})}),n},eu=({source:e,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})=>{let i=(0,y.useMemo)(()=>{let n=Nl(e,r);return t===void 0?n:uo(n,t)},[e,t,r]),a=(0,y.useRef)(null),[o,s]=(0,y.useState)([]),[c,l]=(0,y.useState)([]);return(0,y.useEffect)(()=>{let e=a.current;e!==null&&(e.innerHTML=i,l($l(e)),s(n===void 0?[]:Ql(e)))},[i,n]),(0,x.jsxs)(`div`,{ref:a,className:`console-markdown`,children:[c.map(e=>(0,E.createPortal)((0,x.jsx)(Q,{code:e.code}),e.host,e.key)),n!==void 0&&o.map(e=>(0,E.createPortal)(n(e.href,e.fallbackText),e.host,e.key))]})},tu=({body:e,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})=>{let i=(0,y.useMemo)(()=>Z(e),[e]);return e.trim()===``?(0,x.jsx)(`p`,{className:`console-markdown-empty`,children:`No description provided.`}):(0,x.jsx)(`div`,{className:`console-markdown-view`,children:i.map(e=>e.kind===`mermaid`?(0,x.jsx)(Zl,{code:e.code},e.key):(0,x.jsx)(eu,{source:e.source,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r},e.key))})},nu=({title:e,count:t=null,defaultCollapsed:n=!1,headerAction:r,children:i})=>{let[a,o]=(0,y.useState)(n),s=t===null?e:`${e} (${t})`;return(0,x.jsxs)(`section`,{className:`console-panel`,children:[(0,x.jsxs)(`header`,{className:`console-panel-header`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`console-panel-toggle`,"aria-expanded":!a,onClick:()=>o(e=>!e),children:[(0,x.jsx)(`span`,{className:`console-panel-caret`,children:a?`▸`:`▾`}),(0,x.jsx)(`span`,{className:`console-panel-title`,children:s})]}),r!==void 0&&(0,x.jsx)(`div`,{className:`console-panel-action`,children:r})]}),!a&&(0,x.jsx)(`div`,{className:`console-panel-body`,children:i})]})},ru=e=>{switch(e){case`added`:return{label:`A`,color:`#3fb950`};case`modified`:return{label:`M`,color:`#d29922`};case`removed`:return{label:`D`,color:`#f85149`};case`renamed`:return{label:`R`,color:`#a371f7`};case`changed`:return{label:`M`,color:`#d29922`};default:return{label:`?`,color:`#8b949e`}}},iu=()=>({directories:new Map,files:[]}),au=e=>e.split(`/`).filter(e=>e!==``),ou=(e,t)=>e.name.localeCompare(t.name),su=(e,t)=>{let n=[];e.directories.forEach((e,r)=>{let i=t===``?r:`${t}/${r}`;n.push({kind:`directory`,name:r,path:i,children:su(e,i)})}),n.sort(ou);let r=e.files.map(e=>({kind:`file`,name:au(e.path).at(-1)??e.path,path:e.path,file:e}));return r.sort(ou),[...n,...r]},cu=e=>{let t=iu();for(let n of e){let e=au(n.path);if(e.length===0){t.files.push(n);continue}let r=e.slice(0,-1),i=t;for(let e of r){let t=i.directories.get(e);if(t===void 0){let t=iu();i.directories.set(e,t),i=t;continue}i=t}i.files.push(n)}return su(t,``)},lu=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/,uu=e=>{let t=[],n=0,r=0;for(let i of e.split(`
|
|
87
87
|
`)){if(i.startsWith(`@@`)){let e=i.match(lu);e!==null&&(n=Number(e[1]),r=Number(e[2])),t.push({kind:`hunk`,oldLineNumber:null,newLineNumber:null,content:i});continue}if(i.startsWith(`+`)){t.push({kind:`add`,oldLineNumber:null,newLineNumber:r,content:i}),r+=1;continue}if(i.startsWith(`-`)){t.push({kind:`del`,oldLineNumber:n,newLineNumber:null,content:i}),n+=1;continue}t.push({kind:`ctx`,oldLineNumber:n,newLineNumber:r,content:i}),n+=1,r+=1}return t},du=[`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.svg`,`.avif`,`.bmp`,`.ico`],fu=e=>{let t=e.toLowerCase();return du.some(e=>t.endsWith(e))},pu=e=>e.kind===`add`||e.kind===`ctx`?e.newLineNumber===null?null:{line:e.newLineNumber,side:`RIGHT`}:e.kind===`del`?e.oldLineNumber===null?null:{line:e.oldLineNumber,side:`LEFT`}:null,mu=e=>`${e.kind}:${e.oldLineNumber??`x`}:${e.newLineNumber??`x`}:${e.content}`,hu=({target:e,onSubmit:t,onClose:n})=>{let[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)({kind:`idle`}),s=async()=>{let n=r.trim();if(n.length!==0&&a.kind!==`posting`){o({kind:`posting`});try{await t(e.path,e.line,e.side,n),i(``),o({kind:`posted`})}catch(e){o({kind:`error`,message:e instanceof Error?e.message:`failed to post`})}}};return(0,x.jsxs)(`div`,{className:`console-diff-composer`,children:[(0,x.jsxs)(`div`,{className:`console-diff-composer-anchor`,children:[`commenting on line `,e.line,` (`,e.side,`)`]}),a.kind===`posted`?(0,x.jsx)(`p`,{className:`console-diff-composer-posted`,children:`Comment saved.`}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`textarea`,{className:`console-diff-composer-input`,rows:3,placeholder:`Leave a review comment on this line…`,value:r,onChange:e=>i(e.target.value)}),(0,x.jsxs)(`div`,{className:`console-diff-composer-controls`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-diff-composer-submit`,disabled:a.kind===`posting`,onClick:()=>{s()},children:`Comment`}),(0,x.jsx)(`button`,{type:`button`,className:`console-diff-composer-cancel`,onClick:n,children:`Cancel`}),a.kind===`posting`&&(0,x.jsx)(`span`,{className:`console-diff-composer-status`,children:`Posting…`}),a.kind===`error`&&(0,x.jsxs)(`span`,{role:`alert`,className:`console-diff-composer-status console-diff-composer-error`,children:[`Failed: `,a.message]})]})]})]})},gu=({patch:e,path:t,rawUrl:n,buildImageProxyUrl:r,onAddInlineComment:i})=>{let[a,o]=(0,y.useState)(null);if(e===null||e===``){if(t!==void 0&&n!=null){if(n.startsWith(`data:image/`))return(0,x.jsx)(`div`,{className:`console-file-diff-image`,children:(0,x.jsx)(`img`,{className:`console-file-diff-image-content`,src:n,alt:t})});if(fu(t)&&r!==void 0)return(0,x.jsx)(`div`,{className:`console-file-diff-image`,children:(0,x.jsx)(`img`,{className:`console-file-diff-image-content`,src:r(n),alt:t})})}return(0,x.jsx)(`p`,{className:`console-file-diff-empty`,children:`(no diff / binary or too large)`})}let s=uu(e),c=i!==void 0&&t!==void 0&&t.length>0,l=c?4:3;return(0,x.jsx)(`table`,{className:`console-file-diff`,children:(0,x.jsx)(`tbody`,{children:s.map(e=>{let n=mu(e),r=c?pu(e):null,s=a!==null&&r!==null&&a.line===r.line&&a.side===r.side;return(0,x.jsxs)(y.Fragment,{children:[(0,x.jsxs)(`tr`,{className:`console-diff-row console-diff-${e.kind}`,children:[c&&(0,x.jsx)(`td`,{className:`console-diff-comment-cell`,children:r!==null&&t!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-diff-comment-button`,"aria-label":`Comment on line ${r.line} (${r.side})`,"aria-expanded":s,onClick:()=>o(s?null:{path:t,line:r.line,side:r.side}),children:`+`})}),(0,x.jsx)(`td`,{className:`console-diff-ln`,children:e.oldLineNumber??``}),(0,x.jsx)(`td`,{className:`console-diff-ln`,children:e.newLineNumber??``}),(0,x.jsx)(`td`,{className:`console-diff-code`,children:e.content})]}),s&&i!==void 0&&a!==null&&(0,x.jsx)(`tr`,{className:`console-diff-composer-row`,children:(0,x.jsx)(`td`,{colSpan:l,children:(0,x.jsx)(hu,{target:a,onSubmit:i,onClose:()=>o(null)})})})]},n)})})})},_u=e=>({paddingLeft:`${e*16}px`}),vu=({file:e,depth:t,name:n,buildImageProxyUrl:r,onAddInlineComment:i})=>{let[a,o]=(0,y.useState)(!1),s=ru(e.status);return(0,x.jsxs)(`li`,{className:`console-file`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`console-file-row`,style:_u(t),"aria-expanded":a,onClick:()=>o(e=>!e),children:[(0,x.jsx)(`span`,{className:`console-file-caret`,children:a?`▾`:`▸`}),(0,x.jsx)(`span`,{className:`console-file-badge`,style:{color:s.color,borderColor:s.color},children:s.label}),(0,x.jsx)(`span`,{className:`console-file-path`,children:n}),(0,x.jsxs)(`span`,{className:`console-file-stat console-file-add`,children:[`+`,e.additions]}),(0,x.jsxs)(`span`,{className:`console-file-stat console-file-del`,children:[`-`,e.deletions]})]}),a&&(0,x.jsx)(gu,{patch:e.patch,path:e.path,rawUrl:e.rawUrl,buildImageProxyUrl:r,onAddInlineComment:i})]})},yu=({node:e,depth:t,buildImageProxyUrl:n,onAddInlineComment:r})=>e.kind===`file`?(0,x.jsx)(vu,{file:e.file,depth:t,name:e.name,buildImageProxyUrl:n,onAddInlineComment:r}):(0,x.jsxs)(`li`,{className:`console-file-tree-dir`,children:[(0,x.jsxs)(`div`,{className:`console-file-tree-dir-name`,style:_u(t),children:[(0,x.jsx)(`span`,{className:`console-file-tree-dir-icon`,"aria-hidden":`true`,children:`📁`}),e.name]}),(0,x.jsx)(`ul`,{className:`console-file-tree-children`,children:e.children.map(e=>(0,x.jsx)(yu,{node:e,depth:t+1,buildImageProxyUrl:n,onAddInlineComment:r},e.path))})]}),bu=({files:e,isLoading:t,error:n,buildImageProxyUrl:r,onAddInlineComment:i})=>{if(n!==null)return(0,x.jsx)(`p`,{className:`console-files-notloaded`,children:`Not loaded.`});if(t)return(0,x.jsx)(`p`,{className:`console-files-loading`,children:`Loading changed files...`});if(e.length===0)return(0,x.jsx)(`p`,{className:`console-files-empty`,children:`No changed files.`});let a=cu(e);return(0,x.jsx)(`ul`,{className:`console-files console-file-tree`,children:a.map(e=>(0,x.jsx)(yu,{node:e,depth:0,buildImageProxyUrl:r,onAddInlineComment:i},e.path))})},xu=({comments:e,isLoading:t,error:n,now:r,buildImageProxyUrl:i,renderReferenceLink:a,repoContext:o})=>{let[s,c]=(0,y.useState)(!1);if(n!==null)return(0,x.jsx)(`p`,{className:`console-comment-notloaded`,children:`Not loaded.`});if(t)return(0,x.jsx)(`p`,{className:`console-comment-loading`,children:`Loading comments...`});if(e.length===0)return(0,x.jsx)(`p`,{className:`console-comment-empty`,children:`No comments.`});let l=s?e:e.slice(-1);return(0,x.jsxs)(`div`,{className:`console-comment-list`,children:[!s&&e.length>1&&(0,x.jsxs)(`button`,{type:`button`,className:`console-comment-show-all`,onClick:()=>c(!0),children:[`Show all `,e.length]}),l.map(e=>(0,x.jsxs)(`article`,{className:`console-comment`,children:[(0,x.jsxs)(`header`,{className:`console-comment-header`,children:[(0,x.jsx)(`span`,{className:`console-comment-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-comment-time`,children:me(e.createdAt,r)})]}),(0,x.jsx)(tu,{body:e.body,buildImageProxyUrl:i,renderReferenceLink:a,repoContext:o})]},`${e.author}:${e.createdAt}:${e.body}`))]})},Su=e=>e.slice(0,7),Cu=e=>e.split(`
|
|
88
|
-
`)[0],wu=({commits:e,isLoading:t,error:n,now:r})=>n===null?t?(0,x.jsx)(`p`,{className:`console-commits-loading`,children:`Loading commits...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-commits-empty`,children:`No commits.`}):(0,x.jsx)(`ul`,{className:`console-commits`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-commit`,children:[(0,x.jsx)(`span`,{className:`console-commit-message`,children:Cu(e.message)}),(0,x.jsx)(`span`,{className:`console-commit-sha`,children:Su(e.sha)}),(0,x.jsx)(`span`,{className:`console-commit-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-commit-time`,children:me(e.authoredAt,r)})]},e.sha))}):(0,x.jsx)(`p`,{className:`console-commits-notloaded`,children:`Not loaded.`}),Tu=({url:e,label:t=`Copy URL`})=>(0,x.jsx)(Mn,{value:e,idleText:`Copy URL`,idleAriaLabel:t,copiedAriaLabel:`URL copied to clipboard`,className:`console-copy-url-button`}),Eu=e=>{let t=new Map;for(let n of e){let e=t.get(n.message);if(e===void 0){t.set(n.message,[n.section]);continue}e.push(n.section)}return Array.from(t,([e,t])=>({message:e,sections:t}))},Du=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`,Ou=({failures:e})=>e.length===0?null:(0,x.jsx)(`div`,{role:`alert`,className:`console-detail-fetch-error`,children:Eu(e).map(e=>(0,x.jsxs)(`p`,{className:`console-detail-fetch-error-line`,children:[`Failed to load `,Du(e.sections),`:`,` `,e.message]},e.message))}),ku={MERGEABLE:{color:`GREEN`,label:`No conflict`,title:`This pull request has no merge conflicts`,modifier:`console-detail-mergeable-chip-ok`},CONFLICTING:{color:`RED`,label:`Conflict`,title:`This pull request has merge conflicts`,modifier:`console-detail-mergeable-chip-conflict`},UNKNOWN:{color:`GRAY`,label:`Checking merge status`,title:`GitHub has not finished computing the merge status yet`,modifier:`console-detail-mergeable-chip-unknown`}},Au=({mergeableStatus:e})=>{let t=ku[e],n=ae(t.color);return(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-mergeable-chip ${t.modifier}`,style:{color:n.fg,borderColor:n.border,backgroundColor:n.bg},title:t.title,children:t.label})},ju=e=>{let t=ae(e);return{color:t.fg,borderColor:t.border,backgroundColor:t.bg}},Mu=({isPassedAllCiJob:e,isCiStateSuccess:t,isBranchOutOfDate:n,missingRequiredCheckNames:r})=>{let i=e&&t,a=i?`GREEN`:`RED`,o=i?`CI passing`:`CI failing`,s=!i&&r.length>0?`missing: ${r.join(`, `)}`:null;return(0,x.jsxs)(`span`,{className:`console-detail-pr-status`,children:[(0,x.jsxs)(`span`,{className:`console-detail-status-chip console-detail-ci-chip`,style:ju(a),title:s??o,children:[o,s!==null&&(0,x.jsxs)(`span`,{className:`console-detail-ci-missing`,children:[` `,`(`,s,`)`]})]}),n&&(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-outofdate-chip`,style:ju(`YELLOW`),title:`This branch is out of date with the base branch`,children:`Out of date`})]})},Nu=({pullRequest:e,body:t,bodyIsLoading:n,files:r,filesAreLoading:i,filesError:a,commits:o,commitsAreLoading:s,commitsError:c,now:l,buildImageProxyUrl:u,renderReferenceLink:d,onAddInlineComment:f})=>{let p=e.summary,m=ao(e.url),h=m===null?void 0:{owner:m.owner,repo:m.repo},g=i||a!==null?null:r.length,_=s||c!==null?null:o.length;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`console-pr-header`,children:[(0,x.jsx)(`a`,{href:e.url,className:`console-pr-section-title`,target:`_blank`,rel:`noopener noreferrer`,children:p?.title??e.url}),e.isDraft&&(0,x.jsx)(`span`,{className:`console-pr-section-state`,children:`draft`}),(0,x.jsx)(Au,{mergeableStatus:e.mergeableStatus}),(0,x.jsx)(Mu,{isPassedAllCiJob:e.isPassedAllCiJob,isCiStateSuccess:e.isCiStateSuccess,isBranchOutOfDate:e.isBranchOutOfDate,missingRequiredCheckNames:e.missingRequiredCheckNames}),(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),(0,x.jsx)(Tu,{url:e.url,label:`Copy PR URL`}),(0,x.jsxs)(`div`,{className:`console-pr-statbar`,children:[m!==null&&(0,x.jsxs)(`span`,{className:`console-pr-repo`,children:[m.owner,`/`,m.repo]}),e.branchName!==null&&(0,x.jsx)(`span`,{className:`console-pr-branch`,children:e.branchName}),p!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{className:`console-pr-add`,children:[`+`,p.additions]}),(0,x.jsxs)(`span`,{className:`console-pr-del`,children:[`-`,p.deletions]}),(0,x.jsxs)(`span`,{className:`console-pr-files-count`,children:[p.changedFiles,` files`]})]})]})]}),(0,x.jsx)(nu,{title:`Description`,children:n?(0,x.jsx)(`p`,{className:`console-pr-body-loading`,children:`Loading description...`}):(0,x.jsx)(tu,{body:p?.body??t,buildImageProxyUrl:u,renderReferenceLink:d,repoContext:h})}),(0,x.jsx)(nu,{title:`Changed files`,count:g,children:(0,x.jsx)(bu,{files:r,isLoading:i,error:a,buildImageProxyUrl:u,onAddInlineComment:f})}),(0,x.jsx)(nu,{title:`Commits`,count:_,defaultCollapsed:!0,children:(0,x.jsx)(wu,{commits:o,isLoading:s,error:c,now:l})})]})},Pu=({item:e,storyName:t,storyColorEnum:n,overlayStatus:r,statusOptions:i,state:a,body:o,bodyIsLoading:s,bodyError:c,comments:l,commentsAreLoading:u,commentsError:d,files:f,filesAreLoading:p,filesError:m,commits:h,commitsAreLoading:g,commitsError:_,stateError:v,pullRequestStatus:y,pullRequestStatusError:b,relatedPullRequests:S,relatedPullRequestsError:C,now:w,commentComposer:T,operationBar:E,buildImageProxyUrl:D,renderReferenceLink:O,onAddInlineComment:ee})=>{let te=a?.state??`open`,ne=a?.merged??!1,k=!e.isPr&&te===`closed`?`Closed`:null,A=oo(e.nameWithOwner)??void 0,re=ae(n),ie=r===null?e.status===null?null:{name:e.status,color:i.find(t=>t.name===e.status)?.color??`GRAY`}:r,j=ie===null?null:ae(ie.color),M=p||m!==null?null:f.length,N=u||d!==null?null:l.length,oe=g||_!==null?null:h.length,P=e=>{let t=ao(e);return t===null?e:`PR #${t.number}`},F=[{section:`item state`,message:v},{section:`pull request status`,message:e.isPr?b:null},{section:`description`,message:c},{section:`comments`,message:d},{section:`changed files`,message:e.isPr?m:null},{section:`commits`,message:e.isPr?_:null},{section:`related pull requests`,message:e.isPr?null:C},...S.flatMap(e=>[{section:`changed files of ${P(e.pullRequest.url)}`,message:e.filesError},{section:`commits of ${P(e.pullRequest.url)}`,message:e.commitsError}])].flatMap(e=>e.message===null?[]:[{section:e.section,message:e.message}]),I=e.isPr&&y?.found?[{url:e.url,mergeableStatus:y.mergeableStatus}]:[];return(0,x.jsxs)(`article`,{className:`console-detail`,children:[(0,x.jsxs)(`div`,{className:`console-detail-header`,children:[(0,x.jsxs)(`h2`,{className:`console-detail-title`,children:[(0,x.jsx)(ve,{isPr:e.isPr,state:te,merged:ne,isDraft:!1,stateReason:``}),(0,x.jsx)(`span`,{className:`console-detail-title-text`,children:e.title}),(0,x.jsx)(`span`,{className:`console-detail-number`,children:e.isPr?`PR #${e.number}`:`#${e.number}`})]}),(0,x.jsxs)(`div`,{className:`console-detail-topline`,children:[ie!==null&&j!==null&&(0,x.jsx)(`span`,{className:`console-detail-status-chip`,style:{color:j.fg,borderColor:j.border,backgroundColor:j.bg},children:ie.name}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-detail-agent-chip`,children:e.agent}),t!==null&&(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:re.dot}}),t]}),e.isPr&&y?.found&&(0,x.jsx)(Mu,{isPassedAllCiJob:y.isPassedAllCiJob,isCiStateSuccess:y.isCiStateSuccess,isBranchOutOfDate:y.isBranchOutOfDate,missingRequiredCheckNames:y.missingRequiredCheckNames}),!e.isPr&&S.map(e=>(0,x.jsxs)(`span`,{className:`console-related-pr-group`,children:[S.length>1&&(0,x.jsx)(`span`,{className:`console-related-pr-label`,children:P(e.pullRequest.url)}),(0,x.jsx)(Mu,{isPassedAllCiJob:e.pullRequest.isPassedAllCiJob,isCiStateSuccess:e.pullRequest.isCiStateSuccess,isBranchOutOfDate:e.pullRequest.isBranchOutOfDate,missingRequiredCheckNames:e.pullRequest.missingRequiredCheckNames}),(0,x.jsx)(Au,{mergeableStatus:e.pullRequest.mergeableStatus})]},e.pullRequest.url)),I.map(e=>(0,x.jsx)(Au,{mergeableStatus:e.mergeableStatus},e.url)),k!==null&&(0,x.jsx)(`span`,{className:`console-detail-closed-label`,children:k})]}),(0,x.jsx)(Ou,{failures:F}),(0,x.jsxs)(`div`,{className:`console-detail-subbar`,children:[(0,x.jsxs)(`a`,{href:e.url,className:`console-detail-link`,target:`_blank`,rel:`noopener noreferrer`,children:[`#`,e.number]}),(0,x.jsx)(`span`,{className:`console-detail-repo`,children:e.repo}),(0,x.jsxs)(`span`,{className:`console-detail-createdat`,title:he(e.createdAt),children:[`opened `,me(e.createdAt,w)]}),(0,x.jsx)(Tu,{url:e.url}),e.labels.map(e=>(0,x.jsx)(`span`,{className:`console-label-chip`,children:e},e))]})]}),(0,x.jsxs)(`div`,{className:`console-detail-body`,children:[(0,x.jsx)(nu,{title:`Description`,headerAction:(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),children:c===null?s?(0,x.jsx)(`p`,{className:`console-detail-body-loading`,children:`Loading description...`}):(0,x.jsx)(tu,{body:o,buildImageProxyUrl:D,renderReferenceLink:O,repoContext:A}):(0,x.jsx)(`p`,{className:`console-detail-body-notloaded`,children:`Not loaded.`})}),e.isPr&&(0,x.jsx)(nu,{title:`Changed files`,count:M,children:(0,x.jsx)(bu,{files:f,isLoading:p,error:m,onAddInlineComment:ee})}),(0,x.jsx)(nu,{title:`Comments`,count:N,defaultCollapsed:e.isPr,children:(0,x.jsx)(xu,{comments:l,isLoading:u,error:d,now:w,buildImageProxyUrl:D,renderReferenceLink:O,repoContext:A})}),e.isPr&&(0,x.jsx)(nu,{title:`Commits`,count:oe,defaultCollapsed:!0,children:(0,x.jsx)(wu,{commits:h,isLoading:g,error:_,now:w})}),!e.isPr&&S.map(e=>(0,x.jsx)(Nu,{pullRequest:e.pullRequest,body:e.pullRequest.summary?.body??``,bodyIsLoading:!1,files:e.files,filesAreLoading:e.filesAreLoading,filesError:e.filesError,commits:e.commits,commitsAreLoading:e.commitsAreLoading,commitsError:e.commitsError,now:w,buildImageProxyUrl:D,renderReferenceLink:O,onAddInlineComment:ee},e.pullRequest.url))]}),(0,x.jsxs)(`div`,{className:`console-detail-dock`,children:[(0,x.jsx)(`div`,{className:`console-detail-dock-composer`,children:T}),(0,x.jsx)(`div`,{className:`console-actionbar`,children:E})]})]})},Fu=({onClose:e})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close_not_planned`),children:`Close as not planned`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close`),children:`Close`})]}),Iu=({onDeleteAllComments:e})=>{let[t,n]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>n(e=>!e),children:`⚠`}),t&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>{e(),n(!1)},children:`Delete All Comments`})]})},Lu=({isManualTriage:e,onSetNextActionDate:t})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1hour`),children:`+1 hour`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3hours`),children:`+3 hours`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1day`),children:`+1 day`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1week`),children:e?`+1 week and skip`:`+1 week`})]}),Ru=[{action:`unnecessary`,label:`Unnecessary`,variant:`unneeded`},{action:`totally_wrong`,label:`Totally wrong`,variant:`wrong`},{action:`request_changes`,label:`Reject`,variant:`reject`},{action:`approve_and_merge`,label:`Approve & Merge`,variant:`approve`}],zu=`Reject needs an inline comment on the diff.`,Bu=({onReview:e,rejectEnabled:t})=>(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-review`,children:[!t&&(0,x.jsx)(`p`,{className:`console-op-requirement`,children:zu}),Ru.map(n=>{let r=n.action===`request_changes`&&!t;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-${n.variant}`,disabled:r,onClick:()=>e(n.action),children:n.label},n.action)})]}),Vu=({onSetDependedIssueUrl:e})=>{let[t,n]=(0,y.useState)(!1),[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-rare-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{n(e=>!e),c(null)},title:`Rare actions`,children:`⋯`}),t&&e!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`input`,{type:`url`,className:`console-settings-modal-input`,placeholder:`Depended issue URL`,value:r,onChange:e=>i(e.target.value),disabled:a}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:async()=>{if(e!==null&&r.trim()!==``){o(!0),c(null);try{await e(r.trim()),i(``),n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to set depended issue URL`)}finally{o(!1)}}},disabled:a||r.trim()===``,children:a?`...`:`Set Depended Issue`})]}),s!==null&&(0,x.jsx)(`p`,{className:`console-settings-modal-error`,children:s})]})},Hu=(e,t)=>{let n=t.toLowerCase();return e.find(e=>e.name.toLowerCase()===n)??null},Uu=({statusOptions:e,onSetStatus:t,onSetInTmuxByHuman:n})=>{let r=le.map(t=>({name:t,option:Hu(e,t)})).filter(e=>e.option!==null);return r.length===0?null:(0,x.jsx)(`div`,{className:`console-op-group`,children:r.map(({name:e,option:r})=>{let i=ae(r.color),a=e===se;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:i.fg,borderColor:i.border,backgroundColor:i.bg},onClick:()=>a?n(r):t(r),children:r.name},r.id)})})},Wu=({tab:e,hasPullRequest:t,rejectEnabled:n,statusOptions:r,handlers:i})=>(0,x.jsxs)(`div`,{className:`console-operation-bar`,children:[t&&(0,x.jsx)(Bu,{onReview:i.onReview,rejectEnabled:n}),(0,x.jsx)(Lu,{isManualTriage:ue(e),onSetNextActionDate:i.onSetNextActionDate}),(0,x.jsx)(Uu,{statusOptions:r,onSetStatus:i.onSetStatus,onSetInTmuxByHuman:i.onSetInTmuxByHuman}),(0,x.jsxs)(`div`,{className:`console-op-group-bottom-row`,children:[(0,x.jsxs)(`div`,{className:`console-op-group-left-pair`,children:[(0,x.jsx)(Vu,{onSetDependedIssueUrl:i.onSetDependedIssueUrl}),(0,x.jsx)(Iu,{onDeleteAllComments:i.onDeleteAllComments})]}),(0,x.jsx)(Fu,{onClose:i.onClose})]})]}),Gu=(e,t,n,r)=>{let i=t===null?void 0:e.peek(t),[a,o]=(0,y.useState)(i??r),[s,c]=(0,y.useState)(t!==null&&i===void 0),[l,u]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t===null||n===null)return;let r=e.peek(t);if(r!==void 0){o(r),c(!1),u(null);return}let i=!1;return c(!0),u(null),e.load(t,n).then(e=>{i||(o(e),c(!1))}).catch(e=>{i||(u(e instanceof Error?e.message:String(e)),c(!1))}),()=>{i=!0}},[e,t,n]),{data:a,isLoading:s,error:l}},Ku=[],qu=[],Ju=[],Yu=[],Xu={state:`open`,merged:!1,isPullRequest:!1,title:``},Zu={found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},Qu=(e,t)=>{let n=t===null?null:`${t.repo}#${t.number}`,r=t===null?null:t.url,i=t?.isPr??!1,a=Gu(e.body,n,r,``),o=Gu(e.state,n,r,Xu),s=Gu(e.comments,n,r,Ku),c=Gu(e.files,i?n:null,i?r:null,qu),l=Gu(e.commits,i?n:null,i?r:null,Ju),u=Gu(e.prStatus,i?n:null,i?r:null,Zu),d=!i&&(t?.relatedOpenPullRequestUrls.length??0)>0,f=Gu(e.relatedPrs,d?n:null,d?r:null,Yu),[p,m]=(0,y.useState)([]);return(0,y.useEffect)(()=>{if(i||f.data.length===0){m([]);return}let t=!1,n=f.data.map(e=>({pullRequest:e,files:qu,filesAreLoading:!0,filesError:null,commits:Ju,commitsAreLoading:!0,commitsError:null}));m(n);let r=(e,n)=>{t||m(t=>t.map(t=>t.pullRequest.url===e?{...t,...n}:t))};for(let t of f.data){let n=t.url;e.files.load(n,t.url).then(e=>r(t.url,{files:e,filesAreLoading:!1})).catch(e=>r(t.url,{filesAreLoading:!1,filesError:e instanceof Error?e.message:String(e)})),e.commits.load(n,t.url).then(e=>r(t.url,{commits:e,commitsAreLoading:!1})).catch(e=>r(t.url,{commitsAreLoading:!1,commitsError:e instanceof Error?e.message:String(e)}))}return()=>{t=!0}},[e,i,f.data]),{state:o.data,body:a.data,bodyIsLoading:a.isLoading,bodyError:a.error,comments:s.data,commentsAreLoading:s.isLoading,commentsError:s.error,files:c.data,filesAreLoading:c.isLoading,filesError:c.error,commits:l.data,commitsAreLoading:l.isLoading,commitsError:l.error,stateError:o.error,pullRequestStatus:i?u.data:null,pullRequestStatusError:i?u.error:null,relatedPullRequests:p,relatedPullRequestsError:i?null:f.error}},$u=e=>JSON.stringify([e.author,e.createdAt,e.body]),ed=(e,t)=>{let n=new Set(e.map($u));return[...e,...t.filter(e=>!n.has($u(e)))]},td=({href:e,fallbackText:t,state:n})=>{if(n===null||n.title.trim()===``)return(0,x.jsx)(`a`,{className:`console-markdown-reference console-markdown-reference-plain`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t});let r=ao(e);return(0,x.jsxs)(`a`,{className:`console-markdown-reference`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:[(0,x.jsx)(ve,{...so(n)}),(0,x.jsx)(`span`,{className:`console-markdown-reference-title`,children:n.title}),r!==null&&(0,x.jsxs)(`span`,{className:`console-markdown-reference-number`,children:[`#`,r.number]})]})},nd=(e,t)=>{let[n,r]=(0,y.useState)(()=>e.peek(t)??null);return(0,y.useEffect)(()=>{let n=e.peek(t);if(n!==void 0){r(n);return}let i=!1;return r(null),e.load(t,t).then(e=>{i||r(e)}).catch(()=>{i||r(null)}),()=>{i=!0}},[e,t]),n},rd=({cache:e,href:t,fallbackText:n})=>{let r=nd(e,t);return(0,x.jsx)(td,{href:t,fallbackText:n,state:r})},id=e=>({itemUrl:e.url,projectItemId:e.projectItemId,itemNumber:e.number,repo:e.repo,isPr:e.isPr}),ad=(e,t,n,r,i)=>({...id(t),apiPath:ea,requestBody:ra(e,t,n,r,i)}),od=(e,t,n,r)=>({...id(t),apiPath:ta,requestBody:ia(e,t,n,r)}),sd=(e,t)=>({...id(t),apiPath:na,requestBody:aa(e,t)}),cd=({tab:e,item:t,caches:n,operations:r,pjcode:i,statusOptions:a,storyColors:o,storyName:s,overlayStatus:c,now:l,initialCommentDraft:u,onCommentDraftChange:d,onQueueAction:f})=>{let p=Qu(n,t),m=(0,y.useCallback)(e=>lo(e,t.url),[t.url]),h=(0,y.useCallback)((e,t)=>(0,x.jsx)(rd,{cache:n.state,href:e,fallbackText:t}),[n.state]),g=t.isPr||t.relatedOpenPullRequestUrls.length>0||p.relatedPullRequests.length>0,[_,v]=(0,y.useState)([]),b=(0,y.useCallback)(async(e,t,n,r)=>{v(i=>[...i,{path:e,line:t,side:n,body:r}])},[]),[S,C]=(0,y.useState)([]),w=(0,y.useCallback)(async e=>{let n=await r.addComment(t,e);return C(e=>[...e,n]),n},[t,r]),T={onReview:e=>{let n=t.isPr?t.url:p.relatedPullRequests[0]?.pullRequest.url??t.relatedOpenPullRequestUrls[0]??t.url,a=e===`request_changes`?_:[];f({kind:{type:`review`,action:e},item:t,commit:()=>r.reviewPullRequest(t,n,e,a),offline:i==null?void 0:ad(i,t,n,e,a)})},onSetNextActionDate:e=>{f({kind:{type:`next_action_date`,action:e},item:t,commit:()=>r.setNextActionDate(t,e),offline:i==null?void 0:od(i,t,e)})},onSetStory:e=>{f({kind:{type:`set_story`,optionName:e.name},item:t,commit:()=>r.setStory(t,e),offline:i==null?void 0:od(i,t,`set_story`,{storyOptionId:e.id})})},onSetStatus:e=>{f({kind:{type:`set_status`,optionName:e.name},item:t,commit:()=>r.setStatus(t,e),offline:i==null?void 0:od(i,t,`set_status`,{statusName:e.name})})},onSetInTmuxByHuman:e=>{f({kind:{type:`set_in_tmux_by_human`,optionName:e.name},item:t,commit:()=>r.setInTmuxByHuman(t,e),offline:i==null?void 0:sd(i,t)})},onClose:e=>{f({kind:{type:`close`,action:e},item:t,commit:()=>r.closeIssue(t,e),offline:i==null?void 0:od(i,t,e)})},onOkAndAwaitingWorkspace:e=>{f({kind:{type:`ok_and_awaiting_workspace`},item:t,commit:()=>r.okAndMoveToAwaitingWorkspace(t,e)})},onDeleteAllComments:()=>{f({kind:{type:`delete_all_comments`},item:t,commit:()=>r.deleteAllComments(t)})},onSetDependedIssueUrl:i==null?null:async e=>{await r.setDependedIssueUrl(t,e)}},E=a.find(e=>e.name===`Awaiting Workspace`)??null,D=E===null?void 0:async e=>{let t=await w(e);return d?.(``),T.onSetStatus(E),t},O=s??(t.story.trim()===``?null:t.story),ee=O===null?null:A(o,O);return(0,x.jsx)(Pu,{item:t,storyName:O,storyColorEnum:ee,overlayStatus:c,statusOptions:a,state:p.state,stateError:p.stateError,body:p.body,bodyIsLoading:p.bodyIsLoading,bodyError:p.bodyError,comments:ed(p.comments,S),commentsAreLoading:p.commentsAreLoading,commentsError:p.commentsError,files:p.files,filesAreLoading:p.filesAreLoading,filesError:p.filesError,commits:p.commits,commitsAreLoading:p.commitsAreLoading,commitsError:p.commitsError,pullRequestStatus:p.pullRequestStatus,pullRequestStatusError:p.pullRequestStatusError,relatedPullRequests:p.relatedPullRequests,relatedPullRequestsError:p.relatedPullRequestsError,now:l,buildImageProxyUrl:m,renderReferenceLink:h,onAddInlineComment:b,commentComposer:(0,x.jsx)(ro,{initiallyOpen:!0,initialDraft:u,onSubmit:w,onDraftChange:d,onOkAndAwaitingWorkspace:E===null?void 0:()=>T.onOkAndAwaitingWorkspace(E),onSubmitAndMoveToAwaitingWorkspace:D,onUploadFile:e=>r.uploadAttachment(t,e)}),operationBar:(0,x.jsx)(Wu,{tab:e,item:t,hasPullRequest:g,rejectEnabled:_.length>0,statusOptions:a,handlers:T})})},ld=()=>{let e={};for(let t of D)e[t.name]=0;return e},ud=`console`,dd=()=>{let e=pa(),t=zi(),n=yr(),r=n.status===`on`?n.snapshot:null,{snapshots:i,isLoading:a,error:o}=Va(e,r),{timerMode:s,projectMinutes:c,isOpen:l,draftTimerMode:u,draftProjectMinutes:d,openSettings:f,closeSettings:p,saveSettings:m,toggleDraftTimerMode:h,changeDraftMinutes:g}=qa(),{pjcodes:_,workflowImprovementIssueUrl:v,isLoading:b}=ma(),{isTimerExpired:C}=ga(e),w=da(e??ud),E=ha(e),O=(0,y.useMemo)(()=>{let e=ld();for(let t of D){let n=i[t.name];n!==null&&(t.name===`stories`?e[t.name]=n.stories.filter(e=>e.color!==`GRAY`).length:e[t.name]=Yi(n.items,Zi(w.overlay,n.generatedAt),t.name))}return e},[i,w.overlay]),ee=Gi(e,O),{activeTab:k,selectedItemKey:A,openItem:ie,closeItem:M,selectTab:ae}=ee,N=(0,y.useRef)(new Map),oe=(0,y.useCallback)(e=>{A!==null&&(e?N.current.set(A,e):N.current.delete(A))},[A]),P=ji(r),F=sa(e,k,w,P),I=ki(),[se,ce]=(0,y.useState)(()=>Date.now());(0,y.useEffect)(()=>{let e=setInterval(()=>{ce(Date.now())},1e3);return()=>{clearInterval(e)}},[]);let[le,ue]=(0,y.useState)(()=>navigator.onLine);(0,y.useEffect)(()=>{let e=()=>ue(!0),t=()=>ue(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let[de,L]=(0,y.useState)(new Map),[fe,R]=(0,y.useState)(new Map),[pe,me]=(0,y.useState)(new Set);(0,y.useEffect)(()=>{if(!(!le||I.offlineActions.length===0))for(let e of I.offlineActions)de.has(e.id)||pe.has(e.id)||(L(t=>new Map(t).set(e.id,null)),P.client.fetchIssueState(e.itemUrl).then(t=>{L(n=>new Map(n).set(e.id,t)),e.isPr&&(R(t=>new Map(t).set(e.id,null)),P.client.fetchPullRequestStatus(e.itemUrl).then(t=>{R(n=>new Map(n).set(e.id,t))}).catch(e=>{console.warn(`Failed to fetch PR status for offline action:`,e)}))}).catch(t=>{console.warn(`Failed to fetch current state for offline action:`,t),me(t=>new Set(t).add(e.id))}))},[le,I.offlineActions,P.client,de,pe]);let[he,ge]=(0,y.useState)(!1),_e=(0,y.useCallback)(async e=>{ge(!0);try{await I.confirmOfflineAction(e)}finally{ge(!1)}},[I]),ve=(0,y.useMemo)(()=>I.offlineActions.map(e=>{let t=de.get(e.id)??null,n=fe.get(e.id)??null,r=pe.has(e.id);return{id:e.id,message:e.message,color:e.color,itemNumber:e.itemNumber,isPr:e.isPr,currentTitle:r?null:t?.title??null,currentState:r||t===null?null:t.merged?`closed`:t.state,currentPrStatus:n,fetchError:r}}),[I.offlineActions,de,fe,pe]),ye=i[k],be=(0,y.useMemo)(()=>ye===null?[]:Xi(ye.items,Zi(w.overlay,ye.generatedAt),k),[ye,w.overlay,k]),[Ce,we]=(0,y.useState)(null),Ee=(0,y.useMemo)(()=>k!==`prs`||Ce===null?be:be.filter(e=>e.agent===Ce),[be,k,Ce]),De=(0,y.useMemo)(()=>Ee.map(e=>qi(e)),[Ee]),Oe=ye?.storyOrder??[],ke=(0,y.useMemo)(()=>j(Ee,w.overlay,Oe,ye?.generatedAt??null),[Ee,w.overlay,Oe,ye]),Ae=ye?.storyColors??{},je=ye?.statusOptions??[],Me=ye?.agentOptions??[],Ne=ye?.generatedAt??null,Pe=ye?.fromCache??!1,[Fe,Ie]=(0,y.useState)(null),Le=(0,y.useMemo)(()=>A===null||ye===null?null:ye.items.find(e=>e.projectItemId===A)??null,[A,ye]);Li(P,Le,be),(0,y.useEffect)(()=>{A!==null&&window.scrollTo({top:0})},[A]),(0,y.useEffect)(()=>{if(e===null&&s&&_.length>0){let e=Ka(_,null,c);e!==null&&Ja(`/projects/${e}`)}},[e,s,_,c]);let Re=O[k],ze=(0,y.useRef)({tab:k,count:Re});(0,y.useEffect)(()=>{let e=ze.current;if(ze.current={tab:k,count:Re},e.tab===k&&e.count>0&&Re===0){let e=Bi(k,O);e!==null&&(ae(e),M())}},[k,Re,O,ae,M]);let Be=Le===null?null:Qi(w.overlay,Le,i[k]?.generatedAt??null),Ve=Le===null?null:re(Le,w.overlay,i[k]?.generatedAt??null),He=(0,y.useCallback)(e=>{let t=Xa(De,e);t===null?M():ie(t)},[De,ie,M]),Ue=(0,y.useCallback)(t=>{if(n.status===`on`){I.showError(`Airplane mode`,`This action requires a network connection. Turn off airplane mode and try again.`);return}let r=qi(t.item);I.enqueue({message:vi(t.kind,t.item,k),color:gi(t.kind),commit:t.commit,offline:t.offline,advance:()=>{if(_i(t.kind,k)){if(s&&C(c[e??``]??0)){let t=Ka(_,e,c);t!==null&&Ya(`/projects/${t}`)}else He(r)}}})},[I,k,He,n.status,s,C,c,e,_]),We=Ea((0,y.useCallback)(e=>{if(A===null||e===null)return;let t=e===`next`?Za(De,A):Qa(De,A);t!==null&&ie(t)},[A,De,ie])),[Ge,Ke]=(0,y.useState)(()=>localStorage.getItem(`console-story-show-gray`)===`true`),qe=(0,y.useCallback)(()=>{Ke(e=>{let t=!e;return localStorage.setItem(`console-story-show-gray`,String(t)),t})},[]),Je=i.stories,Ye=Je?.stories??[],Xe=Fe!==null&&Fe.generatedAt===Je?.generatedAt?Fe.stories:Ye,Ze=Je?.defaultNameWithOwner??null,Qe=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);if(Ze===null)throw Error(`No repository configured for this project.`);await Zr({pjcode:e,title:n,storyOptionId:t,nameWithOwner:Ze})},[e,Ze]),$e=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await $r({pjcode:e,storyOptionId:t,direction:n});let r=Xe.findIndex(e=>e.storyOptionId===t);if(r!==-1){let e=r+(n===`up`?-1:1);if(e>=0&&e<Xe.length){let t=[...Xe],n=t[r];t[r]=t[e],t[e]=n,Ie({generatedAt:Je?.generatedAt,stories:t})}}},[e,Xe,Je?.generatedAt]),et=(0,y.useCallback)(async t=>{if(e===null)throw Error(`No project specified in the URL path.`);await Gr({pjcode:e,storyName:t})},[e]),[tt,nt]=(0,y.useState)({}),[rt,it]=(0,y.useState)(null),[at,ot]=(0,y.useState)({}),st=(0,y.useCallback)((t,n)=>{let r=Xe.find(e=>e.storyOptionId===t)?.color;if(it(t),nt(e=>({...e,[t]:n})),ot(e=>{let n={...e};return delete n[t],n}),e===null||Ze===null){nt(e=>r===void 0?e:{...e,[t]:r}),ot(e=>({...e,[t]:`No project or repository configured.`})),it(e=>e===t?null:e);return}Xr({pjcode:e,storyOptionId:t,newColor:n,nameWithOwner:Ze}).catch(e=>{nt(e=>r===void 0?e:{...e,[t]:r}),ot(n=>({...n,[t]:e instanceof Error?e.message:String(e)}))}).finally(()=>{it(e=>e===t?null:e)})},[e,Ze,Xe]),ct=(0,y.useCallback)(async t=>{if(e===null)throw Error(`No project specified in the URL path.`);await ri({pjcode:e,storyOptionId:t}),Ie({generatedAt:Je?.generatedAt,stories:Xe.filter(e=>e.storyOptionId!==t)})},[e,Xe,Je?.generatedAt]),lt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await ai({pjcode:e,storyOptionId:t,newName:n});let r=Xe.map(e=>e.storyOptionId===t?{...e,storyName:n}:e);Ie({generatedAt:Je?.generatedAt,stories:r})},[e,Xe,Je?.generatedAt]),ut=Sa(be,P.comments,k===`prs`),dt=(0,y.useCallback)((e,t)=>{Ue({kind:{type:`ok_and_awaiting_workspace`},item:e,commit:()=>F.okAndMoveToAwaitingWorkspace(e,t)})},[Ue,F]);return(0,x.jsxs)(`main`,{className:`console-app`,children:[I.pending!==null&&(0,x.jsx)(Kn,{message:I.pending.message,color:I.pending.color,remainingSeconds:I.pending.remainingSeconds,progress:I.pending.progress,onUndo:I.undo}),I.error!==null&&(0,x.jsx)(qn,{title:I.error.message,message:`Operation failed: ${I.error.reason}`,onDismiss:I.dismissError}),(0,x.jsx)(Gn,{actions:ve,isOnline:le,isConfirming:he,onConfirm:_e,onDiscard:I.discardOfflineAction}),E.isOpen&&(0,x.jsx)(S,{value:E.inputValue,onChange:E.changeInput,isLoading:E.isLoading,isSaving:E.isSaving,error:E.error,onSave:E.save,onClose:E.close}),(0,x.jsx)(te,{activeTab:k,counts:O,pjcode:e,pjcodes:_,generatedAt:Ne,fromCache:Pe,tabHref:ee.tabHref,onSelectTab:ee.selectTab,onSelectProject:e=>Ya(`/projects/${e}`),settingsButton:(0,x.jsxs)(x.Fragment,{children:[e!==null&&(0,x.jsx)(`button`,{type:`button`,className:`console-tab-settings-button`,"aria-label":`Open project settings`,onClick:E.open,children:`⚙`}),(0,x.jsx)(ne,{isOpen:l,timerMode:u,projectMinutes:d,pjcodes:_,isLoadingPjcodes:b,onOpen:f,onToggleTimerMode:h,onChangeMinutes:g,onSave:m,onClose:p})]}),airplaneModeEnabled:t.airplaneMode,airplaneModeStatus:n.status,airplaneModeProgress:n.progress,airplaneModeCapturedAt:r?.capturedAt??null,airplaneModeFailures:n.failures,onAirplaneModeStartSync:n.startSync,onAirplaneModeTurnOff:n.turnOff,workflowImprovementIssueUrl:v}),(0,x.jsx)(T,{timerEndsAt:ye?.timerEndsAt??null,timerTotalSeconds:ye?.timerTotalSeconds??null,now:se}),k===`stories`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(Bn,{stories:Xe,isLoading:a,error:o,showGray:Ge,onCreateIssue:Qe,onAddStory:et,onSelectColor:st,onToggleGray:qe,onReorderStory:$e,onDeleteStory:ct,onRenameStory:lt,optimisticColors:tt,colorChangeInFlight:rt,colorErrors:at})}):Le===null?k===`queued`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(Te,{rows:ke,storyColors:Ae,statusOptions:je,agentOptions:Me,activeItemId:null,isLoading:a,error:o,onSelectItem:e=>ee.openItem(e.projectItemId)})}):k===`prs`?(0,x.jsxs)(`div`,{className:`console-list-screen`,children:[(0,x.jsx)(Se,{agentOptions:Me,selectedAgent:Ce,onAgentChange:we}),(0,x.jsx)(xe,{rows:ke,storyColors:Ae,statusOptions:je,activeItemId:null,now:se,isLoading:a,error:o,onSelectItem:e=>ee.openItem(e.projectItemId),executiveSummaries:ut,onOkAndAwaitingWorkspace:dt})]}):(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(xe,{rows:ke,storyColors:Ae,statusOptions:je,activeItemId:null,now:se,isLoading:a,error:o,onSelectItem:e=>ee.openItem(e.projectItemId)})}):(0,x.jsx)(`div`,{className:`console-detail-screen`,ref:We,children:(0,x.jsx)(cd,{tab:k,item:Le,caches:P,operations:F,pjcode:e,statusOptions:je,storyColors:Ae,storyName:Ve,overlayStatus:Be,now:se,initialCommentDraft:N.current.get(Le.projectItemId)??``,onCommentDraftChange:oe,onQueueAction:Ue},Le.projectItemId)})]})};`serviceWorker`in navigator&&navigator.serviceWorker.register(`/sw.js`).catch(e=>{console.warn(`Service worker registration failed:`,e)});var fd=document.getElementById(`root`);if(fd===null)throw Error(`Root container #root not found`);(0,b.createRoot)(fd).render((0,x.jsx)(y.StrictMode,{children:(0,x.jsx)(dd,{})}));
|
|
88
|
+
`)[0],wu=({commits:e,isLoading:t,error:n,now:r})=>n===null?t?(0,x.jsx)(`p`,{className:`console-commits-loading`,children:`Loading commits...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-commits-empty`,children:`No commits.`}):(0,x.jsx)(`ul`,{className:`console-commits`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-commit`,children:[(0,x.jsx)(`span`,{className:`console-commit-message`,children:Cu(e.message)}),(0,x.jsx)(`span`,{className:`console-commit-sha`,children:Su(e.sha)}),(0,x.jsx)(`span`,{className:`console-commit-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-commit-time`,children:me(e.authoredAt,r)})]},e.sha))}):(0,x.jsx)(`p`,{className:`console-commits-notloaded`,children:`Not loaded.`}),Tu=({url:e,label:t=`Copy URL`})=>(0,x.jsx)(Mn,{value:e,idleText:`Copy URL`,idleAriaLabel:t,copiedAriaLabel:`URL copied to clipboard`,className:`console-copy-url-button`}),Eu=e=>{let t=new Map;for(let n of e){let e=t.get(n.message);if(e===void 0){t.set(n.message,[n.section]);continue}e.push(n.section)}return Array.from(t,([e,t])=>({message:e,sections:t}))},Du=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`,Ou=({failures:e})=>e.length===0?null:(0,x.jsx)(`div`,{role:`alert`,className:`console-detail-fetch-error`,children:Eu(e).map(e=>(0,x.jsxs)(`p`,{className:`console-detail-fetch-error-line`,children:[`Failed to load `,Du(e.sections),`:`,` `,e.message]},e.message))}),ku={MERGEABLE:{color:`GREEN`,label:`No conflict`,title:`This pull request has no merge conflicts`,modifier:`console-detail-mergeable-chip-ok`},CONFLICTING:{color:`RED`,label:`Conflict`,title:`This pull request has merge conflicts`,modifier:`console-detail-mergeable-chip-conflict`},UNKNOWN:{color:`GRAY`,label:`Checking merge status`,title:`GitHub has not finished computing the merge status yet`,modifier:`console-detail-mergeable-chip-unknown`}},Au=({mergeableStatus:e})=>{let t=ku[e],n=ae(t.color);return(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-mergeable-chip ${t.modifier}`,style:{color:n.fg,borderColor:n.border,backgroundColor:n.bg},title:t.title,children:t.label})},ju=e=>{let t=ae(e);return{color:t.fg,borderColor:t.border,backgroundColor:t.bg}},Mu=({isPassedAllCiJob:e,isCiStateSuccess:t,isBranchOutOfDate:n,missingRequiredCheckNames:r})=>{let i=e&&t,a=i?`GREEN`:`RED`,o=i?`CI passing`:`CI failing`,s=!i&&r.length>0?`missing: ${r.join(`, `)}`:null;return(0,x.jsxs)(`span`,{className:`console-detail-pr-status`,children:[(0,x.jsxs)(`span`,{className:`console-detail-status-chip console-detail-ci-chip`,style:ju(a),title:s??o,children:[o,s!==null&&(0,x.jsxs)(`span`,{className:`console-detail-ci-missing`,children:[` `,`(`,s,`)`]})]}),n&&(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-outofdate-chip`,style:ju(`YELLOW`),title:`This branch is out of date with the base branch`,children:`Out of date`})]})},Nu=({pullRequest:e,body:t,bodyIsLoading:n,files:r,filesAreLoading:i,filesError:a,commits:o,commitsAreLoading:s,commitsError:c,now:l,buildImageProxyUrl:u,renderReferenceLink:d,onAddInlineComment:f})=>{let p=e.summary,m=ao(e.url),h=m===null?void 0:{owner:m.owner,repo:m.repo},g=i||a!==null?null:r.length,_=s||c!==null?null:o.length;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`console-pr-header`,children:[(0,x.jsx)(`a`,{href:e.url,className:`console-pr-section-title`,target:`_blank`,rel:`noopener noreferrer`,children:p?.title??e.url}),e.isDraft&&(0,x.jsx)(`span`,{className:`console-pr-section-state`,children:`draft`}),(0,x.jsx)(Au,{mergeableStatus:e.mergeableStatus}),(0,x.jsx)(Mu,{isPassedAllCiJob:e.isPassedAllCiJob,isCiStateSuccess:e.isCiStateSuccess,isBranchOutOfDate:e.isBranchOutOfDate,missingRequiredCheckNames:e.missingRequiredCheckNames}),(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),(0,x.jsx)(Tu,{url:e.url,label:`Copy PR URL`}),(0,x.jsxs)(`div`,{className:`console-pr-statbar`,children:[m!==null&&(0,x.jsxs)(`span`,{className:`console-pr-repo`,children:[m.owner,`/`,m.repo]}),e.branchName!==null&&(0,x.jsx)(`span`,{className:`console-pr-branch`,children:e.branchName}),p!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{className:`console-pr-add`,children:[`+`,p.additions]}),(0,x.jsxs)(`span`,{className:`console-pr-del`,children:[`-`,p.deletions]}),(0,x.jsxs)(`span`,{className:`console-pr-files-count`,children:[p.changedFiles,` files`]})]})]})]}),(0,x.jsx)(nu,{title:`Description`,children:n?(0,x.jsx)(`p`,{className:`console-pr-body-loading`,children:`Loading description...`}):(0,x.jsx)(tu,{body:p?.body??t,buildImageProxyUrl:u,renderReferenceLink:d,repoContext:h})}),(0,x.jsx)(nu,{title:`Changed files`,count:g,children:(0,x.jsx)(bu,{files:r,isLoading:i,error:a,buildImageProxyUrl:u,onAddInlineComment:f})}),(0,x.jsx)(nu,{title:`Commits`,count:_,defaultCollapsed:!0,children:(0,x.jsx)(wu,{commits:o,isLoading:s,error:c,now:l})})]})},Pu=({item:e,storyName:t,storyColorEnum:n,overlayStatus:r,statusOptions:i,state:a,body:o,bodyIsLoading:s,bodyError:c,comments:l,commentsAreLoading:u,commentsError:d,files:f,filesAreLoading:p,filesError:m,commits:h,commitsAreLoading:g,commitsError:_,stateError:v,pullRequestStatus:y,pullRequestStatusError:b,relatedPullRequests:S,relatedPullRequestsError:C,now:w,commentComposer:T,operationBar:E,buildImageProxyUrl:D,renderReferenceLink:O,onAddInlineComment:ee})=>{let te=a?.state??`open`,ne=a?.merged??!1,k=!e.isPr&&te===`closed`?`Closed`:null,A=oo(e.nameWithOwner)??void 0,re=ae(n),ie=r===null?e.status===null?null:{name:e.status,color:i.find(t=>t.name===e.status)?.color??`GRAY`}:r,j=ie===null?null:ae(ie.color),M=p||m!==null?null:f.length,N=u||d!==null?null:l.length,oe=g||_!==null?null:h.length,P=e=>{let t=ao(e);return t===null?e:`PR #${t.number}`},F=[{section:`item state`,message:v},{section:`pull request status`,message:e.isPr?b:null},{section:`description`,message:c},{section:`comments`,message:d},{section:`changed files`,message:e.isPr?m:null},{section:`commits`,message:e.isPr?_:null},{section:`related pull requests`,message:e.isPr?null:C},...S.flatMap(e=>[{section:`changed files of ${P(e.pullRequest.url)}`,message:e.filesError},{section:`commits of ${P(e.pullRequest.url)}`,message:e.commitsError}])].flatMap(e=>e.message===null?[]:[{section:e.section,message:e.message}]),I=e.isPr&&y?.found?[{url:e.url,mergeableStatus:y.mergeableStatus}]:[];return(0,x.jsxs)(`article`,{className:`console-detail`,children:[(0,x.jsxs)(`div`,{className:`console-detail-header`,children:[(0,x.jsxs)(`h2`,{className:`console-detail-title`,children:[(0,x.jsx)(ve,{isPr:e.isPr,state:te,merged:ne,isDraft:!1,stateReason:``}),(0,x.jsx)(`span`,{className:`console-detail-title-text`,children:e.title}),(0,x.jsx)(`span`,{className:`console-detail-number`,children:e.isPr?`PR #${e.number}`:`#${e.number}`})]}),(0,x.jsxs)(`div`,{className:`console-detail-topline`,children:[ie!==null&&j!==null&&(0,x.jsx)(`span`,{className:`console-detail-status-chip`,style:{color:j.fg,borderColor:j.border,backgroundColor:j.bg},children:ie.name}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-detail-agent-chip`,children:e.agent}),t!==null&&(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:re.dot}}),t]}),e.isPr&&y?.found&&(0,x.jsx)(Mu,{isPassedAllCiJob:y.isPassedAllCiJob,isCiStateSuccess:y.isCiStateSuccess,isBranchOutOfDate:y.isBranchOutOfDate,missingRequiredCheckNames:y.missingRequiredCheckNames}),!e.isPr&&S.map(e=>(0,x.jsxs)(`span`,{className:`console-related-pr-group`,children:[S.length>1&&(0,x.jsx)(`span`,{className:`console-related-pr-label`,children:P(e.pullRequest.url)}),(0,x.jsx)(Mu,{isPassedAllCiJob:e.pullRequest.isPassedAllCiJob,isCiStateSuccess:e.pullRequest.isCiStateSuccess,isBranchOutOfDate:e.pullRequest.isBranchOutOfDate,missingRequiredCheckNames:e.pullRequest.missingRequiredCheckNames}),(0,x.jsx)(Au,{mergeableStatus:e.pullRequest.mergeableStatus})]},e.pullRequest.url)),I.map(e=>(0,x.jsx)(Au,{mergeableStatus:e.mergeableStatus},e.url)),k!==null&&(0,x.jsx)(`span`,{className:`console-detail-closed-label`,children:k})]}),(0,x.jsx)(Ou,{failures:F}),(0,x.jsxs)(`div`,{className:`console-detail-subbar`,children:[(0,x.jsxs)(`a`,{href:e.url,className:`console-detail-link`,target:`_blank`,rel:`noopener noreferrer`,children:[`#`,e.number]}),(0,x.jsx)(`span`,{className:`console-detail-repo`,children:e.repo}),(0,x.jsxs)(`span`,{className:`console-detail-createdat`,title:he(e.createdAt),children:[`opened `,me(e.createdAt,w)]}),(0,x.jsx)(Tu,{url:e.url}),e.labels.map(e=>(0,x.jsx)(`span`,{className:`console-label-chip`,children:e},e))]})]}),(0,x.jsxs)(`div`,{className:`console-detail-body`,children:[(0,x.jsx)(nu,{title:`Description`,headerAction:(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),children:c===null?s?(0,x.jsx)(`p`,{className:`console-detail-body-loading`,children:`Loading description...`}):(0,x.jsx)(tu,{body:o,buildImageProxyUrl:D,renderReferenceLink:O,repoContext:A}):(0,x.jsx)(`p`,{className:`console-detail-body-notloaded`,children:`Not loaded.`})}),e.isPr&&(0,x.jsx)(nu,{title:`Changed files`,count:M,children:(0,x.jsx)(bu,{files:f,isLoading:p,error:m,onAddInlineComment:ee})}),(0,x.jsx)(nu,{title:`Comments`,count:N,defaultCollapsed:e.isPr,children:(0,x.jsx)(xu,{comments:l,isLoading:u,error:d,now:w,buildImageProxyUrl:D,renderReferenceLink:O,repoContext:A})}),e.isPr&&(0,x.jsx)(nu,{title:`Commits`,count:oe,defaultCollapsed:!0,children:(0,x.jsx)(wu,{commits:h,isLoading:g,error:_,now:w})}),!e.isPr&&S.map(e=>(0,x.jsx)(Nu,{pullRequest:e.pullRequest,body:e.pullRequest.summary?.body??``,bodyIsLoading:!1,files:e.files,filesAreLoading:e.filesAreLoading,filesError:e.filesError,commits:e.commits,commitsAreLoading:e.commitsAreLoading,commitsError:e.commitsError,now:w,buildImageProxyUrl:D,renderReferenceLink:O,onAddInlineComment:ee},e.pullRequest.url))]}),(0,x.jsxs)(`div`,{className:`console-detail-dock`,children:[(0,x.jsx)(`div`,{className:`console-detail-dock-composer`,children:T}),(0,x.jsx)(`div`,{className:`console-actionbar`,children:E})]})]})},Fu=({onClose:e})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close_not_planned`),children:`Close as not planned`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close`),children:`Close`})]}),Iu=({onDeleteAllComments:e})=>{let[t,n]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>n(e=>!e),children:`⚠`}),t&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>{e(),n(!1)},children:`Delete All Comments`})]})},Lu=({isManualTriage:e,onSetNextActionDate:t})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1hour`),children:`+1 hour`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3hours`),children:`+3 hours`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1day`),children:`+1 day`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1week`),children:e?`+1 week and skip`:`+1 week`})]}),Ru=[{action:`unnecessary`,label:`Unnecessary`,variant:`unneeded`},{action:`totally_wrong`,label:`Totally wrong`,variant:`wrong`},{action:`request_changes`,label:`Reject`,variant:`reject`},{action:`approve_and_merge`,label:`Approve & Merge`,variant:`approve`}],zu=`Reject needs an inline comment on the diff.`,Bu=({onReview:e,rejectEnabled:t})=>(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-review`,children:[!t&&(0,x.jsx)(`p`,{className:`console-op-requirement`,children:zu}),Ru.map(n=>{let r=n.action===`request_changes`&&!t;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-${n.variant}`,disabled:r,onClick:()=>e(n.action),children:n.label},n.action)})]}),Vu=({onSetDependedIssueUrl:e})=>{let[t,n]=(0,y.useState)(!1),[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-rare-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{n(e=>!e),c(null)},title:`Rare actions`,children:`⋯`}),t&&e!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`input`,{type:`url`,className:`console-settings-modal-input`,placeholder:`Depended issue URL`,value:r,onChange:e=>i(e.target.value),disabled:a}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:async()=>{if(e!==null&&r.trim()!==``){o(!0),c(null);try{await e(r.trim()),i(``),n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to set depended issue URL`)}finally{o(!1)}}},disabled:a||r.trim()===``,children:a?`...`:`Set Depended Issue`})]}),s!==null&&(0,x.jsx)(`p`,{className:`console-settings-modal-error`,children:s})]})},Hu=(e,t)=>{let n=t.toLowerCase();return e.find(e=>e.name.toLowerCase()===n)??null},Uu=({statusOptions:e,onSetStatus:t,onSetInTmuxByHuman:n})=>{let r=le.map(t=>({name:t,option:Hu(e,t)})).filter(e=>e.option!==null);return r.length===0?null:(0,x.jsx)(`div`,{className:`console-op-group`,children:r.map(({name:e,option:r})=>{let i=ae(r.color),a=e===se;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:i.fg,borderColor:i.border,backgroundColor:i.bg},onClick:()=>a?n(r):t(r),children:r.name},r.id)})})},Wu=({tab:e,hasPullRequest:t,rejectEnabled:n,statusOptions:r,handlers:i})=>(0,x.jsxs)(`div`,{className:`console-operation-bar`,children:[t&&(0,x.jsx)(Bu,{onReview:i.onReview,rejectEnabled:n}),(0,x.jsx)(Lu,{isManualTriage:ue(e),onSetNextActionDate:i.onSetNextActionDate}),(0,x.jsx)(Uu,{statusOptions:r,onSetStatus:i.onSetStatus,onSetInTmuxByHuman:i.onSetInTmuxByHuman}),(0,x.jsxs)(`div`,{className:`console-op-group-bottom-row`,children:[(0,x.jsxs)(`div`,{className:`console-op-group-left-pair`,children:[(0,x.jsx)(Vu,{onSetDependedIssueUrl:i.onSetDependedIssueUrl}),(0,x.jsx)(Iu,{onDeleteAllComments:i.onDeleteAllComments})]}),(0,x.jsx)(Fu,{onClose:i.onClose})]})]}),Gu=(e,t,n,r)=>{let i=t===null?void 0:e.peek(t),[a,o]=(0,y.useState)(i??r),[s,c]=(0,y.useState)(t!==null&&i===void 0),[l,u]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t===null||n===null)return;let r=e.peek(t);if(r!==void 0){o(r),c(!1),u(null);return}let i=!1;return c(!0),u(null),e.load(t,n).then(e=>{i||(o(e),c(!1))}).catch(e=>{i||(u(e instanceof Error?e.message:String(e)),c(!1))}),()=>{i=!0}},[e,t,n]),{data:a,isLoading:s,error:l}},Ku=[],qu=[],Ju=[],Yu=[],Xu={state:`open`,merged:!1,isPullRequest:!1,title:``},Zu={found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},Qu=(e,t,n)=>{let r=t===null?null:`${t.repo}#${t.number}`,i=t===null?null:t.url,a=t?.isPr??!1,o=Gu(e.body,r,i,``),s=Gu(e.state,r,i,Xu),c=Gu(e.comments,r,i,Ku),l=Gu(e.files,a?r:null,a?i:null,qu),u=Gu(e.commits,a?r:null,a?i:null,Ju),d=Gu(e.prStatus,a?r:null,a?i:null,Zu),f=!a&&((t?.relatedOpenPullRequestUrls.length??0)>0||n===`prs`),p=Gu(e.relatedPrs,f?r:null,f?i:null,Yu),[m,h]=(0,y.useState)([]);return(0,y.useEffect)(()=>{if(a||p.data.length===0){h([]);return}let t=!1,n=p.data.map(e=>({pullRequest:e,files:qu,filesAreLoading:!0,filesError:null,commits:Ju,commitsAreLoading:!0,commitsError:null}));h(n);let r=(e,n)=>{t||h(t=>t.map(t=>t.pullRequest.url===e?{...t,...n}:t))};for(let t of p.data){let n=t.url;e.files.load(n,t.url).then(e=>r(t.url,{files:e,filesAreLoading:!1})).catch(e=>r(t.url,{filesAreLoading:!1,filesError:e instanceof Error?e.message:String(e)})),e.commits.load(n,t.url).then(e=>r(t.url,{commits:e,commitsAreLoading:!1})).catch(e=>r(t.url,{commitsAreLoading:!1,commitsError:e instanceof Error?e.message:String(e)}))}return()=>{t=!0}},[e,a,p.data]),{state:s.data,body:o.data,bodyIsLoading:o.isLoading,bodyError:o.error,comments:c.data,commentsAreLoading:c.isLoading,commentsError:c.error,files:l.data,filesAreLoading:l.isLoading,filesError:l.error,commits:u.data,commitsAreLoading:u.isLoading,commitsError:u.error,stateError:s.error,pullRequestStatus:a?d.data:null,pullRequestStatusError:a?d.error:null,relatedPullRequests:m,relatedPullRequestsError:a?null:p.error}},$u=e=>JSON.stringify([e.author,e.createdAt,e.body]),ed=(e,t)=>{let n=new Set(e.map($u));return[...e,...t.filter(e=>!n.has($u(e)))]},td=({href:e,fallbackText:t,state:n})=>{if(n===null||n.title.trim()===``)return(0,x.jsx)(`a`,{className:`console-markdown-reference console-markdown-reference-plain`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t});let r=ao(e);return(0,x.jsxs)(`a`,{className:`console-markdown-reference`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:[(0,x.jsx)(ve,{...so(n)}),(0,x.jsx)(`span`,{className:`console-markdown-reference-title`,children:n.title}),r!==null&&(0,x.jsxs)(`span`,{className:`console-markdown-reference-number`,children:[`#`,r.number]})]})},nd=(e,t)=>{let[n,r]=(0,y.useState)(()=>e.peek(t)??null);return(0,y.useEffect)(()=>{let n=e.peek(t);if(n!==void 0){r(n);return}let i=!1;return r(null),e.load(t,t).then(e=>{i||r(e)}).catch(()=>{i||r(null)}),()=>{i=!0}},[e,t]),n},rd=({cache:e,href:t,fallbackText:n})=>{let r=nd(e,t);return(0,x.jsx)(td,{href:t,fallbackText:n,state:r})},id=e=>({itemUrl:e.url,projectItemId:e.projectItemId,itemNumber:e.number,repo:e.repo,isPr:e.isPr}),ad=(e,t,n,r,i)=>({...id(t),apiPath:ea,requestBody:ra(e,t,n,r,i)}),od=(e,t,n,r)=>({...id(t),apiPath:ta,requestBody:ia(e,t,n,r)}),sd=(e,t)=>({...id(t),apiPath:na,requestBody:aa(e,t)}),cd=({tab:e,item:t,caches:n,operations:r,pjcode:i,statusOptions:a,storyColors:o,storyName:s,overlayStatus:c,now:l,initialCommentDraft:u,onCommentDraftChange:d,onQueueAction:f})=>{let p=Qu(n,t,e),m=(0,y.useCallback)(e=>lo(e,t.url),[t.url]),h=(0,y.useCallback)((e,t)=>(0,x.jsx)(rd,{cache:n.state,href:e,fallbackText:t}),[n.state]),g=t.isPr||t.relatedOpenPullRequestUrls.length>0||p.relatedPullRequests.length>0,[_,v]=(0,y.useState)([]),b=(0,y.useCallback)(async(e,t,n,r)=>{v(i=>[...i,{path:e,line:t,side:n,body:r}])},[]),[S,C]=(0,y.useState)([]),w=(0,y.useCallback)(async e=>{let n=await r.addComment(t,e);return C(e=>[...e,n]),n},[t,r]),T={onReview:e=>{let n=t.isPr?t.url:p.relatedPullRequests[0]?.pullRequest.url??t.relatedOpenPullRequestUrls[0]??t.url,a=e===`request_changes`?_:[];f({kind:{type:`review`,action:e},item:t,commit:()=>r.reviewPullRequest(t,n,e,a),offline:i==null?void 0:ad(i,t,n,e,a)})},onSetNextActionDate:e=>{f({kind:{type:`next_action_date`,action:e},item:t,commit:()=>r.setNextActionDate(t,e),offline:i==null?void 0:od(i,t,e)})},onSetStory:e=>{f({kind:{type:`set_story`,optionName:e.name},item:t,commit:()=>r.setStory(t,e),offline:i==null?void 0:od(i,t,`set_story`,{storyOptionId:e.id})})},onSetStatus:e=>{f({kind:{type:`set_status`,optionName:e.name},item:t,commit:()=>r.setStatus(t,e),offline:i==null?void 0:od(i,t,`set_status`,{statusName:e.name})})},onSetInTmuxByHuman:e=>{f({kind:{type:`set_in_tmux_by_human`,optionName:e.name},item:t,commit:()=>r.setInTmuxByHuman(t,e),offline:i==null?void 0:sd(i,t)})},onClose:e=>{f({kind:{type:`close`,action:e},item:t,commit:()=>r.closeIssue(t,e),offline:i==null?void 0:od(i,t,e)})},onOkAndAwaitingWorkspace:e=>{f({kind:{type:`ok_and_awaiting_workspace`},item:t,commit:()=>r.okAndMoveToAwaitingWorkspace(t,e)})},onDeleteAllComments:()=>{f({kind:{type:`delete_all_comments`},item:t,commit:()=>r.deleteAllComments(t)})},onSetDependedIssueUrl:i==null?null:async e=>{await r.setDependedIssueUrl(t,e)}},E=a.find(e=>e.name===`Awaiting Workspace`)??null,D=E===null?void 0:async e=>{let t=await w(e);return d?.(``),T.onSetStatus(E),t},O=s??(t.story.trim()===``?null:t.story),ee=O===null?null:A(o,O);return(0,x.jsx)(Pu,{item:t,storyName:O,storyColorEnum:ee,overlayStatus:c,statusOptions:a,state:p.state,stateError:p.stateError,body:p.body,bodyIsLoading:p.bodyIsLoading,bodyError:p.bodyError,comments:ed(p.comments,S),commentsAreLoading:p.commentsAreLoading,commentsError:p.commentsError,files:p.files,filesAreLoading:p.filesAreLoading,filesError:p.filesError,commits:p.commits,commitsAreLoading:p.commitsAreLoading,commitsError:p.commitsError,pullRequestStatus:p.pullRequestStatus,pullRequestStatusError:p.pullRequestStatusError,relatedPullRequests:p.relatedPullRequests,relatedPullRequestsError:p.relatedPullRequestsError,now:l,buildImageProxyUrl:m,renderReferenceLink:h,onAddInlineComment:b,commentComposer:(0,x.jsx)(ro,{initiallyOpen:!0,initialDraft:u,onSubmit:w,onDraftChange:d,onOkAndAwaitingWorkspace:E===null?void 0:()=>T.onOkAndAwaitingWorkspace(E),onSubmitAndMoveToAwaitingWorkspace:D,onUploadFile:e=>r.uploadAttachment(t,e)}),operationBar:(0,x.jsx)(Wu,{tab:e,item:t,hasPullRequest:g,rejectEnabled:_.length>0,statusOptions:a,handlers:T})})},ld=()=>{let e={};for(let t of D)e[t.name]=0;return e},ud=`console`,dd=()=>{let e=pa(),t=zi(),n=yr(),r=n.status===`on`?n.snapshot:null,{snapshots:i,isLoading:a,error:o}=Va(e,r),{timerMode:s,projectMinutes:c,isOpen:l,draftTimerMode:u,draftProjectMinutes:d,openSettings:f,closeSettings:p,saveSettings:m,toggleDraftTimerMode:h,changeDraftMinutes:g}=qa(),{pjcodes:_,workflowImprovementIssueUrl:v,isLoading:b}=ma(),{isTimerExpired:C}=ga(e),w=da(e??ud),E=ha(e),O=(0,y.useMemo)(()=>{let e=ld();for(let t of D){let n=i[t.name];n!==null&&(t.name===`stories`?e[t.name]=n.stories.filter(e=>e.color!==`GRAY`).length:e[t.name]=Yi(n.items,Zi(w.overlay,n.generatedAt),t.name))}return e},[i,w.overlay]),ee=Gi(e,O),{activeTab:k,selectedItemKey:A,openItem:ie,closeItem:M,selectTab:ae}=ee,N=(0,y.useRef)(new Map),oe=(0,y.useCallback)(e=>{A!==null&&(e?N.current.set(A,e):N.current.delete(A))},[A]),P=ji(r),F=sa(e,k,w,P),I=ki(),[se,ce]=(0,y.useState)(()=>Date.now());(0,y.useEffect)(()=>{let e=setInterval(()=>{ce(Date.now())},1e3);return()=>{clearInterval(e)}},[]);let[le,ue]=(0,y.useState)(()=>navigator.onLine);(0,y.useEffect)(()=>{let e=()=>ue(!0),t=()=>ue(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let[de,L]=(0,y.useState)(new Map),[fe,R]=(0,y.useState)(new Map),[pe,me]=(0,y.useState)(new Set);(0,y.useEffect)(()=>{if(!(!le||I.offlineActions.length===0))for(let e of I.offlineActions)de.has(e.id)||pe.has(e.id)||(L(t=>new Map(t).set(e.id,null)),P.client.fetchIssueState(e.itemUrl).then(t=>{L(n=>new Map(n).set(e.id,t)),e.isPr&&(R(t=>new Map(t).set(e.id,null)),P.client.fetchPullRequestStatus(e.itemUrl).then(t=>{R(n=>new Map(n).set(e.id,t))}).catch(e=>{console.warn(`Failed to fetch PR status for offline action:`,e)}))}).catch(t=>{console.warn(`Failed to fetch current state for offline action:`,t),me(t=>new Set(t).add(e.id))}))},[le,I.offlineActions,P.client,de,pe]);let[he,ge]=(0,y.useState)(!1),_e=(0,y.useCallback)(async e=>{ge(!0);try{await I.confirmOfflineAction(e)}finally{ge(!1)}},[I]),ve=(0,y.useMemo)(()=>I.offlineActions.map(e=>{let t=de.get(e.id)??null,n=fe.get(e.id)??null,r=pe.has(e.id);return{id:e.id,message:e.message,color:e.color,itemNumber:e.itemNumber,isPr:e.isPr,currentTitle:r?null:t?.title??null,currentState:r||t===null?null:t.merged?`closed`:t.state,currentPrStatus:n,fetchError:r}}),[I.offlineActions,de,fe,pe]),ye=i[k],be=(0,y.useMemo)(()=>ye===null?[]:Xi(ye.items,Zi(w.overlay,ye.generatedAt),k),[ye,w.overlay,k]),[Ce,we]=(0,y.useState)(null),Ee=(0,y.useMemo)(()=>k!==`prs`||Ce===null?be:be.filter(e=>e.agent===Ce),[be,k,Ce]),De=(0,y.useMemo)(()=>Ee.map(e=>qi(e)),[Ee]),Oe=ye?.storyOrder??[],ke=(0,y.useMemo)(()=>j(Ee,w.overlay,Oe,ye?.generatedAt??null),[Ee,w.overlay,Oe,ye]),Ae=ye?.storyColors??{},je=ye?.statusOptions??[],Me=ye?.agentOptions??[],Ne=ye?.generatedAt??null,Pe=ye?.fromCache??!1,[Fe,Ie]=(0,y.useState)(null),Le=(0,y.useMemo)(()=>A===null||ye===null?null:ye.items.find(e=>e.projectItemId===A)??null,[A,ye]);Li(P,Le,be),(0,y.useEffect)(()=>{A!==null&&window.scrollTo({top:0})},[A]),(0,y.useEffect)(()=>{if(e===null&&s&&_.length>0){let e=Ka(_,null,c);e!==null&&Ja(`/projects/${e}`)}},[e,s,_,c]);let Re=O[k],ze=(0,y.useRef)({tab:k,count:Re});(0,y.useEffect)(()=>{let e=ze.current;if(ze.current={tab:k,count:Re},e.tab===k&&e.count>0&&Re===0){let e=Bi(k,O);e!==null&&(ae(e),M())}},[k,Re,O,ae,M]);let Be=Le===null?null:Qi(w.overlay,Le,i[k]?.generatedAt??null),Ve=Le===null?null:re(Le,w.overlay,i[k]?.generatedAt??null),He=(0,y.useCallback)(e=>{let t=Xa(De,e);t===null?M():ie(t)},[De,ie,M]),Ue=(0,y.useCallback)(t=>{if(n.status===`on`){I.showError(`Airplane mode`,`This action requires a network connection. Turn off airplane mode and try again.`);return}let r=qi(t.item);I.enqueue({message:vi(t.kind,t.item,k),color:gi(t.kind),commit:t.commit,offline:t.offline,advance:()=>{if(_i(t.kind,k)){if(s&&C(c[e??``]??0)){let t=Ka(_,e,c);t!==null&&Ya(`/projects/${t}`)}else He(r)}}})},[I,k,He,n.status,s,C,c,e,_]),We=Ea((0,y.useCallback)(e=>{if(A===null||e===null)return;let t=e===`next`?Za(De,A):Qa(De,A);t!==null&&ie(t)},[A,De,ie])),[Ge,Ke]=(0,y.useState)(()=>localStorage.getItem(`console-story-show-gray`)===`true`),qe=(0,y.useCallback)(()=>{Ke(e=>{let t=!e;return localStorage.setItem(`console-story-show-gray`,String(t)),t})},[]),Je=i.stories,Ye=Je?.stories??[],Xe=Fe!==null&&Fe.generatedAt===Je?.generatedAt?Fe.stories:Ye,Ze=Je?.defaultNameWithOwner??null,Qe=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);if(Ze===null)throw Error(`No repository configured for this project.`);await Zr({pjcode:e,title:n,storyOptionId:t,nameWithOwner:Ze})},[e,Ze]),$e=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await $r({pjcode:e,storyOptionId:t,direction:n});let r=Xe.findIndex(e=>e.storyOptionId===t);if(r!==-1){let e=r+(n===`up`?-1:1);if(e>=0&&e<Xe.length){let t=[...Xe],n=t[r];t[r]=t[e],t[e]=n,Ie({generatedAt:Je?.generatedAt,stories:t})}}},[e,Xe,Je?.generatedAt]),et=(0,y.useCallback)(async t=>{if(e===null)throw Error(`No project specified in the URL path.`);await Gr({pjcode:e,storyName:t})},[e]),[tt,nt]=(0,y.useState)({}),[rt,it]=(0,y.useState)(null),[at,ot]=(0,y.useState)({}),st=(0,y.useCallback)((t,n)=>{let r=Xe.find(e=>e.storyOptionId===t)?.color;if(it(t),nt(e=>({...e,[t]:n})),ot(e=>{let n={...e};return delete n[t],n}),e===null||Ze===null){nt(e=>r===void 0?e:{...e,[t]:r}),ot(e=>({...e,[t]:`No project or repository configured.`})),it(e=>e===t?null:e);return}Xr({pjcode:e,storyOptionId:t,newColor:n,nameWithOwner:Ze}).catch(e=>{nt(e=>r===void 0?e:{...e,[t]:r}),ot(n=>({...n,[t]:e instanceof Error?e.message:String(e)}))}).finally(()=>{it(e=>e===t?null:e)})},[e,Ze,Xe]),ct=(0,y.useCallback)(async t=>{if(e===null)throw Error(`No project specified in the URL path.`);await ri({pjcode:e,storyOptionId:t}),Ie({generatedAt:Je?.generatedAt,stories:Xe.filter(e=>e.storyOptionId!==t)})},[e,Xe,Je?.generatedAt]),lt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await ai({pjcode:e,storyOptionId:t,newName:n});let r=Xe.map(e=>e.storyOptionId===t?{...e,storyName:n}:e);Ie({generatedAt:Je?.generatedAt,stories:r})},[e,Xe,Je?.generatedAt]),ut=Sa(be,P.comments,k===`prs`),dt=(0,y.useCallback)((e,t)=>{Ue({kind:{type:`ok_and_awaiting_workspace`},item:e,commit:()=>F.okAndMoveToAwaitingWorkspace(e,t)})},[Ue,F]);return(0,x.jsxs)(`main`,{className:`console-app`,children:[I.pending!==null&&(0,x.jsx)(Kn,{message:I.pending.message,color:I.pending.color,remainingSeconds:I.pending.remainingSeconds,progress:I.pending.progress,onUndo:I.undo}),I.error!==null&&(0,x.jsx)(qn,{title:I.error.message,message:`Operation failed: ${I.error.reason}`,onDismiss:I.dismissError}),(0,x.jsx)(Gn,{actions:ve,isOnline:le,isConfirming:he,onConfirm:_e,onDiscard:I.discardOfflineAction}),E.isOpen&&(0,x.jsx)(S,{value:E.inputValue,onChange:E.changeInput,isLoading:E.isLoading,isSaving:E.isSaving,error:E.error,onSave:E.save,onClose:E.close}),(0,x.jsx)(te,{activeTab:k,counts:O,pjcode:e,pjcodes:_,generatedAt:Ne,fromCache:Pe,tabHref:ee.tabHref,onSelectTab:ee.selectTab,onSelectProject:e=>Ya(`/projects/${e}`),settingsButton:(0,x.jsxs)(x.Fragment,{children:[e!==null&&(0,x.jsx)(`button`,{type:`button`,className:`console-tab-settings-button`,"aria-label":`Open project settings`,onClick:E.open,children:`⚙`}),(0,x.jsx)(ne,{isOpen:l,timerMode:u,projectMinutes:d,pjcodes:_,isLoadingPjcodes:b,onOpen:f,onToggleTimerMode:h,onChangeMinutes:g,onSave:m,onClose:p})]}),airplaneModeEnabled:t.airplaneMode,airplaneModeStatus:n.status,airplaneModeProgress:n.progress,airplaneModeCapturedAt:r?.capturedAt??null,airplaneModeFailures:n.failures,onAirplaneModeStartSync:n.startSync,onAirplaneModeTurnOff:n.turnOff,workflowImprovementIssueUrl:v}),(0,x.jsx)(T,{timerEndsAt:ye?.timerEndsAt??null,timerTotalSeconds:ye?.timerTotalSeconds??null,now:se}),k===`stories`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(Bn,{stories:Xe,isLoading:a,error:o,showGray:Ge,onCreateIssue:Qe,onAddStory:et,onSelectColor:st,onToggleGray:qe,onReorderStory:$e,onDeleteStory:ct,onRenameStory:lt,optimisticColors:tt,colorChangeInFlight:rt,colorErrors:at})}):Le===null?k===`queued`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(Te,{rows:ke,storyColors:Ae,statusOptions:je,agentOptions:Me,activeItemId:null,isLoading:a,error:o,onSelectItem:e=>ee.openItem(e.projectItemId)})}):k===`prs`?(0,x.jsxs)(`div`,{className:`console-list-screen`,children:[(0,x.jsx)(Se,{agentOptions:Me,selectedAgent:Ce,onAgentChange:we}),(0,x.jsx)(xe,{rows:ke,storyColors:Ae,statusOptions:je,activeItemId:null,now:se,isLoading:a,error:o,onSelectItem:e=>ee.openItem(e.projectItemId),executiveSummaries:ut,onOkAndAwaitingWorkspace:dt})]}):(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(xe,{rows:ke,storyColors:Ae,statusOptions:je,activeItemId:null,now:se,isLoading:a,error:o,onSelectItem:e=>ee.openItem(e.projectItemId)})}):(0,x.jsx)(`div`,{className:`console-detail-screen`,ref:We,children:(0,x.jsx)(cd,{tab:k,item:Le,caches:P,operations:F,pjcode:e,statusOptions:je,storyColors:Ae,storyName:Ve,overlayStatus:Be,now:se,initialCommentDraft:N.current.get(Le.projectItemId)??``,onCommentDraftChange:oe,onQueueAction:Ue},Le.projectItemId)})]})};`serviceWorker`in navigator&&navigator.serviceWorker.register(`/sw.js`).catch(e=>{console.warn(`Service worker registration failed:`,e)});var fd=document.getElementById(`root`);if(fd===null)throw Error(`Root container #root not found`);(0,b.createRoot)(fd).render((0,x.jsx)(y.StrictMode,{children:(0,x.jsx)(dd,{})}));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>TDPM Console</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-IcsaovYL.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-C23_HNwW.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-issue-tower-defence-management",
|
|
3
|
-
"version": "2.40.
|
|
3
|
+
"version": "2.40.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"gemoji": "8.1.0",
|
|
122
122
|
"googleapis": "^176.0.0",
|
|
123
123
|
"ky": "^2.0.2",
|
|
124
|
-
"marked": "18.0.
|
|
124
|
+
"marked": "18.0.11",
|
|
125
125
|
"marked-emoji": "2.0.3",
|
|
126
126
|
"playwright": "1.62.1",
|
|
127
127
|
"yaml": "^2.9.0"
|