diff --git a/extensions/emoji/js/dist/forum.js b/extensions/emoji/js/dist/forum.js index 4c3ea2d466..841bc3dea5 100644 --- a/extensions/emoji/js/dist/forum.js +++ b/extensions/emoji/js/dist/forum.js @@ -1,3 +1,3 @@ /*! For license information please see forum.js.LICENSE.txt */ -(()=>{var d={n:e=>{var u=e&&e.__esModule?()=>e.default:()=>e;return d.d(u,{a:u}),u},d:(e,u)=>{for(var a in u)d.o(u,a)&&!d.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:u[a]})},o:(d,e)=>Object.prototype.hasOwnProperty.call(d,e),r:d=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},e={};(()=>{"use strict";d.r(e);const u=flarum.core.compat["forum/app"];var a=d.n(u);const n=JSON.parse('{"๐Ÿ‡ฆ":["regional_indicator_a"],"๐Ÿ‡ง":["regional_indicator_b"],"๐Ÿ‡จ":["regional_indicator_c"],"๐Ÿ‡ฉ":["regional_indicator_d"],"๐Ÿ‡ช":["regional_indicator_e"],"๐Ÿ‡ซ":["regional_indicator_f"],"๐Ÿ‡ฌ":["regional_indicator_g"],"๐Ÿ‡ญ":["regional_indicator_h"],"๐Ÿ‡ฎ":["regional_indicator_i"],"๐Ÿ‡ฏ":["regional_indicator_j"],"๐Ÿ‡ฐ":["regional_indicator_k"],"๐Ÿ‡ฑ":["regional_indicator_l"],"๐Ÿ‡ฒ":["regional_indicator_m"],"๐Ÿ‡ณ":["regional_indicator_n"],"๐Ÿ‡ด":["regional_indicator_o"],"๐Ÿ‡ต":["regional_indicator_p"],"๐Ÿ‡ถ":["regional_indicator_q"],"๐Ÿ‡ท":["regional_indicator_r"],"๐Ÿ‡ธ":["regional_indicator_s"],"๐Ÿ‡น":["regional_indicator_t"],"๐Ÿ‡บ":["regional_indicator_u"],"๐Ÿ‡ป":["regional_indicator_v"],"๐Ÿ‡ผ":["regional_indicator_w"],"๐Ÿ‡ฝ":["regional_indicator_x"],"๐Ÿ‡พ":["regional_indicator_y"],"๐Ÿ‡ฟ":["regional_indicator_z"],"๐Ÿ˜€":["grinning","grinning_face"],"๐Ÿ˜ƒ":["grinning_face_with_big_eyes","smiley"],"๐Ÿ˜„":["grinning_face_with_closed_eyes","smile"],"๐Ÿ˜":["beaming_face","grin"],"๐Ÿ˜†":["laughing","lol","satisfied","squinting_face"],"๐Ÿ˜…":["grinning_face_with_sweat","sweat_smile"],"๐Ÿคฃ":["rofl"],"๐Ÿ˜‚":["joy","lmao","tears_of_joy"],"๐Ÿ™‚":["slightly_smiling_face"],"๐Ÿ™ƒ":["upside_down_face"],"๐Ÿซ ":["melt","melting_face"],"๐Ÿ˜‰":["wink","winking_face"],"๐Ÿ˜Š":["blush","smiling_face_with_closed_eyes"],"๐Ÿ˜‡":["halo","innocent"],"๐Ÿฅฐ":["smiling_face_with_3_hearts"],"๐Ÿ˜":["heart_eyes","smiling_face_with_heart_eyes"],"๐Ÿคฉ":["star_struck"],"๐Ÿ˜˜":["blowing_a_kiss","kissing_heart"],"๐Ÿ˜—":["kissing","kissing_face"],"โ˜บ๏ธ":["relaxed","smiling_face"],"๐Ÿ˜š":["kissing_closed_eyes","kissing_face_with_closed_eyes"],"๐Ÿ˜™":["kissing_face_with_smiling_eyes","kissing_smiling_eyes"],"๐Ÿฅฒ":["smiling_face_with_tear"],"๐Ÿ˜‹":["savoring_food","yum"],"๐Ÿ˜›":["face_with_tongue","stuck_out_tongue"],"๐Ÿ˜œ":["stuck_out_tongue_winking_eye"],"๐Ÿคช":["zany","zany_face"],"๐Ÿ˜":["stuck_out_tongue_closed_eyes"],"๐Ÿค‘":["money_mouth_face"],"๐Ÿค—":["hug","hugging","hugging_face"],"๐Ÿคญ":["face_with_hand_over_mouth","hand_over_mouth"],"๐Ÿซข":["face_with_open_eyes_hand_over_mouth","gasp"],"๐Ÿซฃ":["face_with_peeking_eye","peek"],"๐Ÿคซ":["shush","shushing_face"],"๐Ÿค”":["thinking","thinking_face","wtf"],"๐Ÿซก":["salute","saluting_face"],"๐Ÿค":["zipper_mouth","zipper_mouth_face"],"๐Ÿคจ":["face_with_raised_eyebrow","raised_eyebrow"],"๐Ÿ˜๏ธ":["neutral","neutral_face"],"๐Ÿ˜‘":["expressionless","expressionless_face"],"๐Ÿ˜ถ":["no_mouth"],"๐Ÿซฅ":["dotted_line_face"],"๐Ÿ˜ถโ€๐ŸŒซ๏ธ":["in_clouds"],"๐Ÿ˜":["smirk","smirking","smirking_face"],"๐Ÿ˜’":["unamused","unamused_face"],"๐Ÿ™„":["rolling_eyes"],"๐Ÿ˜ฌ":["grimacing","grimacing_face"],"๐Ÿ˜ฎโ€๐Ÿ’จ":["exhale","exhaling"],"๐Ÿคฅ":["lying","lying_face"],"๐Ÿ˜Œ":["relieved","relieved_face"],"๐Ÿ˜”":["pensive","pensive_face"],"๐Ÿ˜ช":["sleepy","sleepy_face"],"๐Ÿคค":["drooling","drooling_face"],"๐Ÿ˜ด":["sleeping","sleeping_face"],"๐Ÿ˜ท":["mask","medical_mask"],"๐Ÿค’":["face_with_thermometer"],"๐Ÿค•":["face_with_head_bandage"],"๐Ÿคข":["nauseated","nauseated_face"],"๐Ÿคฎ":["face_vomiting","vomiting"],"๐Ÿคง":["sneezing","sneezing_face"],"๐Ÿฅต":["hot","hot_face"],"๐Ÿฅถ":["cold","cold_face"],"๐Ÿฅด":["woozy","woozy_face"],"๐Ÿ˜ต":["dizzy_face","knocked_out"],"๐Ÿ˜ตโ€๐Ÿ’ซ":["dizzy_eyes"],"๐Ÿคฏ":["exploding_head"],"๐Ÿค ":["cowboy","cowboy_face"],"๐Ÿฅณ":["hooray","partying","partying_face"],"๐Ÿฅธ":["disguised","disguised_face"],"๐Ÿ˜Ž":["smiling_face_with_sunglasses","sunglasses_cool","too_cool"],"๐Ÿค“":["nerd","nerd_face"],"๐Ÿง":["face_with_monocle"],"๐Ÿ˜•":["confused","confused_face"],"๐Ÿซค":["face_with_diagonal_mouth"],"๐Ÿ˜Ÿ":["worried","worried_face"],"๐Ÿ™":["slightly_frowning_face"],"โ˜น๏ธ":["white_frowning_face"],"๐Ÿ˜ฎ":["face_with_open_mouth","open_mouth"],"๐Ÿ˜ฏ":["hushed","hushed_face"],"๐Ÿ˜ฒ":["astonished","astonished_face"],"๐Ÿ˜ณ":["flushed","flushed_face"],"๐Ÿฅบ":["pleading","pleading_face"],"๐Ÿฅน":["face_holding_back_tears","watery_eyes"],"๐Ÿ˜ฆ":["frowning","frowning_face"],"๐Ÿ˜ง":["anguished","anguished_face"],"๐Ÿ˜จ":["fearful","fearful_face"],"๐Ÿ˜ฐ":["anxious","anxious_face","cold_sweat"],"๐Ÿ˜ฅ":["disappointed_relieved","sad_relieved_face"],"๐Ÿ˜ข":["cry","crying_face"],"๐Ÿ˜ญ":["loudly_crying_face","sob"],"๐Ÿ˜ฑ":["scream","screaming_in_fear"],"๐Ÿ˜–":["confounded","confounded_face"],"๐Ÿ˜ฃ":["persevere","persevering_face"],"๐Ÿ˜ž":["disappointed","disappointed_face"],"๐Ÿ˜“":["downcast_face","sweat"],"๐Ÿ˜ฉ":["weary","weary_face"],"๐Ÿ˜ซ":["tired","tired_face"],"๐Ÿฅฑ":["yawn","yawning","yawning_face"],"๐Ÿ˜ค":["nose_steam","triumph"],"๐Ÿ˜ก":["pout","pouting_face","rage"],"๐Ÿ˜ ":["angry","angry_face"],"๐Ÿคฌ":["censored","face_with_symbols_on_mouth"],"๐Ÿ˜ˆ":["smiling_imp"],"๐Ÿ‘ฟ":["angry_imp","imp"],"๐Ÿ’€":["skull"],"โ˜ ๏ธ":["skull_and_crossbones"],"๐Ÿ’ฉ":["poop","shit"],"๐Ÿคก":["clown","clown_face"],"๐Ÿ‘น":["japanese_ogre","ogre"],"๐Ÿ‘บ":["goblin","japanese_goblin"],"๐Ÿ‘ป":["ghost"],"๐Ÿ‘ฝ๏ธ":["alien"],"๐Ÿ‘พ":["alien_monster","space_invader"],"๐Ÿค–":["robot","robot_face"],"๐Ÿ˜บ":["grinning_cat","smiley_cat"],"๐Ÿ˜ธ":["grinning_cat_with_closed_eyes","smile_cat"],"๐Ÿ˜น":["joy_cat","tears_of_joy_cat"],"๐Ÿ˜ป":["heart_eyes_cat","smiling_cat_with_heart_eyes"],"๐Ÿ˜ผ":["smirk_cat","wry_smile_cat"],"๐Ÿ˜ฝ":["kissing_cat"],"๐Ÿ™€":["scream_cat","weary_cat"],"๐Ÿ˜ฟ":["crying_cat"],"๐Ÿ˜พ":["pouting_cat"],"๐Ÿ™ˆ":["see_no_evil"],"๐Ÿ™‰":["hear_no_evil"],"๐Ÿ™Š":["speak_no_evil"],"๐Ÿ’‹":["kiss"],"๐Ÿ’Œ":["love_letter"],"๐Ÿ’˜":["cupid","heart_with_arrow"],"๐Ÿ’":["gift_heart","heart_with_ribbon"],"๐Ÿ’–":["sparkling_heart"],"๐Ÿ’—":["growing_heart","heartpulse"],"๐Ÿ’“":["beating_heart","heartbeat"],"๐Ÿ’ž":["revolving_hearts"],"๐Ÿ’•":["two_hearts"],"๐Ÿ’Ÿ":["heart_decoration"],"โฃ๏ธ":["heart_exclamation"],"๐Ÿ’”":["broken_heart"],"โค๏ธโ€๐Ÿ”ฅ":["heart_on_fire"],"โค๏ธโ€๐Ÿฉน":["mending_heart"],"โค๏ธ":["heart","red_heart"],"๐Ÿงก":["orange_heart"],"๐Ÿ’›":["yellow_heart"],"๐Ÿ’š":["green_heart"],"๐Ÿ’™":["blue_heart"],"๐Ÿ’œ":["purple_heart"],"๐ŸคŽ":["brown_heart"],"๐Ÿ–ค":["black_heart"],"๐Ÿค":["white_heart"],"๐Ÿ’ฏ":["100"],"๐Ÿ’ข":["anger"],"๐Ÿ’ฅ":["boom","collision"],"๐Ÿ’ซ":["dizzy"],"๐Ÿ’ฆ":["sweat_drops"],"๐Ÿ’จ":["dash","dashing_away"],"๐Ÿ•ณ๏ธ":["hole"],"๐Ÿ’ฃ๏ธ":["bomb"],"๐Ÿ’ฌ":["speech_balloon"],"๐Ÿ‘โ€๐Ÿ—จ":["eye_in_speech_bubble"],"๐Ÿ—จ๏ธ":["left_speech_bubble"],"๐Ÿ—ฏ๏ธ":["right_anger_bubble"],"๐Ÿ’ญ":["thought_balloon"],"๐Ÿ’ค":["zzz"],"๐Ÿ‘‹":["wave","waving_hand"],"๐Ÿคš":["raised_back_of_hand"],"๐Ÿ–๏ธ":["raised_hand_with_fingers_splayed"],"โœ‹":["high_five","raised_hand"],"๐Ÿ––":["vulcan"],"๐Ÿซฑ":["rightwards_hand"],"๐Ÿซฒ":["leftwards_hand"],"๐Ÿซณ":["palm_down"],"๐Ÿซด":["palm_up"],"๐Ÿ‘Œ":["ok_hand"],"๐ŸคŒ":["pinch","pinched_fingers"],"๐Ÿค":["pinching_hand"],"โœŒ๏ธ":["v","victory"],"๐Ÿคž":["fingers_crossed"],"๐Ÿซฐ":["hand_with_index_finger_and_thumb_crossed"],"๐ŸคŸ":["love_you_gesture"],"๐Ÿค˜":["metal","sign_of_the_horns"],"๐Ÿค™":["call_me_hand"],"๐Ÿ‘ˆ๏ธ":["point_left"],"๐Ÿ‘‰๏ธ":["point_right"],"๐Ÿ‘†๏ธ":["point_up"],"๐Ÿ–•":["middle_finger"],"๐Ÿ‘‡๏ธ":["point_down"],"โ˜๏ธ":["point_up_2"],"๐Ÿซต":["point_forward"],"๐Ÿ‘๏ธ":["+1","thumbsup","yes"],"๐Ÿ‘Ž๏ธ":["-1","no","thumbsdown"],"โœŠ":["fist"],"๐Ÿ‘Š":["punch"],"๐Ÿค›":["left_facing_fist"],"๐Ÿคœ":["right_facing_fist"],"๐Ÿ‘":["clap","clapping_hands"],"๐Ÿ™Œ":["raised_hands"],"๐Ÿซถ":["heart_hands"],"๐Ÿ‘":["open_hands"],"๐Ÿคฒ":["palms_up_together"],"๐Ÿค":["handshake"],"๐Ÿ™":["folded_hands","pray"],"โœ๏ธ":["writing_hand"],"๐Ÿ’…":["nail_care","nail_polish"],"๐Ÿคณ":["selfie"],"๐Ÿ’ช":["muscle","right_bicep"],"๐Ÿฆพ":["mechanical_arm"],"๐Ÿฆฟ":["mechanical_leg"],"๐Ÿฆต":["leg"],"๐Ÿฆถ":["foot"],"๐Ÿ‘‚๏ธ":["ear"],"๐Ÿฆป":["ear_with_hearing_aid","hearing_aid"],"๐Ÿ‘ƒ":["nose"],"๐Ÿง ":["brain"],"๐Ÿซ€":["anatomical_heart"],"๐Ÿซ":["lungs"],"๐Ÿฆท":["tooth"],"๐Ÿฆด":["bone"],"๐Ÿ‘€":["eyes"],"๐Ÿ‘๏ธ":["eye"],"๐Ÿ‘…":["tongue"],"๐Ÿ‘„":["lips","mouth"],"๐Ÿซฆ":["biting_lip"],"๐Ÿ‘ถ":["baby"],"๐Ÿง’":["child"],"๐Ÿ‘ฆ":["boy"],"๐Ÿ‘ง":["girl"],"๐Ÿง‘":["adult"],"๐Ÿ‘ฑ":["blond_haired"],"๐Ÿ‘จ":["man"],"๐Ÿง”":["person_bearded"],"๐Ÿง”โ€โ™‚๏ธ":["man_bearded"],"๐Ÿง”โ€โ™€๏ธ":["woman_bearded"],"๐Ÿ‘จโ€๐Ÿฆฐ":["man_red_haired"],"๐Ÿ‘จโ€๐Ÿฆฑ":["man_curly_haired"],"๐Ÿ‘จโ€๐Ÿฆณ":["man_white_haired"],"๐Ÿ‘จโ€๐Ÿฆฒ":["man_bald"],"๐Ÿ‘ฉ":["woman"],"๐Ÿ‘ฉโ€๐Ÿฆฐ":["woman_red_haired"],"๐Ÿง‘โ€๐Ÿฆฐ":["red_haired"],"๐Ÿ‘ฉโ€๐Ÿฆฑ":["woman_curly_haired"],"๐Ÿง‘โ€๐Ÿฆฑ":["curly_haired"],"๐Ÿ‘ฉโ€๐Ÿฆณ":["woman_white_haired"],"๐Ÿง‘โ€๐Ÿฆณ":["white_haired"],"๐Ÿ‘ฉโ€๐Ÿฆฒ":["woman_bald"],"๐Ÿง‘โ€๐Ÿฆฒ":["bald"],"๐Ÿ‘ฑโ€โ™€๏ธ":["woman_blond_haired"],"๐Ÿ‘ฑโ€โ™‚๏ธ":["man_blond_haired"],"๐Ÿง“":["older_adult"],"๐Ÿ‘ด":["older_man"],"๐Ÿ‘ต":["older_woman"],"๐Ÿ™":["person_frowning"],"๐Ÿ™โ€โ™‚๏ธ":["man_frowning"],"๐Ÿ™โ€โ™€๏ธ":["woman_frowning"],"๐Ÿ™Ž":["person_pouting","pouting"],"๐Ÿ™Žโ€โ™‚๏ธ":["man_pouting"],"๐Ÿ™Žโ€โ™€๏ธ":["woman_pouting"],"๐Ÿ™…":["no_good","person_gesturing_no"],"๐Ÿ™…โ€โ™‚๏ธ":["man_gesturing_no"],"๐Ÿ™…โ€โ™€๏ธ":["woman_gesturing_no"],"๐Ÿ™†":["all_good","person_gesturing_ok"],"๐Ÿ™†โ€โ™‚๏ธ":["man_gesturing_ok"],"๐Ÿ™†โ€โ™€๏ธ":["woman_gesturing_ok"],"๐Ÿ’":["person_tipping_hand"],"๐Ÿ’โ€โ™‚๏ธ":["man_tipping_hand"],"๐Ÿ’โ€โ™€๏ธ":["woman_tipping_hand"],"๐Ÿ™‹":["person_raising_hand"],"๐Ÿ™‹โ€โ™‚๏ธ":["man_raising_hand"],"๐Ÿ™‹โ€โ™€๏ธ":["woman_raising_hand"],"๐Ÿง":["deaf_person"],"๐Ÿงโ€โ™‚๏ธ":["deaf_man"],"๐Ÿงโ€โ™€๏ธ":["deaf_woman"],"๐Ÿ™‡":["bow","person_bowing"],"๐Ÿ™‡โ€โ™‚๏ธ":["man_bowing"],"๐Ÿ™‡โ€โ™€๏ธ":["woman_bowing"],"๐Ÿคฆ":["facepalm","person_facepalming"],"๐Ÿคฆโ€โ™‚๏ธ":["man_facepalming"],"๐Ÿคฆโ€โ™€๏ธ":["woman_facepalming"],"๐Ÿคท":["person_shrugging","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"],"๐Ÿ‘ฎ":["cop","police_officer"],"๐Ÿ‘ฎโ€โ™‚๏ธ":["man_police_officer"],"๐Ÿ‘ฎโ€โ™€๏ธ":["woman_police_officer"],"๐Ÿ•ต๏ธ":["detective"],"๐Ÿ•ต๏ธโ€โ™‚๏ธ":["man_detective"],"๐Ÿ•ต๏ธโ€โ™€๏ธ":["woman_detective"],"๐Ÿ’‚":["guard"],"๐Ÿ’‚โ€โ™‚๏ธ":["man_guard"],"๐Ÿ’‚โ€โ™€๏ธ":["woman_guard"],"๐Ÿฅท":["ninja"],"๐Ÿ‘ท":["construction_worker"],"๐Ÿ‘ทโ€โ™‚๏ธ":["man_construction_worker"],"๐Ÿ‘ทโ€โ™€๏ธ":["woman_construction_worker"],"๐Ÿซ…":["person_with_crown","royalty"],"๐Ÿคด":["prince"],"๐Ÿ‘ธ":["princess"],"๐Ÿ‘ณ":["person_wearing_turban"],"๐Ÿ‘ณโ€โ™‚๏ธ":["man_wearing_turban"],"๐Ÿ‘ณโ€โ™€๏ธ":["woman_wearing_turban"],"๐Ÿ‘ฒ":["person_with_skullcap"],"๐Ÿง•":["woman_with_headscarf"],"๐Ÿคต":["person_in_tuxedo"],"๐Ÿคตโ€โ™‚๏ธ":["man_in_tuxedo"],"๐Ÿคตโ€โ™€๏ธ":["woman_in_tuxedo"],"๐Ÿ‘ฐ":["person_with_veil"],"๐Ÿ‘ฐโ€โ™‚๏ธ":["man_with_veil"],"๐Ÿ‘ฐโ€โ™€๏ธ":["woman_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"],"๐Ÿฆธโ€โ™‚๏ธ":["man_superhero"],"๐Ÿฆธโ€โ™€๏ธ":["woman_superhero"],"๐Ÿฆน":["supervillain"],"๐Ÿฆนโ€โ™‚๏ธ":["man_supervillain"],"๐Ÿฆนโ€โ™€๏ธ":["woman_supervillain"],"๐Ÿง™":["mage"],"๐Ÿง™โ€โ™‚๏ธ":["man_mage"],"๐Ÿง™โ€โ™€๏ธ":["woman_mage"],"๐Ÿงš":["fairy"],"๐Ÿงšโ€โ™‚๏ธ":["man_fairy"],"๐Ÿงšโ€โ™€๏ธ":["woman_fairy"],"๐Ÿง›":["vampire"],"๐Ÿง›โ€โ™‚๏ธ":["man_vampire"],"๐Ÿง›โ€โ™€๏ธ":["woman_vampire"],"๐Ÿงœ":["merperson"],"๐Ÿงœโ€โ™‚๏ธ":["merman"],"๐Ÿงœโ€โ™€๏ธ":["mermaid"],"๐Ÿง":["elf"],"๐Ÿงโ€โ™‚๏ธ":["man_elf"],"๐Ÿงโ€โ™€๏ธ":["woman_elf"],"๐Ÿงž":["genie"],"๐Ÿงžโ€โ™‚๏ธ":["man_genie"],"๐Ÿงžโ€โ™€๏ธ":["woman_genie"],"๐ŸงŸ":["zombie"],"๐ŸงŸโ€โ™‚๏ธ":["man_zombie"],"๐ŸงŸโ€โ™€๏ธ":["woman_zombie"],"๐ŸงŒ":["troll"],"๐Ÿ’†":["massage","person_getting_massage"],"๐Ÿ’†โ€โ™‚๏ธ":["man_getting_massage"],"๐Ÿ’†โ€โ™€๏ธ":["woman_getting_massage"],"๐Ÿ’‡":["haircut","person_getting_haircut"],"๐Ÿ’‡โ€โ™‚๏ธ":["man_getting_haircut"],"๐Ÿ’‡โ€โ™€๏ธ":["woman_getting_haircut"],"๐Ÿšถ":["person_walking","walking"],"๐Ÿšถโ€โ™‚๏ธ":["man_walking"],"๐Ÿšถโ€โ™€๏ธ":["woman_walking"],"๐Ÿง":["person_standing","standing"],"๐Ÿงโ€โ™‚๏ธ":["man_standing"],"๐Ÿงโ€โ™€๏ธ":["woman_standing"],"๐ŸงŽ":["kneeling","person_kneeling"],"๐ŸงŽโ€โ™‚๏ธ":["man_kneeling"],"๐ŸงŽโ€โ™€๏ธ":["woman_kneeling"],"๐Ÿง‘โ€๐Ÿฆฏ":["person_with_probing_cane","person_with_white_cane"],"๐Ÿ‘จโ€๐Ÿฆฏ":["man_with_probing_cane","man_with_white_cane"],"๐Ÿ‘ฉโ€๐Ÿฆฏ":["woman_with_probing_cane","woman_with_white_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"],"๐Ÿƒ":["person_running","running"],"๐Ÿƒโ€โ™‚๏ธ":["man_running"],"๐Ÿƒโ€โ™€๏ธ":["woman_running"],"๐Ÿ’ƒ":["dancer","woman_dancing"],"๐Ÿ•บ":["man_dancing"],"๐Ÿ•ด๏ธ":["levitate","levitating","person_in_suit_levitating"],"๐Ÿ‘ฏ":["dancers","people_with_bunny_ears_partying"],"๐Ÿ‘ฏโ€โ™‚๏ธ":["men_with_bunny_ears_partying"],"๐Ÿ‘ฏโ€โ™€๏ธ":["women_with_bunny_ears_partying"],"๐Ÿง–":["person_in_steamy_room"],"๐Ÿง–โ€โ™‚๏ธ":["man_in_steamy_room"],"๐Ÿง–โ€โ™€๏ธ":["woman_in_steamy_room"],"๐Ÿง—":["climbing","person_climbing"],"๐Ÿง—โ€โ™‚๏ธ":["man_climbing"],"๐Ÿง—โ€โ™€๏ธ":["woman_climbing"],"๐Ÿคบ":["fencer","fencing","person_fencing"],"๐Ÿ‡":["horse_racing"],"โ›ท๏ธ":["person_skiing","skier","skiing"],"๐Ÿ‚๏ธ":["person_snowboarding","snowboarder","snowboarding"],"๐ŸŒ๏ธ":["golfer","golfing","person_golfing"],"๐ŸŒ๏ธโ€โ™‚๏ธ":["man_golfing"],"๐ŸŒ๏ธโ€โ™€๏ธ":["woman_golfing"],"๐Ÿ„๏ธ":["person_surfing","surfer","surfing"],"๐Ÿ„โ€โ™‚๏ธ":["man_surfing"],"๐Ÿ„โ€โ™€๏ธ":["woman_surfing"],"๐Ÿšฃ":["person_rowing_boat","rowboat"],"๐Ÿšฃโ€โ™‚๏ธ":["man_rowing_boat"],"๐Ÿšฃโ€โ™€๏ธ":["woman_rowing_boat"],"๐ŸŠ๏ธ":["person_swimming","swimmer","swimming"],"๐ŸŠโ€โ™‚๏ธ":["man_swimming"],"๐ŸŠโ€โ™€๏ธ":["woman_swimming"],"โ›น๏ธ":["person_bouncing_ball"],"โ›น๏ธโ€โ™‚๏ธ":["man_bouncing_ball"],"โ›น๏ธโ€โ™€๏ธ":["woman_bouncing_ball"],"๐Ÿ‹๏ธ":["person_lifting_weights","weight_lifter","weight_lifting"],"๐Ÿ‹๏ธโ€โ™‚๏ธ":["man_lifting_weights"],"๐Ÿ‹๏ธโ€โ™€๏ธ":["woman_lifting_weights"],"๐Ÿšด":["bicyclist","biking","person_biking"],"๐Ÿšดโ€โ™‚๏ธ":["man_biking"],"๐Ÿšดโ€โ™€๏ธ":["woman_biking"],"๐Ÿšต":["mountain_bicyclist","mountain_biking","person_mountain_biking"],"๐Ÿšตโ€โ™‚๏ธ":["man_mountain_biking"],"๐Ÿšตโ€โ™€๏ธ":["woman_mountain_biking"],"๐Ÿคธ":["cartwheeling","person_cartwheel"],"๐Ÿคธโ€โ™‚๏ธ":["man_cartwheeling"],"๐Ÿคธโ€โ™€๏ธ":["woman_cartwheeling"],"๐Ÿคผ":["people_wrestling","wrestlers","wrestling"],"๐Ÿคผโ€โ™‚๏ธ":["men_wrestling"],"๐Ÿคผโ€โ™€๏ธ":["women_wrestling"],"๐Ÿคฝ":["person_playing_water_polo","water_polo"],"๐Ÿคฝโ€โ™‚๏ธ":["man_playing_water_polo"],"๐Ÿคฝโ€โ™€๏ธ":["woman_playing_water_polo"],"๐Ÿคพ":["handball","person_playing_handball"],"๐Ÿคพโ€โ™‚๏ธ":["man_playing_handball"],"๐Ÿคพโ€โ™€๏ธ":["woman_playing_handball"],"๐Ÿคน":["juggler","juggling","person_juggling"],"๐Ÿคนโ€โ™‚๏ธ":["man_juggling"],"๐Ÿคนโ€โ™€๏ธ":["woman_juggling"],"๐Ÿง˜":["person_in_lotus_position"],"๐Ÿง˜โ€โ™‚๏ธ":["man_in_lotus_position"],"๐Ÿง˜โ€โ™€๏ธ":["woman_in_lotus_position"],"๐Ÿ›€":["bath","person_taking_bath"],"๐Ÿ›Œ":["person_in_bed","sleeping_accommodation"],"๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘":["people_holding_hands"],"๐Ÿ‘ญ":["two_women_holding_hands"],"๐Ÿ‘ซ":["couple"],"๐Ÿ‘ฌ":["two_men_holding_hands"],"๐Ÿ’":["couple_kiss","couplekiss"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ":["kiss_mw","kiss_wm"],"๐Ÿ‘จโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ":["kiss_mm"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘ฉ":["kiss_ww"],"๐Ÿ’‘":["couple_with_heart"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ‘จ":["couple_with_heart_mw","couple_with_heart_wm"],"๐Ÿ‘จโ€โค๏ธโ€๐Ÿ‘จ":["couple_with_heart_mm"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ‘ฉ":["couple_with_heart_ww"],"๐Ÿ‘ช๏ธ":["family"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ":["family_mwb"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง":["family_mwg"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_mwgb"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_mwbb"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_mwgg"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆ":["family_mmb"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง":["family_mmg"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_mmgb"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_mmbb"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_mmgg"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ":["family_wwb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง":["family_wwg"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_wwgb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_wwbb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_wwgg"],"๐Ÿ‘จโ€๐Ÿ‘ฆ":["family_mb"],"๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_mbb"],"๐Ÿ‘จโ€๐Ÿ‘ง":["family_mg"],"๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_mgb"],"๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_mgg"],"๐Ÿ‘ฉโ€๐Ÿ‘ฆ":["family_wb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_wbb"],"๐Ÿ‘ฉโ€๐Ÿ‘ง":["family_wg"],"๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_wgb"],"๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_wgg"],"๐Ÿ—ฃ๏ธ":["speaking_head"],"๐Ÿ‘ค":["bust_in_silhouette"],"๐Ÿ‘ฅ":["busts_in_silhouette"],"๐Ÿซ‚":["people_hugging"],"๐Ÿ‘ฃ":["footprints"],"๐Ÿป":["tone1","tone_light"],"๐Ÿผ":["tone2","tone_medium_light"],"๐Ÿฝ":["tone3","tone_medium"],"๐Ÿพ":["tone4","tone_medium_dark"],"๐Ÿฟ":["tone5","tone_dark"],"๐Ÿฆฐ":["red_hair"],"๐Ÿฆฑ":["curly_hair"],"๐Ÿฆณ":["white_hair"],"๐Ÿฆฒ":["no_hair"],"๐Ÿต":["monkey_face"],"๐Ÿ’":["monkey"],"๐Ÿฆ":["gorilla"],"๐Ÿฆง":["orangutan"],"๐Ÿถ":["dog_face"],"๐Ÿ•๏ธ":["dog"],"๐Ÿฆฎ":["guide_dog"],"๐Ÿ•โ€๐Ÿฆบ":["service_dog"],"๐Ÿฉ":["poodle"],"๐Ÿบ":["wolf","wolf_face"],"๐ŸฆŠ":["fox","fox_face"],"๐Ÿฆ":["raccoon"],"๐Ÿฑ":["cat_face"],"๐Ÿˆ๏ธ":["cat"],"๐Ÿˆโ€โฌ›":["black_cat"],"๐Ÿฆ":["lion","lion_face"],"๐Ÿฏ":["tiger_face"],"๐Ÿ…":["tiger"],"๐Ÿ†":["leopard"],"๐Ÿด":["horse_face"],"๐ŸŽ":["horse","racehorse"],"๐Ÿฆ„":["unicorn","unicorn_face"],"๐Ÿฆ“":["zebra"],"๐ŸฆŒ":["deer"],"๐Ÿฆฌ":["bison"],"๐Ÿฎ":["cow_face"],"๐Ÿ‚":["ox"],"๐Ÿƒ":["water_buffalo"],"๐Ÿ„":["cow"],"๐Ÿท":["pig_face"],"๐Ÿ–":["pig"],"๐Ÿ—":["boar"],"๐Ÿฝ":["pig_nose"],"๐Ÿ":["ram"],"๐Ÿ‘":["ewe","sheep"],"๐Ÿ":["goat"],"๐Ÿช":["dromedary_camel"],"๐Ÿซ":["camel"],"๐Ÿฆ™":["llama"],"๐Ÿฆ’":["giraffe"],"๐Ÿ˜":["elephant"],"๐Ÿฆฃ":["mammoth"],"๐Ÿฆ":["rhino","rhinoceros"],"๐Ÿฆ›":["hippo"],"๐Ÿญ":["mouse_face"],"๐Ÿ":["mouse"],"๐Ÿ€":["rat"],"๐Ÿน":["hamster","hamster_face"],"๐Ÿฐ":["rabbit_face"],"๐Ÿ‡":["rabbit"],"๐Ÿฟ๏ธ":["chipmunk"],"๐Ÿฆซ":["beaver"],"๐Ÿฆ”":["hedgehog"],"๐Ÿฆ‡":["bat"],"๐Ÿป":["bear","bear_face"],"๐Ÿปโ€โ„๏ธ":["polar_bear","polar_bear_face"],"๐Ÿจ":["koala","koala_face"],"๐Ÿผ":["panda","panda_face"],"๐Ÿฆฅ":["sloth"],"๐Ÿฆฆ":["otter"],"๐Ÿฆจ":["skunk"],"๐Ÿฆ˜":["kangaroo"],"๐Ÿฆก":["badger"],"๐Ÿพ":["paw_prints"],"๐Ÿฆƒ":["turkey"],"๐Ÿ”":["chicken","chicken_face"],"๐Ÿ“":["rooster"],"๐Ÿฃ":["hatching_chick"],"๐Ÿค":["baby_chick"],"๐Ÿฅ":["hatched_chick"],"๐Ÿฆ๏ธ":["bird","bird_face"],"๐Ÿง":["penguin","penguin_face"],"๐Ÿ•Š๏ธ":["dove"],"๐Ÿฆ…":["eagle"],"๐Ÿฆ†":["duck"],"๐Ÿฆข":["swan"],"๐Ÿฆ‰":["owl"],"๐Ÿฆค":["dodo"],"๐Ÿชถ":["feather"],"๐Ÿฆฉ":["flamingo"],"๐Ÿฆš":["peacock"],"๐Ÿฆœ":["parrot"],"๐Ÿธ":["frog","frog_face"],"๐ŸŠ":["crocodile"],"๐Ÿข":["turtle"],"๐ŸฆŽ":["lizard"],"๐Ÿ":["snake"],"๐Ÿฒ":["dragon_face"],"๐Ÿ‰":["dragon"],"๐Ÿฆ•":["sauropod"],"๐Ÿฆ–":["t-rex","trex"],"๐Ÿณ":["spouting_whale"],"๐Ÿ‹":["whale"],"๐Ÿฌ":["dolphin"],"๐Ÿฆญ":["seal"],"๐ŸŸ๏ธ":["fish"],"๐Ÿ ":["tropical_fish"],"๐Ÿก":["blowfish"],"๐Ÿฆˆ":["shark"],"๐Ÿ™":["octopus"],"๐Ÿš":["shell"],"๐Ÿชธ":["coral"],"๐ŸŒ":["snail"],"๐Ÿฆ‹":["butterfly"],"๐Ÿ›":["bug"],"๐Ÿœ":["ant"],"๐Ÿ":["bee"],"๐Ÿชฒ":["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"],"๐ŸŒฑ":["seedling"],"๐Ÿชด":["potted_plant"],"๐ŸŒฒ":["evergreen_tree"],"๐ŸŒณ":["deciduous_tree"],"๐ŸŒด":["palm_tree"],"๐ŸŒต":["cactus"],"๐ŸŒพ":["ear_of_rice","sheaf_of_rice"],"๐ŸŒฟ":["herb"],"โ˜˜๏ธ":["shamrock"],"๐Ÿ€":["four_leaf_clover"],"๐Ÿ":["maple_leaf"],"๐Ÿ‚":["fallen_leaf"],"๐Ÿƒ":["leaves"],"๐Ÿชน":["empty_nest","nest"],"๐Ÿชบ":["nest_with_eggs"],"๐Ÿ‡":["grapes"],"๐Ÿˆ":["melon"],"๐Ÿ‰":["watermelon"],"๐ŸŠ":["orange","tangerine"],"๐Ÿ‹":["lemon"],"๐ŸŒ":["banana"],"๐Ÿ":["pineapple"],"๐Ÿฅญ":["mango"],"๐ŸŽ":["apple","red_apple"],"๐Ÿ":["green_apple"],"๐Ÿ":["pear"],"๐Ÿ‘":["peach"],"๐Ÿ’":["cherries"],"๐Ÿ“":["strawberry"],"๐Ÿซ":["blueberries"],"๐Ÿฅ":["kiwi"],"๐Ÿ…":["tomato"],"๐Ÿซ’":["olive"],"๐Ÿฅฅ":["coconut"],"๐Ÿฅ‘":["avocado"],"๐Ÿ†":["eggplant"],"๐Ÿฅ”":["potato"],"๐Ÿฅ•":["carrot"],"๐ŸŒฝ":["corn","ear_of_corn"],"๐ŸŒถ๏ธ":["hot_pepper"],"๐Ÿซ‘":["bell_pepper"],"๐Ÿฅ’":["cucumber"],"๐Ÿฅฌ":["leafy_green"],"๐Ÿฅฆ":["broccoli"],"๐Ÿง„":["garlic"],"๐Ÿง…":["onion"],"๐Ÿ„":["mushroom"],"๐Ÿฅœ":["peanuts"],"๐Ÿซ˜":["beans"],"๐ŸŒฐ":["chestnut"],"๐Ÿž":["bread"],"๐Ÿฅ":["croissant"],"๐Ÿฅ–":["baguette_bread"],"๐Ÿซ“":["flatbread"],"๐Ÿฅจ":["pretzel"],"๐Ÿฅฏ":["bagel"],"๐Ÿฅž":["pancakes"],"๐Ÿง‡":["waffle"],"๐Ÿง€":["cheese"],"๐Ÿ–":["meat_on_bone"],"๐Ÿ—":["poultry_leg"],"๐Ÿฅฉ":["cut_of_meat"],"๐Ÿฅ“":["bacon"],"๐Ÿ”":["hamburger"],"๐ŸŸ":["french_fries","fries"],"๐Ÿ•":["pizza"],"๐ŸŒญ":["hotdog"],"๐Ÿฅช":["sandwich"],"๐ŸŒฎ":["taco"],"๐ŸŒฏ":["burrito"],"๐Ÿซ”":["tamale"],"๐Ÿฅ™":["stuffed_flatbread"],"๐Ÿง†":["falafel"],"๐Ÿฅš":["egg"],"๐Ÿณ":["cooking","fried_egg"],"๐Ÿฅ˜":["shallow_pan_of_food"],"๐Ÿฒ":["pot_of_food","stew"],"๐Ÿซ•":["fondue"],"๐Ÿฅฃ":["bowl_with_spoon"],"๐Ÿฅ—":["green_salad","salad"],"๐Ÿฟ":["popcorn"],"๐Ÿงˆ":["butter"],"๐Ÿง‚":["salt"],"๐Ÿฅซ":["canned_food"],"๐Ÿฑ":["bento","bento_box"],"๐Ÿ˜":["rice_cracker"],"๐Ÿ™":["rice_ball"],"๐Ÿš":["cooked_rice","rice"],"๐Ÿ›":["curry","curry_rice"],"๐Ÿœ":["ramen","steaming_bowl"],"๐Ÿ":["spaghetti"],"๐Ÿ ":["sweet_potato"],"๐Ÿข":["oden"],"๐Ÿฃ":["sushi"],"๐Ÿค":["fried_shrimp"],"๐Ÿฅ":["fish_cake"],"๐Ÿฅฎ":["moon_cake"],"๐Ÿก":["dango"],"๐ŸฅŸ":["dumpling"],"๐Ÿฅ ":["fortune_cookie"],"๐Ÿฅก":["takeout_box"],"๐Ÿฆ€":["crab"],"๐Ÿฆž":["lobster"],"๐Ÿฆ":["shrimp"],"๐Ÿฆ‘":["squid"],"๐Ÿฆช":["oyster"],"๐Ÿฆ":["icecream","soft_serve"],"๐Ÿง":["shaved_ice"],"๐Ÿจ":["ice_cream"],"๐Ÿฉ":["doughnut"],"๐Ÿช":["cookie"],"๐ŸŽ‚":["birthday","birthday_cake"],"๐Ÿฐ":["cake","shortcake"],"๐Ÿง":["cupcake"],"๐Ÿฅง":["pie"],"๐Ÿซ":["chocolate_bar"],"๐Ÿฌ":["candy"],"๐Ÿญ":["lollipop"],"๐Ÿฎ":["custard"],"๐Ÿฏ":["honey_pot"],"๐Ÿผ":["baby_bottle"],"๐Ÿฅ›":["glass_of_milk","milk"],"โ˜•๏ธ":["coffee"],"๐Ÿซ–":["teapot"],"๐Ÿต":["tea"],"๐Ÿถ":["sake"],"๐Ÿพ":["champagne"],"๐Ÿท":["wine_glass"],"๐Ÿธ๏ธ":["cocktail"],"๐Ÿน":["tropical_drink"],"๐Ÿบ":["beer"],"๐Ÿป":["beers"],"๐Ÿฅ‚":["clinking_glasses"],"๐Ÿฅƒ":["tumbler_glass","whisky"],"๐Ÿซ—":["pour","pouring_liquid"],"๐Ÿฅค":["cup_with_straw"],"๐Ÿง‹":["boba_drink","bubble_tea"],"๐Ÿงƒ":["beverage_box","juice_box"],"๐Ÿง‰":["mate"],"๐ŸงŠ":["ice","ice_cube"],"๐Ÿฅข":["chopsticks"],"๐Ÿฝ๏ธ":["fork_knife_plate"],"๐Ÿด":["fork_and_knife"],"๐Ÿฅ„":["spoon"],"๐Ÿ”ช":["knife"],"๐Ÿซ™":["jar"],"๐Ÿบ":["amphora"],"๐ŸŒ๏ธ":["earth_africa","earth_europe"],"๐ŸŒŽ๏ธ":["earth_americas"],"๐ŸŒ๏ธ":["earth_asia"],"๐ŸŒ":["globe_with_meridians"],"๐Ÿ—บ๏ธ":["world_map"],"๐Ÿ—พ":["japan_map"],"๐Ÿงญ":["compass"],"๐Ÿ”๏ธ":["mountain_snow"],"โ›ฐ๏ธ":["mountain"],"๐ŸŒ‹":["volcano"],"๐Ÿ—ป":["mount_fuji"],"๐Ÿ•๏ธ":["camping"],"๐Ÿ–๏ธ":["beach","beach_with_umbrella"],"๐Ÿœ๏ธ":["desert"],"๐Ÿ๏ธ":["desert_island","island"],"๐Ÿž๏ธ":["national_park"],"๐ŸŸ๏ธ":["stadium"],"๐Ÿ›๏ธ":["classical_building"],"๐Ÿ—๏ธ":["building_construction","construction_site"],"๐Ÿงฑ":["bricks"],"๐Ÿชจ":["rock"],"๐Ÿชต":["wood"],"๐Ÿ›–":["hut"],"๐Ÿ˜๏ธ":["homes","houses"],"๐Ÿš๏ธ":["derelict_house","house_abandoned"],"๐Ÿ ๏ธ":["house"],"๐Ÿก":["house_with_garden"],"๐Ÿข":["office"],"๐Ÿฃ":["post_office"],"๐Ÿค":["european_post_office"],"๐Ÿฅ":["hospital"],"๐Ÿฆ":["bank"],"๐Ÿจ":["hotel"],"๐Ÿฉ":["love_hotel"],"๐Ÿช":["convenience_store"],"๐Ÿซ":["school"],"๐Ÿฌ":["department_store"],"๐Ÿญ๏ธ":["factory"],"๐Ÿฏ":["japanese_castle"],"๐Ÿฐ":["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_dusk"],"๐ŸŒ‡":["city_sunrise","city_sunset"],"๐ŸŒ‰":["bridge_at_night"],"โ™จ๏ธ":["hotsprings"],"๐ŸŽ ":["carousel_horse"],"๐Ÿ›":["playground_slide","slide"],"๐ŸŽก":["ferris_wheel"],"๐ŸŽข":["roller_coaster"],"๐Ÿ’ˆ":["barber","barber_pole"],"๐ŸŽช":["circus_tent"],"๐Ÿš‚":["steam_locomotive"],"๐Ÿšƒ":["railway_car"],"๐Ÿš„":["bullettrain_side"],"๐Ÿš…":["bullettrain_front"],"๐Ÿš†":["train"],"๐Ÿš‡๏ธ":["metro"],"๐Ÿšˆ":["light_rail"],"๐Ÿš‰":["station"],"๐ŸšŠ":["tram"],"๐Ÿš":["monorail"],"๐Ÿšž":["mountain_railway"],"๐Ÿš‹":["tram_car"],"๐ŸšŒ":["bus"],"๐Ÿš๏ธ":["oncoming_bus"],"๐ŸšŽ":["trolleybus"],"๐Ÿš":["minibus"],"๐Ÿš‘๏ธ":["ambulance"],"๐Ÿš’":["fire_engine"],"๐Ÿš“":["police_car"],"๐Ÿš”๏ธ":["oncoming_police_car"],"๐Ÿš•":["taxi"],"๐Ÿš–":["oncoming_taxi"],"๐Ÿš—":["car","red_car"],"๐Ÿš˜๏ธ":["oncoming_automobile"],"๐Ÿš™":["blue_car","suv"],"๐Ÿ›ป":["pickup_truck"],"๐Ÿšš":["delivery_truck","truck"],"๐Ÿš›":["articulated_lorry"],"๐Ÿšœ":["tractor"],"๐ŸŽ๏ธ":["racing_car"],"๐Ÿ๏ธ":["motorcycle"],"๐Ÿ›ต":["motor_scooter"],"๐Ÿฆฝ":["manual_wheelchair"],"๐Ÿฆผ":["motorized_wheelchair"],"๐Ÿ›บ":["auto_rickshaw"],"๐Ÿšฒ๏ธ":["bicycle","bike"],"๐Ÿ›ด":["scooter"],"๐Ÿ›น":["skateboard"],"๐Ÿ›ผ":["roller_skate"],"๐Ÿš":["busstop"],"๐Ÿ›ฃ๏ธ":["motorway"],"๐Ÿ›ค๏ธ":["railway_track"],"๐Ÿ›ข๏ธ":["oil_drum"],"โ›ฝ๏ธ":["fuelpump"],"๐Ÿ›ž":["wheel"],"๐Ÿšจ":["rotating_light"],"๐Ÿšฅ":["traffic_light"],"๐Ÿšฆ":["vertical_traffic_light"],"๐Ÿ›‘":["octagonal_sign","stop_sign"],"๐Ÿšง":["construction"],"โš“๏ธ":["anchor"],"๐Ÿ›Ÿ":["lifebuoy","ring_buoy"],"โ›ต๏ธ":["sailboat"],"๐Ÿ›ถ":["canoe"],"๐Ÿšค":["speedboat"],"๐Ÿ›ณ๏ธ":["cruise_ship","passenger_ship"],"โ›ด๏ธ":["ferry"],"๐Ÿ›ฅ๏ธ":["motorboat"],"๐Ÿšข":["ship"],"โœˆ๏ธ":["airplane"],"๐Ÿ›ฉ๏ธ":["small_airplane"],"๐Ÿ›ซ":["airplane_departure"],"๐Ÿ›ฌ":["airplane_arriving"],"๐Ÿช‚":["parachute"],"๐Ÿ’บ":["seat"],"๐Ÿš":["helicopter"],"๐ŸšŸ":["suspension_railway"],"๐Ÿš ":["mountain_cableway"],"๐Ÿšก":["aerial_tramway"],"๐Ÿ›ฐ๏ธ":["satellite"],"๐Ÿš€":["rocket"],"๐Ÿ›ธ":["flying_saucer"],"๐Ÿ›Ž๏ธ":["bellhop"],"๐Ÿงณ":["luggage"],"โŒ›๏ธ":["hourglass"],"โณ๏ธ":["hourglass_flowing_sand"],"โŒš๏ธ":["watch"],"โฐ":["alarm_clock"],"โฑ๏ธ":["stopwatch"],"โฒ๏ธ":["timer_clock"],"๐Ÿ•ฐ๏ธ":["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"],"๐ŸŒ”":["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"],"โ˜€๏ธ":["sun"],"๐ŸŒ":["full_moon_with_face"],"๐ŸŒž":["sun_with_face"],"๐Ÿช":["ringed_planet","saturn"],"โญ๏ธ":["star"],"๐ŸŒŸ":["glowing_star","star2"],"๐ŸŒ ":["shooting_star","stars"],"๐ŸŒŒ":["milky_way"],"โ˜๏ธ":["cloud"],"โ›…๏ธ":["partly_sunny","sun_behind_cloud"],"โ›ˆ๏ธ":["stormy","thunder_cloud_and_rain"],"๐ŸŒค๏ธ":["sun_behind_small_cloud","sunny"],"๐ŸŒฅ๏ธ":["cloudy","sun_behind_large_cloud"],"๐ŸŒฆ๏ธ":["sun_and_rain","sun_behind_rain_cloud"],"๐ŸŒง๏ธ":["cloud_with_rain","rainy"],"๐ŸŒจ๏ธ":["cloud_with_snow","snowy"],"๐ŸŒฉ๏ธ":["cloud_with_lightning","lightning"],"๐ŸŒช๏ธ":["tornado"],"๐ŸŒซ๏ธ":["fog"],"๐ŸŒฌ๏ธ":["wind_blowing_face"],"๐ŸŒ€":["cyclone"],"๐ŸŒˆ":["rainbow"],"๐ŸŒ‚":["closed_umbrella"],"โ˜‚๏ธ":["umbrella"],"โ˜”๏ธ":["umbrella_with_rain"],"โ›ฑ๏ธ":["beach_umbrella","umbrella_on_ground"],"โšก๏ธ":["high_voltage","zap"],"โ„๏ธ":["snowflake"],"โ˜ƒ๏ธ":["snowman2"],"โ›„๏ธ":["snowman"],"โ˜„๏ธ":["comet"],"๐Ÿ”ฅ":["fire"],"๐Ÿ’ง":["droplet"],"๐ŸŒŠ":["ocean","water_wave"],"๐ŸŽƒ":["jack_o_lantern"],"๐ŸŽ„":["christmas_tree"],"๐ŸŽ†":["fireworks"],"๐ŸŽ‡":["sparkler"],"๐Ÿงจ":["firecracker"],"โœจ":["sparkles"],"๐ŸŽˆ":["balloon"],"๐ŸŽ‰":["party","party_popper","tada"],"๐ŸŽŠ":["confetti_ball"],"๐ŸŽ‹":["tanabata_tree"],"๐ŸŽ":["bamboo"],"๐ŸŽŽ":["dolls"],"๐ŸŽ":["carp_streamer","flags"],"๐ŸŽ":["wind_chime"],"๐ŸŽ‘":["moon_ceremony","rice_scene"],"๐Ÿงง":["red_envelope"],"๐ŸŽ€":["ribbon"],"๐ŸŽ":["gift"],"๐ŸŽ—๏ธ":["reminder_ribbon"],"๐ŸŽŸ๏ธ":["admission_tickets","tickets"],"๐ŸŽซ":["ticket"],"๐ŸŽ–๏ธ":["military_medal"],"๐Ÿ†๏ธ":["trophy"],"๐Ÿ…":["sports_medal"],"๐Ÿฅ‡":["1st","first_place_medal"],"๐Ÿฅˆ":["2nd","second_place_medal"],"๐Ÿฅ‰":["3rd","third_place_medal"],"โšฝ๏ธ":["soccer"],"โšพ๏ธ":["baseball"],"๐ŸฅŽ":["softball"],"๐Ÿ€":["basketball"],"๐Ÿ":["volleyball"],"๐Ÿˆ":["football"],"๐Ÿ‰":["rugby_football"],"๐ŸŽพ":["tennis"],"๐Ÿฅ":["flying_disc"],"๐ŸŽณ":["bowling"],"๐Ÿ":["cricket_game"],"๐Ÿ‘":["field_hockey"],"๐Ÿ’":["hockey"],"๐Ÿฅ":["lacrosse"],"๐Ÿ“":["ping_pong"],"๐Ÿธ":["badminton"],"๐ŸฅŠ":["boxing_glove"],"๐Ÿฅ‹":["martial_arts_uniform"],"๐Ÿฅ…":["goal_net"],"โ›ณ๏ธ":["golf"],"โ›ธ๏ธ":["ice_skate"],"๐ŸŽฃ":["fishing_pole","fishing_pole_and_fish"],"๐Ÿคฟ":["diving_mask"],"๐ŸŽฝ":["running_shirt","running_shirt_with_sash"],"๐ŸŽฟ":["ski"],"๐Ÿ›ท":["sled"],"๐ŸฅŒ":["curling_stone"],"๐ŸŽฏ":["bullseye","dart","direct_hit"],"๐Ÿช€":["yo_yo"],"๐Ÿช":["kite"],"๐ŸŽฑ":["8ball","billiards"],"๐Ÿ”ฎ":["crystal_ball"],"๐Ÿช„":["magic_wand"],"๐Ÿงฟ":["nazar_amulet"],"๐Ÿชฌ":["hamsa"],"๐ŸŽฎ๏ธ":["controller","video_game"],"๐Ÿ•น๏ธ":["joystick"],"๐ŸŽฐ":["slot_machine"],"๐ŸŽฒ":["game_die"],"๐Ÿงฉ":["jigsaw","puzzle_piece"],"๐Ÿงธ":["teddy_bear"],"๐Ÿช…":["pinata"],"๐Ÿชฉ":["disco","disco_ball","mirror_ball"],"๐Ÿช†":["nesting_dolls"],"โ™ ๏ธ":["spades"],"โ™ฅ๏ธ":["hearts"],"โ™ฆ๏ธ":["diamonds"],"โ™ฃ๏ธ":["clubs"],"โ™Ÿ๏ธ":["chess_pawn"],"๐Ÿƒ":["black_joker"],"๐Ÿ€„๏ธ":["mahjong"],"๐ŸŽด":["flower_playing_cards"],"๐ŸŽญ๏ธ":["performing_arts"],"๐Ÿ–ผ๏ธ":["frame_with_picture","framed_picture"],"๐ŸŽจ":["art","palette"],"๐Ÿงต":["thread"],"๐Ÿชก":["sewing_needle"],"๐Ÿงถ":["yarn"],"๐Ÿชข":["knot"],"๐Ÿ‘“๏ธ":["eyeglasses","glasses"],"๐Ÿ•ถ๏ธ":["sunglasses"],"๐Ÿฅฝ":["goggles"],"๐Ÿฅผ":["lab_coat"],"๐Ÿฆบ":["safety_vest"],"๐Ÿ‘”":["necktie"],"๐Ÿ‘•":["shirt"],"๐Ÿ‘–":["jeans"],"๐Ÿงฃ":["scarf"],"๐Ÿงค":["gloves"],"๐Ÿงฅ":["coat"],"๐Ÿงฆ":["socks"],"๐Ÿ‘—":["dress"],"๐Ÿ‘˜":["kimono"],"๐Ÿฅป":["sari"],"๐Ÿฉฑ":["one_piece_swimsuit"],"๐Ÿฉฒ":["briefs"],"๐Ÿฉณ":["shorts"],"๐Ÿ‘™":["bikini"],"๐Ÿ‘š":["womans_clothes"],"๐Ÿ‘›":["purse"],"๐Ÿ‘œ":["handbag"],"๐Ÿ‘":["clutch_bag","pouch"],"๐Ÿ›๏ธ":["shopping_bags"],"๐ŸŽ’":["backpack","school_satchel"],"๐Ÿฉด":["thong_sandal"],"๐Ÿ‘ž":["mans_shoe"],"๐Ÿ‘Ÿ":["athletic_shoe","sneaker"],"๐Ÿฅพ":["hiking_boot"],"๐Ÿฅฟ":["flat_shoe","womans_flat_shoe"],"๐Ÿ‘ ":["high_heel"],"๐Ÿ‘ก":["sandal"],"๐Ÿฉฐ":["ballet_shoes"],"๐Ÿ‘ข":["boot"],"๐Ÿ‘‘":["crown"],"๐Ÿ‘’":["womans_hat"],"๐ŸŽฉ":["top_hat","tophat"],"๐ŸŽ“๏ธ":["graduation_cap","mortar_board"],"๐Ÿงข":["billed_cap"],"๐Ÿช–":["military_helmet"],"โ›‘๏ธ":["helmet_with_cross","rescue_worker_helmet"],"๐Ÿ“ฟ":["prayer_beads"],"๐Ÿ’„":["lipstick"],"๐Ÿ’":["ring"],"๐Ÿ’Ž":["gem"],"๐Ÿ”‡":["mute","no_sound"],"๐Ÿ”ˆ๏ธ":["low_volume","quiet_sound","speaker"],"๐Ÿ”‰":["medium_volumne","sound"],"๐Ÿ”Š":["high_volume","loud_sound"],"๐Ÿ“ข":["loudspeaker"],"๐Ÿ“ฃ":["mega","megaphone"],"๐Ÿ“ฏ":["postal_horn"],"๐Ÿ””":["bell"],"๐Ÿ”•":["no_bell"],"๐ŸŽผ":["musical_score"],"๐ŸŽต":["musical_note"],"๐ŸŽถ":["musical_notes","notes"],"๐ŸŽ™๏ธ":["studio_microphone"],"๐ŸŽš๏ธ":["level_slider"],"๐ŸŽ›๏ธ":["control_knobs"],"๐ŸŽค":["microphone"],"๐ŸŽง๏ธ":["headphones"],"๐Ÿ“ป๏ธ":["radio"],"๐ŸŽท":["saxophone"],"๐Ÿช—":["accordion"],"๐ŸŽธ":["guitar"],"๐ŸŽน":["musical_keyboard"],"๐ŸŽบ":["trumpet"],"๐ŸŽป":["violin"],"๐Ÿช•":["banjo"],"๐Ÿฅ":["drum"],"๐Ÿช˜":["long_drum"],"๐Ÿ“ฑ":["android","iphone","mobile_phone"],"๐Ÿ“ฒ":["calling","mobile_phone_arrow"],"โ˜Ž๏ธ":["telephone"],"๐Ÿ“ž":["telephone_receiver"],"๐Ÿ“Ÿ๏ธ":["pager"],"๐Ÿ“ ":["fax","fax_machine"],"๐Ÿ”‹":["battery"],"๐Ÿชซ":["low_battery"],"๐Ÿ”Œ":["electric_plug"],"๐Ÿ’ป๏ธ":["laptop"],"๐Ÿ–ฅ๏ธ":["computer","desktop_computer"],"๐Ÿ–จ๏ธ":["printer"],"โŒจ๏ธ":["keyboard"],"๐Ÿ–ฑ๏ธ":["computer_mouse"],"๐Ÿ–ฒ๏ธ":["trackball"],"๐Ÿ’ฝ":["computer_disk","minidisc"],"๐Ÿ’พ":["floppy_disk"],"๐Ÿ’ฟ๏ธ":["cd","optical_disk"],"๐Ÿ“€":["dvd"],"๐Ÿงฎ":["abacus"],"๐ŸŽฅ":["movie_camera"],"๐ŸŽž๏ธ":["film_frames"],"๐Ÿ“ฝ๏ธ":["film_projector"],"๐ŸŽฌ๏ธ":["clapper"],"๐Ÿ“บ๏ธ":["tv"],"๐Ÿ“ท๏ธ":["camera"],"๐Ÿ“ธ":["camera_with_flash"],"๐Ÿ“น๏ธ":["video_camera"],"๐Ÿ“ผ":["vhs","videocassette"],"๐Ÿ”๏ธ":["mag"],"๐Ÿ”Ž":["mag_right"],"๐Ÿ•ฏ๏ธ":["candle"],"๐Ÿ’ก":["bulb","light_bulb"],"๐Ÿ”ฆ":["flashlight"],"๐Ÿฎ":["izakaya_lantern","red_paper_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"],"๐Ÿ—ž๏ธ":["rolled_up_newspaper"],"๐Ÿ“‘":["bookmark_tabs"],"๐Ÿ”–":["bookmark"],"๐Ÿท๏ธ":["label"],"๐Ÿ’ฐ๏ธ":["moneybag"],"๐Ÿช™":["coin"],"๐Ÿ’ด":["yen"],"๐Ÿ’ต":["dollar"],"๐Ÿ’ถ":["euro"],"๐Ÿ’ท":["pound"],"๐Ÿ’ธ":["money_with_wings"],"๐Ÿ’ณ๏ธ":["credit_card"],"๐Ÿงพ":["receipt"],"๐Ÿ’น":["chart"],"โœ‰๏ธ":["envelope"],"๐Ÿ“ง":["e-mail","email"],"๐Ÿ“จ":["incoming_envelope"],"๐Ÿ“ฉ":["envelope_with_arrow"],"๐Ÿ“ค๏ธ":["outbox_tray"],"๐Ÿ“ฅ๏ธ":["inbox_tray"],"๐Ÿ“ฆ๏ธ":["package"],"๐Ÿ“ซ๏ธ":["mailbox"],"๐Ÿ“ช๏ธ":["mailbox_closed"],"๐Ÿ“ฌ๏ธ":["mailbox_with_mail"],"๐Ÿ“ญ๏ธ":["mailbox_with_no_mail"],"๐Ÿ“ฎ":["postbox"],"๐Ÿ—ณ๏ธ":["ballot_box"],"โœ๏ธ":["pencil"],"โœ’๏ธ":["black_nib"],"๐Ÿ–‹๏ธ":["fountain_pen"],"๐Ÿ–Š๏ธ":["pen"],"๐Ÿ–Œ๏ธ":["paintbrush"],"๐Ÿ–๏ธ":["crayon"],"๐Ÿ“":["memo"],"๐Ÿ’ผ":["briefcase"],"๐Ÿ“":["file_folder"],"๐Ÿ“‚":["open_file_folder"],"๐Ÿ—‚๏ธ":["card_index_dividers"],"๐Ÿ“…":["date"],"๐Ÿ“†":["calendar"],"๐Ÿ—’๏ธ":["notepad_spiral"],"๐Ÿ—“๏ธ":["calendar_spiral"],"๐Ÿ“‡":["card_index"],"๐Ÿ“ˆ":["chart_increasing","chart_with_upwards_trend"],"๐Ÿ“‰":["chart_decreasing","chart_with_downwards_trend"],"๐Ÿ“Š":["bar_chart"],"๐Ÿ“‹๏ธ":["clipboard"],"๐Ÿ“Œ":["pushpin"],"๐Ÿ“":["round_pushpin"],"๐Ÿ“Ž":["paperclip"],"๐Ÿ–‡๏ธ":["paperclips"],"๐Ÿ“":["straight_ruler"],"๐Ÿ“":["triangular_ruler"],"โœ‚๏ธ":["scissors"],"๐Ÿ—ƒ๏ธ":["card_file_box"],"๐Ÿ—„๏ธ":["file_cabinet"],"๐Ÿ—‘๏ธ":["trashcan","wastebasket"],"๐Ÿ”’๏ธ":["lock","locked"],"๐Ÿ”“๏ธ":["unlock","unlocked"],"๐Ÿ”":["lock_with_ink_pen","locked_with_pen"],"๐Ÿ”":["closed_lock_with_key","locked_with_key"],"๐Ÿ”‘":["key"],"๐Ÿ—๏ธ":["old_key"],"๐Ÿ”จ":["hammer"],"๐Ÿช“":["axe"],"โ›๏ธ":["pick"],"โš’๏ธ":["hammer_and_pick"],"๐Ÿ› ๏ธ":["hammer_and_wrench"],"๐Ÿ—ก๏ธ":["dagger"],"โš”๏ธ":["crossed_swords"],"๐Ÿ”ซ":["gun","pistol"],"๐Ÿชƒ":["boomerang"],"๐Ÿน":["bow_and_arrow"],"๐Ÿ›ก๏ธ":["shield"],"๐Ÿชš":["carpentry_saw"],"๐Ÿ”ง":["wrench"],"๐Ÿช›":["screwdriver"],"๐Ÿ”ฉ":["nut_and_bolt"],"โš™๏ธ":["gear"],"๐Ÿ—œ๏ธ":["clamp","compression"],"โš–๏ธ":["scales"],"๐Ÿฆฏ":["probing_cane","white_cane"],"๐Ÿ”—":["link"],"โ›“๏ธ":["chains"],"๐Ÿช":["hook"],"๐Ÿงฐ":["toolbox"],"๐Ÿงฒ":["magnet"],"๐Ÿชœ":["ladder"],"โš—๏ธ":["alembic"],"๐Ÿงช":["test_tube"],"๐Ÿงซ":["petri_dish"],"๐Ÿงฌ":["dna","double_helix"],"๐Ÿ”ฌ":["microscope"],"๐Ÿ”ญ":["telescope"],"๐Ÿ“ก":["satellite_antenna"],"๐Ÿ’‰":["syringe"],"๐Ÿฉธ":["drop_of_blood"],"๐Ÿ’Š":["pill"],"๐Ÿฉน":["adhesive_bandage","bandaid"],"๐Ÿฉผ":["crutch"],"๐Ÿฉบ":["stethoscope"],"๐Ÿฉป":["x-ray","xray"],"๐Ÿšช":["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","toilet_paper"],"๐Ÿชฃ":["bucket"],"๐Ÿงผ":["soap"],"๐Ÿซง":["bubbles"],"๐Ÿชฅ":["toothbrush"],"๐Ÿงฝ":["sponge"],"๐Ÿงฏ":["fire_extinguisher"],"๐Ÿ›’":["shopping_cart"],"๐Ÿšฌ":["cigarette","smoking"],"โšฐ๏ธ":["coffin"],"๐Ÿชฆ":["headstone"],"โšฑ๏ธ":["funeral_urn"],"๐Ÿ—ฟ":["moai","moyai"],"๐Ÿชง":["placard"],"๐Ÿชช":["id_card"],"๐Ÿง":["atm"],"๐Ÿšฎ":["litter_bin","put_litter_in_its_place"],"๐Ÿšฐ":["potable_water"],"โ™ฟ๏ธ":["handicapped","wheelchair"],"๐Ÿšน๏ธ":["mens"],"๐Ÿšบ๏ธ":["womens"],"๐Ÿšป":["bathroom","restroom"],"๐Ÿšผ๏ธ":["baby_symbol"],"๐Ÿšพ":["water_closet","wc"],"๐Ÿ›‚":["passport_control"],"๐Ÿ›ƒ":["customs"],"๐Ÿ›„":["baggage_claim"],"๐Ÿ›…":["left_luggage"],"โš ๏ธ":["warning"],"๐Ÿšธ":["children_crossing"],"โ›”๏ธ":["no_entry"],"๐Ÿšซ":["no_entry_sign"],"๐Ÿšณ":["no_bicycles"],"๐Ÿšญ๏ธ":["no_smoking"],"๐Ÿšฏ":["do_not_litter","no_littering"],"๐Ÿšฑ":["non-potable_water"],"๐Ÿšท":["no_pedestrians"],"๐Ÿ“ต":["no_mobile_phones"],"๐Ÿ”ž":["no_one_under_18","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"],"โ†ฉ๏ธ":["arrow_left_hook","leftwards_arrow_with_hook"],"โ†ช๏ธ":["arrow_right_hook","rightwards_arrow_with_hook"],"โคด๏ธ":["arrow_heading_up"],"โคต๏ธ":["arrow_heading_down"],"๐Ÿ”ƒ":["arrows_clockwise","clockwise"],"๐Ÿ”„":["arrows_counterclockwise","counterclockwise"],"๐Ÿ”™":["back"],"๐Ÿ”š":["end"],"๐Ÿ”›":["on"],"๐Ÿ”œ":["soon"],"๐Ÿ”":["top"],"๐Ÿ›":["place_of_worship"],"โš›๏ธ":["atom","atom_symbol"],"๐Ÿ•‰๏ธ":["om"],"โœก๏ธ":["star_of_david"],"โ˜ธ๏ธ":["wheel_of_dharma"],"โ˜ฏ๏ธ":["yin_yang"],"โœ๏ธ":["latin_cross"],"โ˜ฆ๏ธ":["orthodox_cross"],"โ˜ช๏ธ":["star_and_crescent"],"โ˜ฎ๏ธ":["peace","peace_symbol"],"๐Ÿ•Ž":["menorah"],"๐Ÿ”ฏ":["six_pointed_star"],"โ™ˆ๏ธ":["aries"],"โ™‰๏ธ":["taurus"],"โ™Š๏ธ":["gemini"],"โ™‹๏ธ":["cancer"],"โ™Œ๏ธ":["leo"],"โ™๏ธ":["virgo"],"โ™Ž๏ธ":["libra"],"โ™๏ธ":["scorpius"],"โ™๏ธ":["sagittarius"],"โ™‘๏ธ":["capricorn"],"โ™’๏ธ":["aquarius"],"โ™“๏ธ":["pisces"],"โ›Ž":["ophiuchus"],"๐Ÿ”€":["shuffle","twisted_rightwards_arrows"],"๐Ÿ”":["repeat"],"๐Ÿ”‚":["repeat_one"],"โ–ถ๏ธ":["arrow_forward","play"],"โฉ๏ธ":["fast_forward"],"โญ๏ธ":["next_track"],"โฏ๏ธ":["play_pause"],"โ—€๏ธ":["arrow_backward","reverse"],"โช๏ธ":["fast_reverse","rewind"],"โฎ๏ธ":["previous_track"],"๐Ÿ”ผ":["arrow_up_small","up"],"โซ":["arrow_double_up","fast_up"],"๐Ÿ”ฝ":["arrow_down_small","down"],"โฌ":["arrow_double_down","fast_down"],"โธ๏ธ":["pause"],"โน๏ธ":["stop"],"โบ๏ธ":["record"],"โ๏ธ":["eject"],"๐ŸŽฆ":["cinema"],"๐Ÿ”…":["dim_button","low_brightness"],"๐Ÿ”†":["bright_button","high_brightness"],"๐Ÿ“ถ":["antenna_bars","signal_strength"],"๐Ÿ“ณ":["vibration_mode"],"๐Ÿ“ด":["mobile_phone_off"],"โ™€๏ธ":["female","female_sign"],"โ™‚๏ธ":["male","male_sign"],"โšง๏ธ":["transgender_symbol"],"โœ–๏ธ":["multiplication","multiply"],"โž•":["plus"],"โž–":["minus"],"โž—":["divide","division"],"๐ŸŸฐ":["heavy_equals_sign"],"โ™พ๏ธ":["infinity"],"โ€ผ๏ธ":["bangbang","double_exclamation"],"โ‰๏ธ":["exclamation_question","interrobang"],"โ“๏ธ":["question"],"โ”":["white_question"],"โ•":["white_exclamation"],"โ—๏ธ":["exclamation"],"ใ€ฐ๏ธ":["wavy_dash"],"๐Ÿ’ฑ":["currency_exchange"],"๐Ÿ’ฒ":["heavy_dollar_sign"],"โš•๏ธ":["medical","medical_symbol"],"โ™ป๏ธ":["recycle","recycling_symbol"],"โšœ๏ธ":["fleur-de-lis"],"๐Ÿ”ฑ":["trident"],"๐Ÿ“›":["name_badge"],"๐Ÿ”ฐ":["beginner"],"โญ•๏ธ":["hollow_red_circle","red_o"],"โœ…":["check_mark_button","white_check_mark"],"โ˜‘๏ธ":["ballot_box_with_check"],"โœ”๏ธ":["check_mark","heavy_check_mark"],"โŒ":["cross_mark","x"],"โŽ":["cross_mark_button","negative_squared_cross_mark"],"โžฐ":["curly_loop"],"โžฟ":["double_curly_loop","loop"],"ใ€ฝ๏ธ":["part_alternation_mark"],"โœณ๏ธ":["eight_spoked_asterisk"],"โœด๏ธ":["eight_pointed_black_star"],"โ‡๏ธ":["sparkle"],"ยฉ๏ธ":["copyright"],"ยฎ๏ธ":["registered"],"โ„ข๏ธ":["tm","trade_mark"],"#๏ธโƒฃ":["hash","number_sign"],"*๏ธโƒฃ":["asterisk"],"0๏ธโƒฃ":["zero"],"1๏ธโƒฃ":["one"],"2๏ธโƒฃ":["two"],"3๏ธโƒฃ":["three"],"4๏ธโƒฃ":["four"],"5๏ธโƒฃ":["five"],"6๏ธโƒฃ":["six"],"7๏ธโƒฃ":["seven"],"8๏ธโƒฃ":["eight"],"9๏ธโƒฃ":["nine"],"๐Ÿ”Ÿ":["ten"],"๐Ÿ” ":["capital_abcd"],"๐Ÿ”ก":["abcd"],"๐Ÿ”ข":["1234"],"๐Ÿ”ฃ":["symbols"],"๐Ÿ”ค":["abc"],"๐Ÿ…ฐ๏ธ":["a","a_blood"],"๐Ÿ†Ž":["ab","ab_blood"],"๐Ÿ…ฑ๏ธ":["b","b_blood"],"๐Ÿ†‘":["cl"],"๐Ÿ†’":["cool"],"๐Ÿ†“":["free"],"โ„น๏ธ":["info","information_source"],"๐Ÿ†”":["id"],"โ“‚๏ธ":["m"],"๐Ÿ†•":["new"],"๐Ÿ†–":["ng"],"๐Ÿ…พ๏ธ":["o","o_blood"],"๐Ÿ†—":["ok"],"๐Ÿ…ฟ๏ธ":["parking"],"๐Ÿ†˜":["sos"],"๐Ÿ†™":["up2"],"๐Ÿ†š":["vs"],"๐Ÿˆ":["ja_here","koko"],"๐Ÿˆ‚๏ธ":["ja_service_charge"],"๐Ÿˆท๏ธ":["ja_monthly_amount"],"๐Ÿˆถ":["ja_not_free_of_carge"],"๐Ÿˆฏ๏ธ":["ja_reserved"],"๐Ÿ‰":["ideograph_advantage","ja_bargain"],"๐Ÿˆน":["ja_discount"],"๐Ÿˆš๏ธ":["ja_free_of_charge"],"๐Ÿˆฒ":["ja_prohibited"],"๐Ÿ‰‘":["accept","ja_acceptable"],"๐Ÿˆธ":["ja_application"],"๐Ÿˆด":["ja_passing_grade"],"๐Ÿˆณ":["ja_vacancy"],"ใŠ—๏ธ":["congratulations","ja_congratulations"],"ใŠ™๏ธ":["ja_secret","secret"],"๐Ÿˆบ":["ja_open_for_business"],"๐Ÿˆต":["ja_no_vacancy"],"๐Ÿ”ด":["red_circle"],"๐ŸŸ ":["orange_circle"],"๐ŸŸก":["yellow_circle"],"๐ŸŸข":["green_circle"],"๐Ÿ”ต":["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","diamond_with_a_dot"],"๐Ÿ”˜":["radio_button"],"๐Ÿ”ณ":["white_square_button"],"๐Ÿ”ฒ":["black_square_button"],"๐Ÿ":["checkered_flag"],"๐Ÿšฉ":["triangular_flag","triangular_flag_on_post"],"๐ŸŽŒ":["crossed_flags"],"๐Ÿด":["black_flag"],"๐Ÿณ๏ธ":["white_flag"],"๐Ÿณ๏ธโ€๐ŸŒˆ":["rainbow_flag"],"๐Ÿณ๏ธโ€โšง๏ธ":["transgender_flag"],"๐Ÿดโ€โ˜ ๏ธ":["jolly_roger","pirate_flag"],"๐Ÿ‡ฆ๐Ÿ‡จ":["ascension_island","flag_ac"],"๐Ÿ‡ฆ๐Ÿ‡ฉ":["andorra","flag_ad"],"๐Ÿ‡ฆ๐Ÿ‡ช":["flag_ae","united_arab_emirates"],"๐Ÿ‡ฆ๐Ÿ‡ซ":["afghanistan","flag_af"],"๐Ÿ‡ฆ๐Ÿ‡ฌ":["antigua_barbuda","flag_ag"],"๐Ÿ‡ฆ๐Ÿ‡ฎ":["anguilla","flag_ai"],"๐Ÿ‡ฆ๐Ÿ‡ฑ":["albania","flag_al"],"๐Ÿ‡ฆ๐Ÿ‡ฒ":["armenia","flag_am"],"๐Ÿ‡ฆ๐Ÿ‡ด":["angola","flag_ao"],"๐Ÿ‡ฆ๐Ÿ‡ถ":["antarctica","flag_aq"],"๐Ÿ‡ฆ๐Ÿ‡ท":["argentina","flag_ar"],"๐Ÿ‡ฆ๐Ÿ‡ธ":["american_samoa","flag_as"],"๐Ÿ‡ฆ๐Ÿ‡น":["austria","flag_at"],"๐Ÿ‡ฆ๐Ÿ‡บ":["australia","flag_au"],"๐Ÿ‡ฆ๐Ÿ‡ผ":["aruba","flag_aw"],"๐Ÿ‡ฆ๐Ÿ‡ฝ":["aland_islands","flag_ax"],"๐Ÿ‡ฆ๐Ÿ‡ฟ":["azerbaijan","flag_az"],"๐Ÿ‡ง๐Ÿ‡ฆ":["bosnia_herzegovina","flag_ba"],"๐Ÿ‡ง๐Ÿ‡ง":["barbados","flag_bb"],"๐Ÿ‡ง๐Ÿ‡ฉ":["bangladesh","flag_bd"],"๐Ÿ‡ง๐Ÿ‡ช":["belgium","flag_be"],"๐Ÿ‡ง๐Ÿ‡ซ":["burkina_faso","flag_bf"],"๐Ÿ‡ง๐Ÿ‡ฌ":["bulgaria","flag_bg"],"๐Ÿ‡ง๐Ÿ‡ญ":["bahrain","flag_bh"],"๐Ÿ‡ง๐Ÿ‡ฎ":["burundi","flag_bi"],"๐Ÿ‡ง๐Ÿ‡ฏ":["benin","flag_bj"],"๐Ÿ‡ง๐Ÿ‡ฑ":["flag_bl","st_barthelemy"],"๐Ÿ‡ง๐Ÿ‡ฒ":["bermuda","flag_bm"],"๐Ÿ‡ง๐Ÿ‡ณ":["brunei","flag_bn"],"๐Ÿ‡ง๐Ÿ‡ด":["bolivia","flag_bo"],"๐Ÿ‡ง๐Ÿ‡ถ":["caribbean_netherlands","flag_bq"],"๐Ÿ‡ง๐Ÿ‡ท":["brazil","flag_br"],"๐Ÿ‡ง๐Ÿ‡ธ":["bahamas","flag_bs"],"๐Ÿ‡ง๐Ÿ‡น":["bhutan","flag_bt"],"๐Ÿ‡ง๐Ÿ‡ป":["bouvet_island","flag_bv"],"๐Ÿ‡ง๐Ÿ‡ผ":["botswana","flag_bw"],"๐Ÿ‡ง๐Ÿ‡พ":["belarus","flag_by"],"๐Ÿ‡ง๐Ÿ‡ฟ":["belize","flag_bz"],"๐Ÿ‡จ๐Ÿ‡ฆ":["canada","flag_ca"],"๐Ÿ‡จ๐Ÿ‡จ":["cocos_islands","flag_cc"],"๐Ÿ‡จ๐Ÿ‡ฉ":["congo_kinshasa","flag_cd"],"๐Ÿ‡จ๐Ÿ‡ซ":["central_african_republic","flag_cf"],"๐Ÿ‡จ๐Ÿ‡ฌ":["congo_brazzaville","flag_cg"],"๐Ÿ‡จ๐Ÿ‡ญ":["flag_ch","switzerland"],"๐Ÿ‡จ๐Ÿ‡ฎ":["cote_divoire","flag_ci"],"๐Ÿ‡จ๐Ÿ‡ฐ":["cook_islands","flag_ck"],"๐Ÿ‡จ๐Ÿ‡ฑ":["chile","flag_cl"],"๐Ÿ‡จ๐Ÿ‡ฒ":["cameroon","flag_cm"],"๐Ÿ‡จ๐Ÿ‡ณ":["china","flag_cn"],"๐Ÿ‡จ๐Ÿ‡ด":["colombia","flag_co"],"๐Ÿ‡จ๐Ÿ‡ต":["clipperton_island","flag_cp"],"๐Ÿ‡จ๐Ÿ‡ท":["costa_rica","flag_cr"],"๐Ÿ‡จ๐Ÿ‡บ":["cuba","flag_cu"],"๐Ÿ‡จ๐Ÿ‡ป":["cape_verde","flag_cv"],"๐Ÿ‡จ๐Ÿ‡ผ":["curacao","flag_cw"],"๐Ÿ‡จ๐Ÿ‡ฝ":["christmas_island","flag_cx"],"๐Ÿ‡จ๐Ÿ‡พ":["cyprus","flag_cy"],"๐Ÿ‡จ๐Ÿ‡ฟ":["czech_republic","czechia","flag_cz"],"๐Ÿ‡ฉ๐Ÿ‡ช":["flag_de","germany"],"๐Ÿ‡ฉ๐Ÿ‡ฌ":["diego_garcia","flag_dg"],"๐Ÿ‡ฉ๐Ÿ‡ฏ":["djibouti","flag_dj"],"๐Ÿ‡ฉ๐Ÿ‡ฐ":["denmark","flag_dk"],"๐Ÿ‡ฉ๐Ÿ‡ฒ":["dominica","flag_dm"],"๐Ÿ‡ฉ๐Ÿ‡ด":["dominican_republic","flag_do"],"๐Ÿ‡ฉ๐Ÿ‡ฟ":["algeria","flag_dz"],"๐Ÿ‡ช๐Ÿ‡ฆ":["ceuta_melilla","flag_ea"],"๐Ÿ‡ช๐Ÿ‡จ":["ecuador","flag_ec"],"๐Ÿ‡ช๐Ÿ‡ช":["estonia","flag_ee"],"๐Ÿ‡ช๐Ÿ‡ฌ":["egypt","flag_eg"],"๐Ÿ‡ช๐Ÿ‡ญ":["flag_eh","western_sahara"],"๐Ÿ‡ช๐Ÿ‡ท":["eritrea","flag_er"],"๐Ÿ‡ช๐Ÿ‡ธ":["flag_es","spain"],"๐Ÿ‡ช๐Ÿ‡น":["ethiopia","flag_et"],"๐Ÿ‡ช๐Ÿ‡บ":["european_union","flag_eu"],"๐Ÿ‡ซ๐Ÿ‡ฎ":["finland","flag_fi"],"๐Ÿ‡ซ๐Ÿ‡ฏ":["fiji","flag_fj"],"๐Ÿ‡ซ๐Ÿ‡ฐ":["falkland_islands","flag_fk"],"๐Ÿ‡ซ๐Ÿ‡ฒ":["flag_fm","micronesia"],"๐Ÿ‡ซ๐Ÿ‡ด":["faroe_islands","flag_fo"],"๐Ÿ‡ซ๐Ÿ‡ท":["flag_fr","france"],"๐Ÿ‡ฌ๐Ÿ‡ฆ":["flag_ga","gabon"],"๐Ÿ‡ฌ๐Ÿ‡ง":["flag_gb","uk","united_kingdom"],"๐Ÿ‡ฌ๐Ÿ‡ฉ":["flag_gd","grenada"],"๐Ÿ‡ฌ๐Ÿ‡ช":["flag_ge","georgia"],"๐Ÿ‡ฌ๐Ÿ‡ซ":["flag_gf","french_guiana"],"๐Ÿ‡ฌ๐Ÿ‡ฌ":["flag_gg","guernsey"],"๐Ÿ‡ฌ๐Ÿ‡ญ":["flag_gh","ghana"],"๐Ÿ‡ฌ๐Ÿ‡ฎ":["flag_gi","gibraltar"],"๐Ÿ‡ฌ๐Ÿ‡ฑ":["flag_gl","greenland"],"๐Ÿ‡ฌ๐Ÿ‡ฒ":["flag_gm","gambia"],"๐Ÿ‡ฌ๐Ÿ‡ณ":["flag_gn","guinea"],"๐Ÿ‡ฌ๐Ÿ‡ต":["flag_gp","guadeloupe"],"๐Ÿ‡ฌ๐Ÿ‡ถ":["equatorial_guinea","flag_gq"],"๐Ÿ‡ฌ๐Ÿ‡ท":["flag_gr","greece"],"๐Ÿ‡ฌ๐Ÿ‡ธ":["flag_gs","south_georgia_south_sandwich_islands"],"๐Ÿ‡ฌ๐Ÿ‡น":["flag_gt","guatemala"],"๐Ÿ‡ฌ๐Ÿ‡บ":["flag_gu","guam"],"๐Ÿ‡ฌ๐Ÿ‡ผ":["flag_gw","guinea_bissau"],"๐Ÿ‡ฌ๐Ÿ‡พ":["flag_gy","guyana"],"๐Ÿ‡ญ๐Ÿ‡ฐ":["flag_hk","hong_kong"],"๐Ÿ‡ญ๐Ÿ‡ฒ":["flag_hm","heard_mcdonald_islands"],"๐Ÿ‡ญ๐Ÿ‡ณ":["flag_hn","honduras"],"๐Ÿ‡ญ๐Ÿ‡ท":["croatia","flag_hr"],"๐Ÿ‡ญ๐Ÿ‡น":["flag_ht","haiti"],"๐Ÿ‡ญ๐Ÿ‡บ":["flag_hu","hungary"],"๐Ÿ‡ฎ๐Ÿ‡จ":["canary_islands","flag_ic"],"๐Ÿ‡ฎ๐Ÿ‡ฉ":["flag_id","indonesia"],"๐Ÿ‡ฎ๐Ÿ‡ช":["flag_ie","ireland"],"๐Ÿ‡ฎ๐Ÿ‡ฑ":["flag_il","israel"],"๐Ÿ‡ฎ๐Ÿ‡ฒ":["flag_im","isle_of_man"],"๐Ÿ‡ฎ๐Ÿ‡ณ":["flag_in","india"],"๐Ÿ‡ฎ๐Ÿ‡ด":["british_indian_ocean_territory","flag_io"],"๐Ÿ‡ฎ๐Ÿ‡ถ":["flag_iq","iraq"],"๐Ÿ‡ฎ๐Ÿ‡ท":["flag_ir","iran"],"๐Ÿ‡ฎ๐Ÿ‡ธ":["flag_is","iceland"],"๐Ÿ‡ฎ๐Ÿ‡น":["flag_it","italy"],"๐Ÿ‡ฏ๐Ÿ‡ช":["flag_je","jersey"],"๐Ÿ‡ฏ๐Ÿ‡ฒ":["flag_jm","jamaica"],"๐Ÿ‡ฏ๐Ÿ‡ด":["flag_jo","jordan"],"๐Ÿ‡ฏ๐Ÿ‡ต":["flag_jp","japan"],"๐Ÿ‡ฐ๐Ÿ‡ช":["flag_ke","kenya"],"๐Ÿ‡ฐ๐Ÿ‡ฌ":["flag_kg","kyrgyzstan"],"๐Ÿ‡ฐ๐Ÿ‡ญ":["cambodia","flag_kh"],"๐Ÿ‡ฐ๐Ÿ‡ฎ":["flag_ki","kiribati"],"๐Ÿ‡ฐ๐Ÿ‡ฒ":["comoros","flag_km"],"๐Ÿ‡ฐ๐Ÿ‡ณ":["flag_kn","st_kitts_nevis"],"๐Ÿ‡ฐ๐Ÿ‡ต":["flag_kp","north_korea"],"๐Ÿ‡ฐ๐Ÿ‡ท":["flag_kr","south_korea"],"๐Ÿ‡ฐ๐Ÿ‡ผ":["flag_kw","kuwait"],"๐Ÿ‡ฐ๐Ÿ‡พ":["cayman_islands","flag_ky"],"๐Ÿ‡ฐ๐Ÿ‡ฟ":["flag_kz","kazakhstan"],"๐Ÿ‡ฑ๐Ÿ‡ฆ":["flag_la","laos"],"๐Ÿ‡ฑ๐Ÿ‡ง":["flag_lb","lebanon"],"๐Ÿ‡ฑ๐Ÿ‡จ":["flag_lc","st_lucia"],"๐Ÿ‡ฑ๐Ÿ‡ฎ":["flag_li","liechtenstein"],"๐Ÿ‡ฑ๐Ÿ‡ฐ":["flag_lk","sri_lanka"],"๐Ÿ‡ฑ๐Ÿ‡ท":["flag_lr","liberia"],"๐Ÿ‡ฑ๐Ÿ‡ธ":["flag_ls","lesotho"],"๐Ÿ‡ฑ๐Ÿ‡น":["flag_lt","lithuania"],"๐Ÿ‡ฑ๐Ÿ‡บ":["flag_lu","luxembourg"],"๐Ÿ‡ฑ๐Ÿ‡ป":["flag_lv","latvia"],"๐Ÿ‡ฑ๐Ÿ‡พ":["flag_ly","libya"],"๐Ÿ‡ฒ๐Ÿ‡ฆ":["flag_ma","morocco"],"๐Ÿ‡ฒ๐Ÿ‡จ":["flag_mc","monaco"],"๐Ÿ‡ฒ๐Ÿ‡ฉ":["flag_md","moldova"],"๐Ÿ‡ฒ๐Ÿ‡ช":["flag_me","montenegro"],"๐Ÿ‡ฒ๐Ÿ‡ซ":["flag_mf","st_martin"],"๐Ÿ‡ฒ๐Ÿ‡ฌ":["flag_mg","madagascar"],"๐Ÿ‡ฒ๐Ÿ‡ญ":["flag_mh","marshall_islands"],"๐Ÿ‡ฒ๐Ÿ‡ฐ":["flag_mk","macedonia"],"๐Ÿ‡ฒ๐Ÿ‡ฑ":["flag_ml","mali"],"๐Ÿ‡ฒ๐Ÿ‡ฒ":["burma","flag_mm","myanmar"],"๐Ÿ‡ฒ๐Ÿ‡ณ":["flag_mn","mongolia"],"๐Ÿ‡ฒ๐Ÿ‡ด":["flag_mo","macao","macau"],"๐Ÿ‡ฒ๐Ÿ‡ต":["flag_mp","northern_mariana_islands"],"๐Ÿ‡ฒ๐Ÿ‡ถ":["flag_mq","martinique"],"๐Ÿ‡ฒ๐Ÿ‡ท":["flag_mr","mauritania"],"๐Ÿ‡ฒ๐Ÿ‡ธ":["flag_ms","montserrat"],"๐Ÿ‡ฒ๐Ÿ‡น":["flag_mt","malta"],"๐Ÿ‡ฒ๐Ÿ‡บ":["flag_mu","mauritius"],"๐Ÿ‡ฒ๐Ÿ‡ป":["flag_mv","maldives"],"๐Ÿ‡ฒ๐Ÿ‡ผ":["flag_mw","malawi"],"๐Ÿ‡ฒ๐Ÿ‡ฝ":["flag_mx","mexico"],"๐Ÿ‡ฒ๐Ÿ‡พ":["flag_my","malaysia"],"๐Ÿ‡ฒ๐Ÿ‡ฟ":["flag_mz","mozambique"],"๐Ÿ‡ณ๐Ÿ‡ฆ":["flag_na","namibia"],"๐Ÿ‡ณ๐Ÿ‡จ":["flag_nc","new_caledonia"],"๐Ÿ‡ณ๐Ÿ‡ช":["flag_ne","niger"],"๐Ÿ‡ณ๐Ÿ‡ซ":["flag_nf","norfolk_island"],"๐Ÿ‡ณ๐Ÿ‡ฌ":["flag_ng","nigeria"],"๐Ÿ‡ณ๐Ÿ‡ฎ":["flag_ni","nicaragua"],"๐Ÿ‡ณ๐Ÿ‡ฑ":["flag_nl","netherlands"],"๐Ÿ‡ณ๐Ÿ‡ด":["flag_no","norway"],"๐Ÿ‡ณ๐Ÿ‡ต":["flag_np","nepal"],"๐Ÿ‡ณ๐Ÿ‡ท":["flag_nr","nauru"],"๐Ÿ‡ณ๐Ÿ‡บ":["flag_nu","niue"],"๐Ÿ‡ณ๐Ÿ‡ฟ":["flag_nz","new_zealand"],"๐Ÿ‡ด๐Ÿ‡ฒ":["flag_om","oman"],"๐Ÿ‡ต๐Ÿ‡ฆ":["flag_pa","panama"],"๐Ÿ‡ต๐Ÿ‡ช":["flag_pe","peru"],"๐Ÿ‡ต๐Ÿ‡ซ":["flag_pf","french_polynesia"],"๐Ÿ‡ต๐Ÿ‡ฌ":["flag_pg","papua_new_guinea"],"๐Ÿ‡ต๐Ÿ‡ญ":["flag_ph","philippines"],"๐Ÿ‡ต๐Ÿ‡ฐ":["flag_pk","pakistan"],"๐Ÿ‡ต๐Ÿ‡ฑ":["flag_pl","poland"],"๐Ÿ‡ต๐Ÿ‡ฒ":["flag_pm","st_pierre_miquelon"],"๐Ÿ‡ต๐Ÿ‡ณ":["flag_pn","pitcairn_islands"],"๐Ÿ‡ต๐Ÿ‡ท":["flag_pr","puerto_rico"],"๐Ÿ‡ต๐Ÿ‡ธ":["flag_ps","palestinian_territories"],"๐Ÿ‡ต๐Ÿ‡น":["flag_pt","portugal"],"๐Ÿ‡ต๐Ÿ‡ผ":["flag_pw","palau"],"๐Ÿ‡ต๐Ÿ‡พ":["flag_py","paraguay"],"๐Ÿ‡ถ๐Ÿ‡ฆ":["flag_qa","qatar"],"๐Ÿ‡ท๐Ÿ‡ช":["flag_re","reunion"],"๐Ÿ‡ท๐Ÿ‡ด":["flag_ro","romania"],"๐Ÿ‡ท๐Ÿ‡ธ":["flag_rs","serbia"],"๐Ÿ‡ท๐Ÿ‡บ":["flag_ru","russia"],"๐Ÿ‡ท๐Ÿ‡ผ":["flag_rw","rwanda"],"๐Ÿ‡ธ๐Ÿ‡ฆ":["flag_sa","saudi_arabia"],"๐Ÿ‡ธ๐Ÿ‡ง":["flag_sb","solomon_islands"],"๐Ÿ‡ธ๐Ÿ‡จ":["flag_sc","seychelles"],"๐Ÿ‡ธ๐Ÿ‡ฉ":["flag_sd","sudan"],"๐Ÿ‡ธ๐Ÿ‡ช":["flag_se","sweden"],"๐Ÿ‡ธ๐Ÿ‡ฌ":["flag_sg","singapore"],"๐Ÿ‡ธ๐Ÿ‡ญ":["flag_sh","st_helena"],"๐Ÿ‡ธ๐Ÿ‡ฎ":["flag_si","slovenia"],"๐Ÿ‡ธ๐Ÿ‡ฏ":["flag_sj","svalbard_jan_mayen"],"๐Ÿ‡ธ๐Ÿ‡ฐ":["flag_sk","slovakia"],"๐Ÿ‡ธ๐Ÿ‡ฑ":["flag_sl","sierra_leone"],"๐Ÿ‡ธ๐Ÿ‡ฒ":["flag_sm","san_marino"],"๐Ÿ‡ธ๐Ÿ‡ณ":["flag_sn","senegal"],"๐Ÿ‡ธ๐Ÿ‡ด":["flag_so","somalia"],"๐Ÿ‡ธ๐Ÿ‡ท":["flag_sr","suriname"],"๐Ÿ‡ธ๐Ÿ‡ธ":["flag_ss","south_sudan"],"๐Ÿ‡ธ๐Ÿ‡น":["flag_st","sao_tome_principe"],"๐Ÿ‡ธ๐Ÿ‡ป":["el_salvador","flag_sv"],"๐Ÿ‡ธ๐Ÿ‡ฝ":["flag_sx","sint_maarten"],"๐Ÿ‡ธ๐Ÿ‡พ":["flag_sy","syria"],"๐Ÿ‡ธ๐Ÿ‡ฟ":["eswatini","flag_sz","swaziland"],"๐Ÿ‡น๐Ÿ‡ฆ":["flag_ta","tristan_da_cunha"],"๐Ÿ‡น๐Ÿ‡จ":["flag_tc","turks_caicos_islands"],"๐Ÿ‡น๐Ÿ‡ฉ":["chad","flag_td"],"๐Ÿ‡น๐Ÿ‡ซ":["flag_tf","french_southern_territories"],"๐Ÿ‡น๐Ÿ‡ฌ":["flag_tg","togo"],"๐Ÿ‡น๐Ÿ‡ญ":["flag_th","thailand"],"๐Ÿ‡น๐Ÿ‡ฏ":["flag_tj","tajikistan"],"๐Ÿ‡น๐Ÿ‡ฐ":["flag_tk","tokelau"],"๐Ÿ‡น๐Ÿ‡ฑ":["flag_tl","timor_leste"],"๐Ÿ‡น๐Ÿ‡ฒ":["flag_tm","turkmenistan"],"๐Ÿ‡น๐Ÿ‡ณ":["flag_tn","tunisia"],"๐Ÿ‡น๐Ÿ‡ด":["flag_to","tonga"],"๐Ÿ‡น๐Ÿ‡ท":["flag_tr","turkey_tr"],"๐Ÿ‡น๐Ÿ‡น":["flag_tt","trinidad_tobago"],"๐Ÿ‡น๐Ÿ‡ป":["flag_tv","tuvalu"],"๐Ÿ‡น๐Ÿ‡ผ":["flag_tw","taiwan"],"๐Ÿ‡น๐Ÿ‡ฟ":["flag_tz","tanzania"],"๐Ÿ‡บ๐Ÿ‡ฆ":["flag_ua","ukraine"],"๐Ÿ‡บ๐Ÿ‡ฌ":["flag_ug","uganda"],"๐Ÿ‡บ๐Ÿ‡ฒ":["flag_um","us_outlying_islands"],"๐Ÿ‡บ๐Ÿ‡ณ":["flag_un","un","united_nations"],"๐Ÿ‡บ๐Ÿ‡ธ":["flag_us","united_states","usa"],"๐Ÿ‡บ๐Ÿ‡พ":["flag_uy","uruguay"],"๐Ÿ‡บ๐Ÿ‡ฟ":["flag_uz","uzbekistan"],"๐Ÿ‡ป๐Ÿ‡ฆ":["flag_va","vatican_city"],"๐Ÿ‡ป๐Ÿ‡จ":["flag_vc","st_vincent_grenadines"],"๐Ÿ‡ป๐Ÿ‡ช":["flag_ve","venezuela"],"๐Ÿ‡ป๐Ÿ‡ฌ":["british_virgin_islands","flag_vg"],"๐Ÿ‡ป๐Ÿ‡ฎ":["flag_vi","us_virgin_islands"],"๐Ÿ‡ป๐Ÿ‡ณ":["flag_vn","vietnam"],"๐Ÿ‡ป๐Ÿ‡บ":["flag_vu","vanuatu"],"๐Ÿ‡ผ๐Ÿ‡ซ":["flag_wf","wallis_futuna"],"๐Ÿ‡ผ๐Ÿ‡ธ":["flag_ws","samoa"],"๐Ÿ‡ฝ๐Ÿ‡ฐ":["flag_xk","kosovo"],"๐Ÿ‡พ๐Ÿ‡ช":["flag_ye","yemen"],"๐Ÿ‡พ๐Ÿ‡น":["flag_yt","mayotte"],"๐Ÿ‡ฟ๐Ÿ‡ฆ":["flag_za","south_africa"],"๐Ÿ‡ฟ๐Ÿ‡ฒ":["flag_zm","zambia"],"๐Ÿ‡ฟ๐Ÿ‡ผ":["flag_zw","zimbabwe"],"๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ":["england","flag_gbeng"],"๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ":["flag_gbsct","scotland"],"๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ":["flag_gbwls","wales"]}'),o=flarum.core.compat["common/extend"],i=flarum.core.compat["common/components/TextEditor"];var r=d.n(i);const _=flarum.core.compat["common/components/TextEditorButton"];var f=d.n(_);const c=flarum.core.compat["common/utils/KeyboardNavigatable"];var t=d.n(c);function l(d,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,e){return d.__proto__=e,d},l(d,e)}const s=flarum.core.compat["common/Fragment"];var g=function(d){var e,u;function a(){for(var e,u=arguments.length,a=new Array(u),n=0;n=a.length&&(n=0),this.index=n;var o=a.removeClass("active").eq(n).addClass("active");if(e){var i,r=u.scrollTop(),_=u.offset().top,f=_+u.outerHeight(),c=o.offset().top,t=c+o.outerHeight();c<_?i=r-_+c-parseInt(u.css("padding-top"),10):t>f&&(i=r-f+t+parseInt(u.css("padding-bottom"),10)),void 0!==i&&u.stop(!0).animate({scrollTop:i},100)}}},a}(d.n(s)()),b=function(){var d={base:"https://twemoji.maxcdn.com/v/14.0.2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var e="string"==typeof d?parseInt(d,16):d;return e<65536?r(e):r(55296+((e-=65536)>>10),56320+(1023&e))},toCodePoint:h},onerror:function(){this.parentNode&&this.parentNode.replaceChild(_(this.alt,!1),this)},parse:function(e,u){return u&&"function"!=typeof u||(u={callback:u}),("string"==typeof e?s:l)(e,{callback:u.callback||f,attributes:"function"==typeof u.attributes?u.attributes:m,base:"string"==typeof u.base?u.base:d.base,ext:u.ext||d.ext,size:u.folder||(a=u.size||d.size,"number"==typeof a?a+"x"+a:a),className:u.className||d.className,onerror:u.onerror||d.onerror});var a},replace:b,test:function(d){u.lastIndex=0;var e=u.test(d);return u.lastIndex=0,e}},e={"&":"&","<":"<",">":">","'":"'",'"':"""},u=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[ยฉยฎ\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef6]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedd-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec2\uded0-\uded9\udee0-\udee7]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,a=/\uFE0F/g,n=String.fromCharCode(8205),o=/[&<>'"]/g,i=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,r=String.fromCharCode;return d;function _(d,e){return document.createTextNode(e?d.replace(a,""):d)}function f(d,e){return"".concat(e.base,e.size,"/",d,e.ext)}function c(d,e){for(var u,a,n=d.childNodes,o=n.length;o--;)3===(a=(u=n[o]).nodeType)?e.push(u):1!==a||"ownerSVGElement"in u||i.test(u.nodeName.toLowerCase())||c(u,e);return e}function t(d){return h(d.indexOf(n)<0?d.replace(a,""):d)}function l(d,e){for(var a,n,o,i,r,f,l,s,g,m,b,h,p,w=c(d,[]),k=w.length;k--;){for(o=!1,i=document.createDocumentFragment(),f=(r=w[k]).nodeValue,s=0;l=u.exec(f);){if((g=l.index)!==s&&i.appendChild(_(f.slice(s,g),!0)),h=t(b=l[0]),s=g+b.length,p=e.callback(h,e),h&&p){for(n in(m=new Image).onerror=e.onerror,m.setAttribute("draggable","false"),a=e.attributes(b,h))a.hasOwnProperty(n)&&0!==n.indexOf("on")&&!m.hasAttribute(n)&&m.setAttribute(n,a[n]);m.className=e.className,m.alt=b,m.src=p,o=!0,i.appendChild(m)}m||i.appendChild(_(b,!1)),m=null}o&&(s")}return n}))}function g(d){return e[d]}function m(){return null}function b(d,e){return String(d).replace(u,e)}function h(d,e){for(var u=[],a=0,n=0,o=0;o=d.length?{done:!0}:{done:!1,value:d[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(d,e){(null==e||e>d.length)&&(e=d.length);for(var u=0,a=new Array(e);u'),u=new g,(0,o.extend)(r().prototype,"oncreate",(function(){var d=this.$(".TextEditor-editor").wrap('
');this.navigator=new(t()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(d),d.after(e)})),(0,o.extend)(r().prototype,"buildEditorParams",(function(a){var o,i,r,_=this;a.inputListeners.push((function(){var a=_.attrs.composer.editor.getSelectionRange(),f=a[0];if(!(a[1]-f>0)){var c=_.attrs.composer.editor.getLastNChars(15);i=0;for(var t=c.length-1;t>=0;t--){var l=c.substr(t,1);if(!/[a-z0-9]|\+|\-|_|\:/.test(l))break;if(":"===l&&(0==t||/\s/.test(c.substr(t-1,1)))){o=t+1,i=f-c.length+t+1;break}}if(u.hide(),u.active=!1,i){r=c.substring(o).toLowerCase();var s=function(d){var e=d.emoji,a=d.name,n=d.code;return m("button",{key:e,onclick:function(){return d=e,_.attrs.composer.editor.replaceBeforeCursor(i-1,d+" "),void u.hide();var d},onmouseenter:function(){u.setIndex($(this).parent().index()-1)}},m("img",{alt:e,class:"emoji",draggable:"false",loading:"lazy",src:y+"72x72/"+n+".png"}),a)};!function(){var a,o,f=[],c=(a=r,o=new RegExp("\\((["+"+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1")+"])\\)","g"),new RegExp("(.*)"+a.toLowerCase().replace(/(.)/g,"($1)(.*?)").replace(o,"(\\$1)")+"$","i")),t=7,l=function(e){for(var u=0;u0;u++){var a=d[u];if(-1===f.indexOf(a))for(var o,i=v(n[a]);!(o=i()).done;)if(e(o.value)){--t,f.push(a);break}}};l((function(d){return 0===d.indexOf(r)})),l((function(d){return c.test(d)}));var g=f.map((function(d){return{emoji:d,name:n[d][0],code:k(d)}})).map(s);if(g.length){u.items=g,m.render(e[0],u.render()),u.show();var b=_.attrs.composer.editor.getCaretCoordinates(i),h=u.$().outerWidth(),p=u.$().outerHeight(),w=u.$().offsetParent(),y=b.left,x=b.top+15;x+p>w.height()&&(x=b.top-p-15),y+h>w.width()&&(y=w.width()-h),x=Math.max(-(w.offset().top-$(document).scrollTop()),x),y=Math.max(-w.offset().left,y),u.show(y,x)}}(),u.setIndex(0),u.$().scrollTop(0),u.active=!0}}}))})),(0,o.extend)(r().prototype,"toolbarItems",(function(d){var e=this;d.add("emoji",m(f(),{onclick:function(){return e.attrs.composer.editor.insertAtCursor(" :")},icon:"far fa-smile"},app.translator.trans("flarum-emoji.forum.composer.emoji_tooltip")))})),(0,o.override)(z().prototype,"contentHtml",(function(d){var e,u,a=d();if(this.oldContentHtml!==a){var n=h.parse((e=a,(u=document.implementation.createHTMLDocument()).body.innerHTML=e,u.body),q);this.emojifiedContentHtml=n.innerHTML,this.oldContentHtml=a}return this.emojifiedContentHtml})),(0,o.override)(s9e.TextFormatter,"preview",(function(d,e,u){d(e,u),h.parse(u,q)}))}))})(),module.exports=e})(); +(()=>{var d={n:e=>{var u=e&&e.__esModule?()=>e.default:()=>e;return d.d(u,{a:u}),u},d:(e,u)=>{for(var a in u)d.o(u,a)&&!d.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:u[a]})},o:(d,e)=>Object.prototype.hasOwnProperty.call(d,e),r:d=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},e={};(()=>{"use strict";d.r(e);const u=flarum.core.compat["forum/app"];var a=d.n(u);const n=JSON.parse('{"๐Ÿ‡ฆ":["regional_indicator_a"],"๐Ÿ‡ง":["regional_indicator_b"],"๐Ÿ‡จ":["regional_indicator_c"],"๐Ÿ‡ฉ":["regional_indicator_d"],"๐Ÿ‡ช":["regional_indicator_e"],"๐Ÿ‡ซ":["regional_indicator_f"],"๐Ÿ‡ฌ":["regional_indicator_g"],"๐Ÿ‡ญ":["regional_indicator_h"],"๐Ÿ‡ฎ":["regional_indicator_i"],"๐Ÿ‡ฏ":["regional_indicator_j"],"๐Ÿ‡ฐ":["regional_indicator_k"],"๐Ÿ‡ฑ":["regional_indicator_l"],"๐Ÿ‡ฒ":["regional_indicator_m"],"๐Ÿ‡ณ":["regional_indicator_n"],"๐Ÿ‡ด":["regional_indicator_o"],"๐Ÿ‡ต":["regional_indicator_p"],"๐Ÿ‡ถ":["regional_indicator_q"],"๐Ÿ‡ท":["regional_indicator_r"],"๐Ÿ‡ธ":["regional_indicator_s"],"๐Ÿ‡น":["regional_indicator_t"],"๐Ÿ‡บ":["regional_indicator_u"],"๐Ÿ‡ป":["regional_indicator_v"],"๐Ÿ‡ผ":["regional_indicator_w"],"๐Ÿ‡ฝ":["regional_indicator_x"],"๐Ÿ‡พ":["regional_indicator_y"],"๐Ÿ‡ฟ":["regional_indicator_z"],"๐Ÿ˜€":["grinning","grinning_face"],"๐Ÿ˜ƒ":["grinning_face_with_big_eyes","smiley"],"๐Ÿ˜„":["grinning_face_with_closed_eyes","smile"],"๐Ÿ˜":["beaming_face","grin"],"๐Ÿ˜†":["laughing","lol","satisfied","squinting_face"],"๐Ÿ˜…":["grinning_face_with_sweat","sweat_smile"],"๐Ÿคฃ":["rofl"],"๐Ÿ˜‚":["joy","lmao","tears_of_joy"],"๐Ÿ™‚":["slightly_smiling_face"],"๐Ÿ™ƒ":["upside_down_face"],"๐Ÿซ ":["melt","melting_face"],"๐Ÿ˜‰":["wink","winking_face"],"๐Ÿ˜Š":["blush","smiling_face_with_closed_eyes"],"๐Ÿ˜‡":["halo","innocent"],"๐Ÿฅฐ":["smiling_face_with_3_hearts"],"๐Ÿ˜":["heart_eyes","smiling_face_with_heart_eyes"],"๐Ÿคฉ":["star_struck"],"๐Ÿ˜˜":["blowing_a_kiss","kissing_heart"],"๐Ÿ˜—":["kissing","kissing_face"],"โ˜บ๏ธ":["relaxed","smiling_face"],"๐Ÿ˜š":["kissing_closed_eyes","kissing_face_with_closed_eyes"],"๐Ÿ˜™":["kissing_face_with_smiling_eyes","kissing_smiling_eyes"],"๐Ÿฅฒ":["smiling_face_with_tear"],"๐Ÿ˜‹":["savoring_food","yum"],"๐Ÿ˜›":["face_with_tongue","stuck_out_tongue"],"๐Ÿ˜œ":["stuck_out_tongue_winking_eye"],"๐Ÿคช":["zany","zany_face"],"๐Ÿ˜":["stuck_out_tongue_closed_eyes"],"๐Ÿค‘":["money_mouth_face"],"๐Ÿค—":["hug","hugging","hugging_face"],"๐Ÿคญ":["face_with_hand_over_mouth","hand_over_mouth"],"๐Ÿซข":["face_with_open_eyes_hand_over_mouth","gasp"],"๐Ÿซฃ":["face_with_peeking_eye","peek"],"๐Ÿคซ":["shush","shushing_face"],"๐Ÿค”":["thinking","thinking_face","wtf"],"๐Ÿซก":["salute","saluting_face"],"๐Ÿค":["zipper_mouth","zipper_mouth_face"],"๐Ÿคจ":["face_with_raised_eyebrow","raised_eyebrow"],"๐Ÿ˜๏ธ":["neutral","neutral_face"],"๐Ÿ˜‘":["expressionless","expressionless_face"],"๐Ÿ˜ถ":["no_mouth"],"๐Ÿซฅ":["dotted_line_face"],"๐Ÿ˜ถโ€๐ŸŒซ๏ธ":["in_clouds"],"๐Ÿ˜":["smirk","smirking","smirking_face"],"๐Ÿ˜’":["unamused","unamused_face"],"๐Ÿ™„":["rolling_eyes"],"๐Ÿ˜ฌ":["grimacing","grimacing_face"],"๐Ÿ˜ฎโ€๐Ÿ’จ":["exhale","exhaling"],"๐Ÿคฅ":["lying","lying_face"],"๐Ÿ˜Œ":["relieved","relieved_face"],"๐Ÿ˜”":["pensive","pensive_face"],"๐Ÿ˜ช":["sleepy","sleepy_face"],"๐Ÿคค":["drooling","drooling_face"],"๐Ÿ˜ด":["sleeping","sleeping_face"],"๐Ÿ˜ท":["mask","medical_mask"],"๐Ÿค’":["face_with_thermometer"],"๐Ÿค•":["face_with_head_bandage"],"๐Ÿคข":["nauseated","nauseated_face"],"๐Ÿคฎ":["face_vomiting","vomiting"],"๐Ÿคง":["sneezing","sneezing_face"],"๐Ÿฅต":["hot","hot_face"],"๐Ÿฅถ":["cold","cold_face"],"๐Ÿฅด":["woozy","woozy_face"],"๐Ÿ˜ต":["dizzy_face","knocked_out"],"๐Ÿ˜ตโ€๐Ÿ’ซ":["dizzy_eyes"],"๐Ÿคฏ":["exploding_head"],"๐Ÿค ":["cowboy","cowboy_face"],"๐Ÿฅณ":["hooray","partying","partying_face"],"๐Ÿฅธ":["disguised","disguised_face"],"๐Ÿ˜Ž":["smiling_face_with_sunglasses","sunglasses_cool","too_cool"],"๐Ÿค“":["nerd","nerd_face"],"๐Ÿง":["face_with_monocle"],"๐Ÿ˜•":["confused","confused_face"],"๐Ÿซค":["face_with_diagonal_mouth"],"๐Ÿ˜Ÿ":["worried","worried_face"],"๐Ÿ™":["slightly_frowning_face"],"โ˜น๏ธ":["white_frowning_face"],"๐Ÿ˜ฎ":["face_with_open_mouth","open_mouth"],"๐Ÿ˜ฏ":["hushed","hushed_face"],"๐Ÿ˜ฒ":["astonished","astonished_face"],"๐Ÿ˜ณ":["flushed","flushed_face"],"๐Ÿฅบ":["pleading","pleading_face"],"๐Ÿฅน":["face_holding_back_tears","watery_eyes"],"๐Ÿ˜ฆ":["frowning","frowning_face"],"๐Ÿ˜ง":["anguished","anguished_face"],"๐Ÿ˜จ":["fearful","fearful_face"],"๐Ÿ˜ฐ":["anxious","anxious_face","cold_sweat"],"๐Ÿ˜ฅ":["disappointed_relieved","sad_relieved_face"],"๐Ÿ˜ข":["cry","crying_face"],"๐Ÿ˜ญ":["loudly_crying_face","sob"],"๐Ÿ˜ฑ":["scream","screaming_in_fear"],"๐Ÿ˜–":["confounded","confounded_face"],"๐Ÿ˜ฃ":["persevere","persevering_face"],"๐Ÿ˜ž":["disappointed","disappointed_face"],"๐Ÿ˜“":["downcast_face","sweat"],"๐Ÿ˜ฉ":["weary","weary_face"],"๐Ÿ˜ซ":["tired","tired_face"],"๐Ÿฅฑ":["yawn","yawning","yawning_face"],"๐Ÿ˜ค":["nose_steam","triumph"],"๐Ÿ˜ก":["pout","pouting_face","rage"],"๐Ÿ˜ ":["angry","angry_face"],"๐Ÿคฌ":["censored","face_with_symbols_on_mouth"],"๐Ÿ˜ˆ":["smiling_imp"],"๐Ÿ‘ฟ":["angry_imp","imp"],"๐Ÿ’€":["skull"],"โ˜ ๏ธ":["skull_and_crossbones"],"๐Ÿ’ฉ":["poop","shit"],"๐Ÿคก":["clown","clown_face"],"๐Ÿ‘น":["japanese_ogre","ogre"],"๐Ÿ‘บ":["goblin","japanese_goblin"],"๐Ÿ‘ป":["ghost"],"๐Ÿ‘ฝ๏ธ":["alien"],"๐Ÿ‘พ":["alien_monster","space_invader"],"๐Ÿค–":["robot","robot_face"],"๐Ÿ˜บ":["grinning_cat","smiley_cat"],"๐Ÿ˜ธ":["grinning_cat_with_closed_eyes","smile_cat"],"๐Ÿ˜น":["joy_cat","tears_of_joy_cat"],"๐Ÿ˜ป":["heart_eyes_cat","smiling_cat_with_heart_eyes"],"๐Ÿ˜ผ":["smirk_cat","wry_smile_cat"],"๐Ÿ˜ฝ":["kissing_cat"],"๐Ÿ™€":["scream_cat","weary_cat"],"๐Ÿ˜ฟ":["crying_cat"],"๐Ÿ˜พ":["pouting_cat"],"๐Ÿ™ˆ":["see_no_evil"],"๐Ÿ™‰":["hear_no_evil"],"๐Ÿ™Š":["speak_no_evil"],"๐Ÿ’‹":["kiss"],"๐Ÿ’Œ":["love_letter"],"๐Ÿ’˜":["cupid","heart_with_arrow"],"๐Ÿ’":["gift_heart","heart_with_ribbon"],"๐Ÿ’–":["sparkling_heart"],"๐Ÿ’—":["growing_heart","heartpulse"],"๐Ÿ’“":["beating_heart","heartbeat"],"๐Ÿ’ž":["revolving_hearts"],"๐Ÿ’•":["two_hearts"],"๐Ÿ’Ÿ":["heart_decoration"],"โฃ๏ธ":["heart_exclamation"],"๐Ÿ’”":["broken_heart"],"โค๏ธโ€๐Ÿ”ฅ":["heart_on_fire"],"โค๏ธโ€๐Ÿฉน":["mending_heart"],"โค๏ธ":["heart","red_heart"],"๐Ÿงก":["orange_heart"],"๐Ÿ’›":["yellow_heart"],"๐Ÿ’š":["green_heart"],"๐Ÿ’™":["blue_heart"],"๐Ÿ’œ":["purple_heart"],"๐ŸคŽ":["brown_heart"],"๐Ÿ–ค":["black_heart"],"๐Ÿค":["white_heart"],"๐Ÿ’ฏ":["100"],"๐Ÿ’ข":["anger"],"๐Ÿ’ฅ":["boom","collision"],"๐Ÿ’ซ":["dizzy"],"๐Ÿ’ฆ":["sweat_drops"],"๐Ÿ’จ":["dash","dashing_away"],"๐Ÿ•ณ๏ธ":["hole"],"๐Ÿ’ฃ๏ธ":["bomb"],"๐Ÿ’ฌ":["speech_balloon"],"๐Ÿ‘โ€๐Ÿ—จ":["eye_in_speech_bubble"],"๐Ÿ—จ๏ธ":["left_speech_bubble"],"๐Ÿ—ฏ๏ธ":["right_anger_bubble"],"๐Ÿ’ญ":["thought_balloon"],"๐Ÿ’ค":["zzz"],"๐Ÿ‘‹":["wave","waving_hand"],"๐Ÿคš":["raised_back_of_hand"],"๐Ÿ–๏ธ":["raised_hand_with_fingers_splayed"],"โœ‹":["high_five","raised_hand"],"๐Ÿ––":["vulcan"],"๐Ÿซฑ":["rightwards_hand"],"๐Ÿซฒ":["leftwards_hand"],"๐Ÿซณ":["palm_down"],"๐Ÿซด":["palm_up"],"๐Ÿ‘Œ":["ok_hand"],"๐ŸคŒ":["pinch","pinched_fingers"],"๐Ÿค":["pinching_hand"],"โœŒ๏ธ":["v","victory"],"๐Ÿคž":["fingers_crossed"],"๐Ÿซฐ":["hand_with_index_finger_and_thumb_crossed"],"๐ŸคŸ":["love_you_gesture"],"๐Ÿค˜":["metal","sign_of_the_horns"],"๐Ÿค™":["call_me_hand"],"๐Ÿ‘ˆ๏ธ":["point_left"],"๐Ÿ‘‰๏ธ":["point_right"],"๐Ÿ‘†๏ธ":["point_up"],"๐Ÿ–•":["middle_finger"],"๐Ÿ‘‡๏ธ":["point_down"],"โ˜๏ธ":["point_up_2"],"๐Ÿซต":["point_forward"],"๐Ÿ‘๏ธ":["+1","thumbsup","yes"],"๐Ÿ‘Ž๏ธ":["-1","no","thumbsdown"],"โœŠ":["fist"],"๐Ÿ‘Š":["punch"],"๐Ÿค›":["left_facing_fist"],"๐Ÿคœ":["right_facing_fist"],"๐Ÿ‘":["clap","clapping_hands"],"๐Ÿ™Œ":["raised_hands"],"๐Ÿซถ":["heart_hands"],"๐Ÿ‘":["open_hands"],"๐Ÿคฒ":["palms_up_together"],"๐Ÿค":["handshake"],"๐Ÿ™":["folded_hands","pray"],"โœ๏ธ":["writing_hand"],"๐Ÿ’…":["nail_care","nail_polish"],"๐Ÿคณ":["selfie"],"๐Ÿ’ช":["muscle","right_bicep"],"๐Ÿฆพ":["mechanical_arm"],"๐Ÿฆฟ":["mechanical_leg"],"๐Ÿฆต":["leg"],"๐Ÿฆถ":["foot"],"๐Ÿ‘‚๏ธ":["ear"],"๐Ÿฆป":["ear_with_hearing_aid","hearing_aid"],"๐Ÿ‘ƒ":["nose"],"๐Ÿง ":["brain"],"๐Ÿซ€":["anatomical_heart"],"๐Ÿซ":["lungs"],"๐Ÿฆท":["tooth"],"๐Ÿฆด":["bone"],"๐Ÿ‘€":["eyes"],"๐Ÿ‘๏ธ":["eye"],"๐Ÿ‘…":["tongue"],"๐Ÿ‘„":["lips","mouth"],"๐Ÿซฆ":["biting_lip"],"๐Ÿ‘ถ":["baby"],"๐Ÿง’":["child"],"๐Ÿ‘ฆ":["boy"],"๐Ÿ‘ง":["girl"],"๐Ÿง‘":["adult"],"๐Ÿ‘ฑ":["blond_haired"],"๐Ÿ‘จ":["man"],"๐Ÿง”":["person_bearded"],"๐Ÿง”โ€โ™‚๏ธ":["man_bearded"],"๐Ÿง”โ€โ™€๏ธ":["woman_bearded"],"๐Ÿ‘จโ€๐Ÿฆฐ":["man_red_haired"],"๐Ÿ‘จโ€๐Ÿฆฑ":["man_curly_haired"],"๐Ÿ‘จโ€๐Ÿฆณ":["man_white_haired"],"๐Ÿ‘จโ€๐Ÿฆฒ":["man_bald"],"๐Ÿ‘ฉ":["woman"],"๐Ÿ‘ฉโ€๐Ÿฆฐ":["woman_red_haired"],"๐Ÿง‘โ€๐Ÿฆฐ":["red_haired"],"๐Ÿ‘ฉโ€๐Ÿฆฑ":["woman_curly_haired"],"๐Ÿง‘โ€๐Ÿฆฑ":["curly_haired"],"๐Ÿ‘ฉโ€๐Ÿฆณ":["woman_white_haired"],"๐Ÿง‘โ€๐Ÿฆณ":["white_haired"],"๐Ÿ‘ฉโ€๐Ÿฆฒ":["woman_bald"],"๐Ÿง‘โ€๐Ÿฆฒ":["bald"],"๐Ÿ‘ฑโ€โ™€๏ธ":["woman_blond_haired"],"๐Ÿ‘ฑโ€โ™‚๏ธ":["man_blond_haired"],"๐Ÿง“":["older_adult"],"๐Ÿ‘ด":["older_man"],"๐Ÿ‘ต":["older_woman"],"๐Ÿ™":["person_frowning"],"๐Ÿ™โ€โ™‚๏ธ":["man_frowning"],"๐Ÿ™โ€โ™€๏ธ":["woman_frowning"],"๐Ÿ™Ž":["person_pouting","pouting"],"๐Ÿ™Žโ€โ™‚๏ธ":["man_pouting"],"๐Ÿ™Žโ€โ™€๏ธ":["woman_pouting"],"๐Ÿ™…":["no_good","person_gesturing_no"],"๐Ÿ™…โ€โ™‚๏ธ":["man_gesturing_no"],"๐Ÿ™…โ€โ™€๏ธ":["woman_gesturing_no"],"๐Ÿ™†":["all_good","person_gesturing_ok"],"๐Ÿ™†โ€โ™‚๏ธ":["man_gesturing_ok"],"๐Ÿ™†โ€โ™€๏ธ":["woman_gesturing_ok"],"๐Ÿ’":["person_tipping_hand"],"๐Ÿ’โ€โ™‚๏ธ":["man_tipping_hand"],"๐Ÿ’โ€โ™€๏ธ":["woman_tipping_hand"],"๐Ÿ™‹":["person_raising_hand"],"๐Ÿ™‹โ€โ™‚๏ธ":["man_raising_hand"],"๐Ÿ™‹โ€โ™€๏ธ":["woman_raising_hand"],"๐Ÿง":["deaf_person"],"๐Ÿงโ€โ™‚๏ธ":["deaf_man"],"๐Ÿงโ€โ™€๏ธ":["deaf_woman"],"๐Ÿ™‡":["bow","person_bowing"],"๐Ÿ™‡โ€โ™‚๏ธ":["man_bowing"],"๐Ÿ™‡โ€โ™€๏ธ":["woman_bowing"],"๐Ÿคฆ":["facepalm","person_facepalming"],"๐Ÿคฆโ€โ™‚๏ธ":["man_facepalming"],"๐Ÿคฆโ€โ™€๏ธ":["woman_facepalming"],"๐Ÿคท":["person_shrugging","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"],"๐Ÿ‘ฎ":["cop","police_officer"],"๐Ÿ‘ฎโ€โ™‚๏ธ":["man_police_officer"],"๐Ÿ‘ฎโ€โ™€๏ธ":["woman_police_officer"],"๐Ÿ•ต๏ธ":["detective"],"๐Ÿ•ต๏ธโ€โ™‚๏ธ":["man_detective"],"๐Ÿ•ต๏ธโ€โ™€๏ธ":["woman_detective"],"๐Ÿ’‚":["guard"],"๐Ÿ’‚โ€โ™‚๏ธ":["man_guard"],"๐Ÿ’‚โ€โ™€๏ธ":["woman_guard"],"๐Ÿฅท":["ninja"],"๐Ÿ‘ท":["construction_worker"],"๐Ÿ‘ทโ€โ™‚๏ธ":["man_construction_worker"],"๐Ÿ‘ทโ€โ™€๏ธ":["woman_construction_worker"],"๐Ÿซ…":["person_with_crown","royalty"],"๐Ÿคด":["prince"],"๐Ÿ‘ธ":["princess"],"๐Ÿ‘ณ":["person_wearing_turban"],"๐Ÿ‘ณโ€โ™‚๏ธ":["man_wearing_turban"],"๐Ÿ‘ณโ€โ™€๏ธ":["woman_wearing_turban"],"๐Ÿ‘ฒ":["person_with_skullcap"],"๐Ÿง•":["woman_with_headscarf"],"๐Ÿคต":["person_in_tuxedo"],"๐Ÿคตโ€โ™‚๏ธ":["man_in_tuxedo"],"๐Ÿคตโ€โ™€๏ธ":["woman_in_tuxedo"],"๐Ÿ‘ฐ":["person_with_veil"],"๐Ÿ‘ฐโ€โ™‚๏ธ":["man_with_veil"],"๐Ÿ‘ฐโ€โ™€๏ธ":["woman_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"],"๐Ÿฆธโ€โ™‚๏ธ":["man_superhero"],"๐Ÿฆธโ€โ™€๏ธ":["woman_superhero"],"๐Ÿฆน":["supervillain"],"๐Ÿฆนโ€โ™‚๏ธ":["man_supervillain"],"๐Ÿฆนโ€โ™€๏ธ":["woman_supervillain"],"๐Ÿง™":["mage"],"๐Ÿง™โ€โ™‚๏ธ":["man_mage"],"๐Ÿง™โ€โ™€๏ธ":["woman_mage"],"๐Ÿงš":["fairy"],"๐Ÿงšโ€โ™‚๏ธ":["man_fairy"],"๐Ÿงšโ€โ™€๏ธ":["woman_fairy"],"๐Ÿง›":["vampire"],"๐Ÿง›โ€โ™‚๏ธ":["man_vampire"],"๐Ÿง›โ€โ™€๏ธ":["woman_vampire"],"๐Ÿงœ":["merperson"],"๐Ÿงœโ€โ™‚๏ธ":["merman"],"๐Ÿงœโ€โ™€๏ธ":["mermaid"],"๐Ÿง":["elf"],"๐Ÿงโ€โ™‚๏ธ":["man_elf"],"๐Ÿงโ€โ™€๏ธ":["woman_elf"],"๐Ÿงž":["genie"],"๐Ÿงžโ€โ™‚๏ธ":["man_genie"],"๐Ÿงžโ€โ™€๏ธ":["woman_genie"],"๐ŸงŸ":["zombie"],"๐ŸงŸโ€โ™‚๏ธ":["man_zombie"],"๐ŸงŸโ€โ™€๏ธ":["woman_zombie"],"๐ŸงŒ":["troll"],"๐Ÿ’†":["massage","person_getting_massage"],"๐Ÿ’†โ€โ™‚๏ธ":["man_getting_massage"],"๐Ÿ’†โ€โ™€๏ธ":["woman_getting_massage"],"๐Ÿ’‡":["haircut","person_getting_haircut"],"๐Ÿ’‡โ€โ™‚๏ธ":["man_getting_haircut"],"๐Ÿ’‡โ€โ™€๏ธ":["woman_getting_haircut"],"๐Ÿšถ":["person_walking","walking"],"๐Ÿšถโ€โ™‚๏ธ":["man_walking"],"๐Ÿšถโ€โ™€๏ธ":["woman_walking"],"๐Ÿง":["person_standing","standing"],"๐Ÿงโ€โ™‚๏ธ":["man_standing"],"๐Ÿงโ€โ™€๏ธ":["woman_standing"],"๐ŸงŽ":["kneeling","person_kneeling"],"๐ŸงŽโ€โ™‚๏ธ":["man_kneeling"],"๐ŸงŽโ€โ™€๏ธ":["woman_kneeling"],"๐Ÿง‘โ€๐Ÿฆฏ":["person_with_probing_cane","person_with_white_cane"],"๐Ÿ‘จโ€๐Ÿฆฏ":["man_with_probing_cane","man_with_white_cane"],"๐Ÿ‘ฉโ€๐Ÿฆฏ":["woman_with_probing_cane","woman_with_white_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"],"๐Ÿƒ":["person_running","running"],"๐Ÿƒโ€โ™‚๏ธ":["man_running"],"๐Ÿƒโ€โ™€๏ธ":["woman_running"],"๐Ÿ’ƒ":["dancer","woman_dancing"],"๐Ÿ•บ":["man_dancing"],"๐Ÿ•ด๏ธ":["levitate","levitating","person_in_suit_levitating"],"๐Ÿ‘ฏ":["dancers","people_with_bunny_ears_partying"],"๐Ÿ‘ฏโ€โ™‚๏ธ":["men_with_bunny_ears_partying"],"๐Ÿ‘ฏโ€โ™€๏ธ":["women_with_bunny_ears_partying"],"๐Ÿง–":["person_in_steamy_room"],"๐Ÿง–โ€โ™‚๏ธ":["man_in_steamy_room"],"๐Ÿง–โ€โ™€๏ธ":["woman_in_steamy_room"],"๐Ÿง—":["climbing","person_climbing"],"๐Ÿง—โ€โ™‚๏ธ":["man_climbing"],"๐Ÿง—โ€โ™€๏ธ":["woman_climbing"],"๐Ÿคบ":["fencer","fencing","person_fencing"],"๐Ÿ‡":["horse_racing"],"โ›ท๏ธ":["person_skiing","skier","skiing"],"๐Ÿ‚๏ธ":["person_snowboarding","snowboarder","snowboarding"],"๐ŸŒ๏ธ":["golfer","golfing","person_golfing"],"๐ŸŒ๏ธโ€โ™‚๏ธ":["man_golfing"],"๐ŸŒ๏ธโ€โ™€๏ธ":["woman_golfing"],"๐Ÿ„๏ธ":["person_surfing","surfer","surfing"],"๐Ÿ„โ€โ™‚๏ธ":["man_surfing"],"๐Ÿ„โ€โ™€๏ธ":["woman_surfing"],"๐Ÿšฃ":["person_rowing_boat","rowboat"],"๐Ÿšฃโ€โ™‚๏ธ":["man_rowing_boat"],"๐Ÿšฃโ€โ™€๏ธ":["woman_rowing_boat"],"๐ŸŠ๏ธ":["person_swimming","swimmer","swimming"],"๐ŸŠโ€โ™‚๏ธ":["man_swimming"],"๐ŸŠโ€โ™€๏ธ":["woman_swimming"],"โ›น๏ธ":["person_bouncing_ball"],"โ›น๏ธโ€โ™‚๏ธ":["man_bouncing_ball"],"โ›น๏ธโ€โ™€๏ธ":["woman_bouncing_ball"],"๐Ÿ‹๏ธ":["person_lifting_weights","weight_lifter","weight_lifting"],"๐Ÿ‹๏ธโ€โ™‚๏ธ":["man_lifting_weights"],"๐Ÿ‹๏ธโ€โ™€๏ธ":["woman_lifting_weights"],"๐Ÿšด":["bicyclist","biking","person_biking"],"๐Ÿšดโ€โ™‚๏ธ":["man_biking"],"๐Ÿšดโ€โ™€๏ธ":["woman_biking"],"๐Ÿšต":["mountain_bicyclist","mountain_biking","person_mountain_biking"],"๐Ÿšตโ€โ™‚๏ธ":["man_mountain_biking"],"๐Ÿšตโ€โ™€๏ธ":["woman_mountain_biking"],"๐Ÿคธ":["cartwheeling","person_cartwheel"],"๐Ÿคธโ€โ™‚๏ธ":["man_cartwheeling"],"๐Ÿคธโ€โ™€๏ธ":["woman_cartwheeling"],"๐Ÿคผ":["people_wrestling","wrestlers","wrestling"],"๐Ÿคผโ€โ™‚๏ธ":["men_wrestling"],"๐Ÿคผโ€โ™€๏ธ":["women_wrestling"],"๐Ÿคฝ":["person_playing_water_polo","water_polo"],"๐Ÿคฝโ€โ™‚๏ธ":["man_playing_water_polo"],"๐Ÿคฝโ€โ™€๏ธ":["woman_playing_water_polo"],"๐Ÿคพ":["handball","person_playing_handball"],"๐Ÿคพโ€โ™‚๏ธ":["man_playing_handball"],"๐Ÿคพโ€โ™€๏ธ":["woman_playing_handball"],"๐Ÿคน":["juggler","juggling","person_juggling"],"๐Ÿคนโ€โ™‚๏ธ":["man_juggling"],"๐Ÿคนโ€โ™€๏ธ":["woman_juggling"],"๐Ÿง˜":["person_in_lotus_position"],"๐Ÿง˜โ€โ™‚๏ธ":["man_in_lotus_position"],"๐Ÿง˜โ€โ™€๏ธ":["woman_in_lotus_position"],"๐Ÿ›€":["bath","person_taking_bath"],"๐Ÿ›Œ":["person_in_bed","sleeping_accommodation"],"๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘":["people_holding_hands"],"๐Ÿ‘ญ":["two_women_holding_hands"],"๐Ÿ‘ซ":["couple"],"๐Ÿ‘ฌ":["two_men_holding_hands"],"๐Ÿ’":["couple_kiss","couplekiss"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ":["kiss_mw","kiss_wm"],"๐Ÿ‘จโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘จ":["kiss_mm"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘ฉ":["kiss_ww"],"๐Ÿ’‘":["couple_with_heart"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ‘จ":["couple_with_heart_mw","couple_with_heart_wm"],"๐Ÿ‘จโ€โค๏ธโ€๐Ÿ‘จ":["couple_with_heart_mm"],"๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ‘ฉ":["couple_with_heart_ww"],"๐Ÿ‘ช๏ธ":["family"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ":["family_mwb"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง":["family_mwg"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_mwgb"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_mwbb"],"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_mwgg"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆ":["family_mmb"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง":["family_mmg"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_mmgb"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_mmbb"],"๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_mmgg"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ":["family_wwb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง":["family_wwg"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_wwgb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_wwbb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_wwgg"],"๐Ÿ‘จโ€๐Ÿ‘ฆ":["family_mb"],"๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_mbb"],"๐Ÿ‘จโ€๐Ÿ‘ง":["family_mg"],"๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_mgb"],"๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_mgg"],"๐Ÿ‘ฉโ€๐Ÿ‘ฆ":["family_wb"],"๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ":["family_wbb"],"๐Ÿ‘ฉโ€๐Ÿ‘ง":["family_wg"],"๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ":["family_wgb"],"๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง":["family_wgg"],"๐Ÿ—ฃ๏ธ":["speaking_head"],"๐Ÿ‘ค":["bust_in_silhouette"],"๐Ÿ‘ฅ":["busts_in_silhouette"],"๐Ÿซ‚":["people_hugging"],"๐Ÿ‘ฃ":["footprints"],"๐Ÿป":["tone1","tone_light"],"๐Ÿผ":["tone2","tone_medium_light"],"๐Ÿฝ":["tone3","tone_medium"],"๐Ÿพ":["tone4","tone_medium_dark"],"๐Ÿฟ":["tone5","tone_dark"],"๐Ÿฆฐ":["red_hair"],"๐Ÿฆฑ":["curly_hair"],"๐Ÿฆณ":["white_hair"],"๐Ÿฆฒ":["no_hair"],"๐Ÿต":["monkey_face"],"๐Ÿ’":["monkey"],"๐Ÿฆ":["gorilla"],"๐Ÿฆง":["orangutan"],"๐Ÿถ":["dog_face"],"๐Ÿ•๏ธ":["dog"],"๐Ÿฆฎ":["guide_dog"],"๐Ÿ•โ€๐Ÿฆบ":["service_dog"],"๐Ÿฉ":["poodle"],"๐Ÿบ":["wolf","wolf_face"],"๐ŸฆŠ":["fox","fox_face"],"๐Ÿฆ":["raccoon"],"๐Ÿฑ":["cat_face"],"๐Ÿˆ๏ธ":["cat"],"๐Ÿˆโ€โฌ›":["black_cat"],"๐Ÿฆ":["lion","lion_face"],"๐Ÿฏ":["tiger_face"],"๐Ÿ…":["tiger"],"๐Ÿ†":["leopard"],"๐Ÿด":["horse_face"],"๐ŸŽ":["horse","racehorse"],"๐Ÿฆ„":["unicorn","unicorn_face"],"๐Ÿฆ“":["zebra"],"๐ŸฆŒ":["deer"],"๐Ÿฆฌ":["bison"],"๐Ÿฎ":["cow_face"],"๐Ÿ‚":["ox"],"๐Ÿƒ":["water_buffalo"],"๐Ÿ„":["cow"],"๐Ÿท":["pig_face"],"๐Ÿ–":["pig"],"๐Ÿ—":["boar"],"๐Ÿฝ":["pig_nose"],"๐Ÿ":["ram"],"๐Ÿ‘":["ewe","sheep"],"๐Ÿ":["goat"],"๐Ÿช":["dromedary_camel"],"๐Ÿซ":["camel"],"๐Ÿฆ™":["llama"],"๐Ÿฆ’":["giraffe"],"๐Ÿ˜":["elephant"],"๐Ÿฆฃ":["mammoth"],"๐Ÿฆ":["rhino","rhinoceros"],"๐Ÿฆ›":["hippo"],"๐Ÿญ":["mouse_face"],"๐Ÿ":["mouse"],"๐Ÿ€":["rat"],"๐Ÿน":["hamster","hamster_face"],"๐Ÿฐ":["rabbit_face"],"๐Ÿ‡":["rabbit"],"๐Ÿฟ๏ธ":["chipmunk"],"๐Ÿฆซ":["beaver"],"๐Ÿฆ”":["hedgehog"],"๐Ÿฆ‡":["bat"],"๐Ÿป":["bear","bear_face"],"๐Ÿปโ€โ„๏ธ":["polar_bear","polar_bear_face"],"๐Ÿจ":["koala","koala_face"],"๐Ÿผ":["panda","panda_face"],"๐Ÿฆฅ":["sloth"],"๐Ÿฆฆ":["otter"],"๐Ÿฆจ":["skunk"],"๐Ÿฆ˜":["kangaroo"],"๐Ÿฆก":["badger"],"๐Ÿพ":["paw_prints"],"๐Ÿฆƒ":["turkey"],"๐Ÿ”":["chicken","chicken_face"],"๐Ÿ“":["rooster"],"๐Ÿฃ":["hatching_chick"],"๐Ÿค":["baby_chick"],"๐Ÿฅ":["hatched_chick"],"๐Ÿฆ๏ธ":["bird","bird_face"],"๐Ÿง":["penguin","penguin_face"],"๐Ÿ•Š๏ธ":["dove"],"๐Ÿฆ…":["eagle"],"๐Ÿฆ†":["duck"],"๐Ÿฆข":["swan"],"๐Ÿฆ‰":["owl"],"๐Ÿฆค":["dodo"],"๐Ÿชถ":["feather"],"๐Ÿฆฉ":["flamingo"],"๐Ÿฆš":["peacock"],"๐Ÿฆœ":["parrot"],"๐Ÿธ":["frog","frog_face"],"๐ŸŠ":["crocodile"],"๐Ÿข":["turtle"],"๐ŸฆŽ":["lizard"],"๐Ÿ":["snake"],"๐Ÿฒ":["dragon_face"],"๐Ÿ‰":["dragon"],"๐Ÿฆ•":["sauropod"],"๐Ÿฆ–":["t-rex","trex"],"๐Ÿณ":["spouting_whale"],"๐Ÿ‹":["whale"],"๐Ÿฌ":["dolphin"],"๐Ÿฆญ":["seal"],"๐ŸŸ๏ธ":["fish"],"๐Ÿ ":["tropical_fish"],"๐Ÿก":["blowfish"],"๐Ÿฆˆ":["shark"],"๐Ÿ™":["octopus"],"๐Ÿš":["shell"],"๐Ÿชธ":["coral"],"๐ŸŒ":["snail"],"๐Ÿฆ‹":["butterfly"],"๐Ÿ›":["bug"],"๐Ÿœ":["ant"],"๐Ÿ":["bee"],"๐Ÿชฒ":["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"],"๐ŸŒฑ":["seedling"],"๐Ÿชด":["potted_plant"],"๐ŸŒฒ":["evergreen_tree"],"๐ŸŒณ":["deciduous_tree"],"๐ŸŒด":["palm_tree"],"๐ŸŒต":["cactus"],"๐ŸŒพ":["ear_of_rice","sheaf_of_rice"],"๐ŸŒฟ":["herb"],"โ˜˜๏ธ":["shamrock"],"๐Ÿ€":["four_leaf_clover"],"๐Ÿ":["maple_leaf"],"๐Ÿ‚":["fallen_leaf"],"๐Ÿƒ":["leaves"],"๐Ÿชน":["empty_nest","nest"],"๐Ÿชบ":["nest_with_eggs"],"๐Ÿ‡":["grapes"],"๐Ÿˆ":["melon"],"๐Ÿ‰":["watermelon"],"๐ŸŠ":["orange","tangerine"],"๐Ÿ‹":["lemon"],"๐ŸŒ":["banana"],"๐Ÿ":["pineapple"],"๐Ÿฅญ":["mango"],"๐ŸŽ":["apple","red_apple"],"๐Ÿ":["green_apple"],"๐Ÿ":["pear"],"๐Ÿ‘":["peach"],"๐Ÿ’":["cherries"],"๐Ÿ“":["strawberry"],"๐Ÿซ":["blueberries"],"๐Ÿฅ":["kiwi"],"๐Ÿ…":["tomato"],"๐Ÿซ’":["olive"],"๐Ÿฅฅ":["coconut"],"๐Ÿฅ‘":["avocado"],"๐Ÿ†":["eggplant"],"๐Ÿฅ”":["potato"],"๐Ÿฅ•":["carrot"],"๐ŸŒฝ":["corn","ear_of_corn"],"๐ŸŒถ๏ธ":["hot_pepper"],"๐Ÿซ‘":["bell_pepper"],"๐Ÿฅ’":["cucumber"],"๐Ÿฅฌ":["leafy_green"],"๐Ÿฅฆ":["broccoli"],"๐Ÿง„":["garlic"],"๐Ÿง…":["onion"],"๐Ÿ„":["mushroom"],"๐Ÿฅœ":["peanuts"],"๐Ÿซ˜":["beans"],"๐ŸŒฐ":["chestnut"],"๐Ÿž":["bread"],"๐Ÿฅ":["croissant"],"๐Ÿฅ–":["baguette_bread"],"๐Ÿซ“":["flatbread"],"๐Ÿฅจ":["pretzel"],"๐Ÿฅฏ":["bagel"],"๐Ÿฅž":["pancakes"],"๐Ÿง‡":["waffle"],"๐Ÿง€":["cheese"],"๐Ÿ–":["meat_on_bone"],"๐Ÿ—":["poultry_leg"],"๐Ÿฅฉ":["cut_of_meat"],"๐Ÿฅ“":["bacon"],"๐Ÿ”":["hamburger"],"๐ŸŸ":["french_fries","fries"],"๐Ÿ•":["pizza"],"๐ŸŒญ":["hotdog"],"๐Ÿฅช":["sandwich"],"๐ŸŒฎ":["taco"],"๐ŸŒฏ":["burrito"],"๐Ÿซ”":["tamale"],"๐Ÿฅ™":["stuffed_flatbread"],"๐Ÿง†":["falafel"],"๐Ÿฅš":["egg"],"๐Ÿณ":["cooking","fried_egg"],"๐Ÿฅ˜":["shallow_pan_of_food"],"๐Ÿฒ":["pot_of_food","stew"],"๐Ÿซ•":["fondue"],"๐Ÿฅฃ":["bowl_with_spoon"],"๐Ÿฅ—":["green_salad","salad"],"๐Ÿฟ":["popcorn"],"๐Ÿงˆ":["butter"],"๐Ÿง‚":["salt"],"๐Ÿฅซ":["canned_food"],"๐Ÿฑ":["bento","bento_box"],"๐Ÿ˜":["rice_cracker"],"๐Ÿ™":["rice_ball"],"๐Ÿš":["cooked_rice","rice"],"๐Ÿ›":["curry","curry_rice"],"๐Ÿœ":["ramen","steaming_bowl"],"๐Ÿ":["spaghetti"],"๐Ÿ ":["sweet_potato"],"๐Ÿข":["oden"],"๐Ÿฃ":["sushi"],"๐Ÿค":["fried_shrimp"],"๐Ÿฅ":["fish_cake"],"๐Ÿฅฎ":["moon_cake"],"๐Ÿก":["dango"],"๐ŸฅŸ":["dumpling"],"๐Ÿฅ ":["fortune_cookie"],"๐Ÿฅก":["takeout_box"],"๐Ÿฆ€":["crab"],"๐Ÿฆž":["lobster"],"๐Ÿฆ":["shrimp"],"๐Ÿฆ‘":["squid"],"๐Ÿฆช":["oyster"],"๐Ÿฆ":["icecream","soft_serve"],"๐Ÿง":["shaved_ice"],"๐Ÿจ":["ice_cream"],"๐Ÿฉ":["doughnut"],"๐Ÿช":["cookie"],"๐ŸŽ‚":["birthday","birthday_cake"],"๐Ÿฐ":["cake","shortcake"],"๐Ÿง":["cupcake"],"๐Ÿฅง":["pie"],"๐Ÿซ":["chocolate_bar"],"๐Ÿฌ":["candy"],"๐Ÿญ":["lollipop"],"๐Ÿฎ":["custard"],"๐Ÿฏ":["honey_pot"],"๐Ÿผ":["baby_bottle"],"๐Ÿฅ›":["glass_of_milk","milk"],"โ˜•๏ธ":["coffee"],"๐Ÿซ–":["teapot"],"๐Ÿต":["tea"],"๐Ÿถ":["sake"],"๐Ÿพ":["champagne"],"๐Ÿท":["wine_glass"],"๐Ÿธ๏ธ":["cocktail"],"๐Ÿน":["tropical_drink"],"๐Ÿบ":["beer"],"๐Ÿป":["beers"],"๐Ÿฅ‚":["clinking_glasses"],"๐Ÿฅƒ":["tumbler_glass","whisky"],"๐Ÿซ—":["pour","pouring_liquid"],"๐Ÿฅค":["cup_with_straw"],"๐Ÿง‹":["boba_drink","bubble_tea"],"๐Ÿงƒ":["beverage_box","juice_box"],"๐Ÿง‰":["mate"],"๐ŸงŠ":["ice","ice_cube"],"๐Ÿฅข":["chopsticks"],"๐Ÿฝ๏ธ":["fork_knife_plate"],"๐Ÿด":["fork_and_knife"],"๐Ÿฅ„":["spoon"],"๐Ÿ”ช":["knife"],"๐Ÿซ™":["jar"],"๐Ÿบ":["amphora"],"๐ŸŒ๏ธ":["earth_africa","earth_europe"],"๐ŸŒŽ๏ธ":["earth_americas"],"๐ŸŒ๏ธ":["earth_asia"],"๐ŸŒ":["globe_with_meridians"],"๐Ÿ—บ๏ธ":["world_map"],"๐Ÿ—พ":["japan_map"],"๐Ÿงญ":["compass"],"๐Ÿ”๏ธ":["mountain_snow"],"โ›ฐ๏ธ":["mountain"],"๐ŸŒ‹":["volcano"],"๐Ÿ—ป":["mount_fuji"],"๐Ÿ•๏ธ":["camping"],"๐Ÿ–๏ธ":["beach","beach_with_umbrella"],"๐Ÿœ๏ธ":["desert"],"๐Ÿ๏ธ":["desert_island","island"],"๐Ÿž๏ธ":["national_park"],"๐ŸŸ๏ธ":["stadium"],"๐Ÿ›๏ธ":["classical_building"],"๐Ÿ—๏ธ":["building_construction","construction_site"],"๐Ÿงฑ":["bricks"],"๐Ÿชจ":["rock"],"๐Ÿชต":["wood"],"๐Ÿ›–":["hut"],"๐Ÿ˜๏ธ":["homes","houses"],"๐Ÿš๏ธ":["derelict_house","house_abandoned"],"๐Ÿ ๏ธ":["house"],"๐Ÿก":["house_with_garden"],"๐Ÿข":["office"],"๐Ÿฃ":["post_office"],"๐Ÿค":["european_post_office"],"๐Ÿฅ":["hospital"],"๐Ÿฆ":["bank"],"๐Ÿจ":["hotel"],"๐Ÿฉ":["love_hotel"],"๐Ÿช":["convenience_store"],"๐Ÿซ":["school"],"๐Ÿฌ":["department_store"],"๐Ÿญ๏ธ":["factory"],"๐Ÿฏ":["japanese_castle"],"๐Ÿฐ":["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_dusk"],"๐ŸŒ‡":["city_sunrise","city_sunset"],"๐ŸŒ‰":["bridge_at_night"],"โ™จ๏ธ":["hotsprings"],"๐ŸŽ ":["carousel_horse"],"๐Ÿ›":["playground_slide","slide"],"๐ŸŽก":["ferris_wheel"],"๐ŸŽข":["roller_coaster"],"๐Ÿ’ˆ":["barber","barber_pole"],"๐ŸŽช":["circus_tent"],"๐Ÿš‚":["steam_locomotive"],"๐Ÿšƒ":["railway_car"],"๐Ÿš„":["bullettrain_side"],"๐Ÿš…":["bullettrain_front"],"๐Ÿš†":["train"],"๐Ÿš‡๏ธ":["metro"],"๐Ÿšˆ":["light_rail"],"๐Ÿš‰":["station"],"๐ŸšŠ":["tram"],"๐Ÿš":["monorail"],"๐Ÿšž":["mountain_railway"],"๐Ÿš‹":["tram_car"],"๐ŸšŒ":["bus"],"๐Ÿš๏ธ":["oncoming_bus"],"๐ŸšŽ":["trolleybus"],"๐Ÿš":["minibus"],"๐Ÿš‘๏ธ":["ambulance"],"๐Ÿš’":["fire_engine"],"๐Ÿš“":["police_car"],"๐Ÿš”๏ธ":["oncoming_police_car"],"๐Ÿš•":["taxi"],"๐Ÿš–":["oncoming_taxi"],"๐Ÿš—":["car","red_car"],"๐Ÿš˜๏ธ":["oncoming_automobile"],"๐Ÿš™":["blue_car","suv"],"๐Ÿ›ป":["pickup_truck"],"๐Ÿšš":["delivery_truck","truck"],"๐Ÿš›":["articulated_lorry"],"๐Ÿšœ":["tractor"],"๐ŸŽ๏ธ":["racing_car"],"๐Ÿ๏ธ":["motorcycle"],"๐Ÿ›ต":["motor_scooter"],"๐Ÿฆฝ":["manual_wheelchair"],"๐Ÿฆผ":["motorized_wheelchair"],"๐Ÿ›บ":["auto_rickshaw"],"๐Ÿšฒ๏ธ":["bicycle","bike"],"๐Ÿ›ด":["scooter"],"๐Ÿ›น":["skateboard"],"๐Ÿ›ผ":["roller_skate"],"๐Ÿš":["busstop"],"๐Ÿ›ฃ๏ธ":["motorway"],"๐Ÿ›ค๏ธ":["railway_track"],"๐Ÿ›ข๏ธ":["oil_drum"],"โ›ฝ๏ธ":["fuelpump"],"๐Ÿ›ž":["wheel"],"๐Ÿšจ":["rotating_light"],"๐Ÿšฅ":["traffic_light"],"๐Ÿšฆ":["vertical_traffic_light"],"๐Ÿ›‘":["octagonal_sign","stop_sign"],"๐Ÿšง":["construction"],"โš“๏ธ":["anchor"],"๐Ÿ›Ÿ":["lifebuoy","ring_buoy"],"โ›ต๏ธ":["sailboat"],"๐Ÿ›ถ":["canoe"],"๐Ÿšค":["speedboat"],"๐Ÿ›ณ๏ธ":["cruise_ship","passenger_ship"],"โ›ด๏ธ":["ferry"],"๐Ÿ›ฅ๏ธ":["motorboat"],"๐Ÿšข":["ship"],"โœˆ๏ธ":["airplane"],"๐Ÿ›ฉ๏ธ":["small_airplane"],"๐Ÿ›ซ":["airplane_departure"],"๐Ÿ›ฌ":["airplane_arriving"],"๐Ÿช‚":["parachute"],"๐Ÿ’บ":["seat"],"๐Ÿš":["helicopter"],"๐ŸšŸ":["suspension_railway"],"๐Ÿš ":["mountain_cableway"],"๐Ÿšก":["aerial_tramway"],"๐Ÿ›ฐ๏ธ":["satellite"],"๐Ÿš€":["rocket"],"๐Ÿ›ธ":["flying_saucer"],"๐Ÿ›Ž๏ธ":["bellhop"],"๐Ÿงณ":["luggage"],"โŒ›๏ธ":["hourglass"],"โณ๏ธ":["hourglass_flowing_sand"],"โŒš๏ธ":["watch"],"โฐ":["alarm_clock"],"โฑ๏ธ":["stopwatch"],"โฒ๏ธ":["timer_clock"],"๐Ÿ•ฐ๏ธ":["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"],"๐ŸŒ”":["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"],"โ˜€๏ธ":["sun"],"๐ŸŒ":["full_moon_with_face"],"๐ŸŒž":["sun_with_face"],"๐Ÿช":["ringed_planet","saturn"],"โญ๏ธ":["star"],"๐ŸŒŸ":["glowing_star","star2"],"๐ŸŒ ":["shooting_star","stars"],"๐ŸŒŒ":["milky_way"],"โ˜๏ธ":["cloud"],"โ›…๏ธ":["partly_sunny","sun_behind_cloud"],"โ›ˆ๏ธ":["stormy","thunder_cloud_and_rain"],"๐ŸŒค๏ธ":["sun_behind_small_cloud","sunny"],"๐ŸŒฅ๏ธ":["cloudy","sun_behind_large_cloud"],"๐ŸŒฆ๏ธ":["sun_and_rain","sun_behind_rain_cloud"],"๐ŸŒง๏ธ":["cloud_with_rain","rainy"],"๐ŸŒจ๏ธ":["cloud_with_snow","snowy"],"๐ŸŒฉ๏ธ":["cloud_with_lightning","lightning"],"๐ŸŒช๏ธ":["tornado"],"๐ŸŒซ๏ธ":["fog"],"๐ŸŒฌ๏ธ":["wind_blowing_face"],"๐ŸŒ€":["cyclone"],"๐ŸŒˆ":["rainbow"],"๐ŸŒ‚":["closed_umbrella"],"โ˜‚๏ธ":["umbrella"],"โ˜”๏ธ":["umbrella_with_rain"],"โ›ฑ๏ธ":["beach_umbrella","umbrella_on_ground"],"โšก๏ธ":["high_voltage","zap"],"โ„๏ธ":["snowflake"],"โ˜ƒ๏ธ":["snowman2"],"โ›„๏ธ":["snowman"],"โ˜„๏ธ":["comet"],"๐Ÿ”ฅ":["fire"],"๐Ÿ’ง":["droplet"],"๐ŸŒŠ":["ocean","water_wave"],"๐ŸŽƒ":["jack_o_lantern"],"๐ŸŽ„":["christmas_tree"],"๐ŸŽ†":["fireworks"],"๐ŸŽ‡":["sparkler"],"๐Ÿงจ":["firecracker"],"โœจ":["sparkles"],"๐ŸŽˆ":["balloon"],"๐ŸŽ‰":["party","party_popper","tada"],"๐ŸŽŠ":["confetti_ball"],"๐ŸŽ‹":["tanabata_tree"],"๐ŸŽ":["bamboo"],"๐ŸŽŽ":["dolls"],"๐ŸŽ":["carp_streamer","flags"],"๐ŸŽ":["wind_chime"],"๐ŸŽ‘":["moon_ceremony","rice_scene"],"๐Ÿงง":["red_envelope"],"๐ŸŽ€":["ribbon"],"๐ŸŽ":["gift"],"๐ŸŽ—๏ธ":["reminder_ribbon"],"๐ŸŽŸ๏ธ":["admission_tickets","tickets"],"๐ŸŽซ":["ticket"],"๐ŸŽ–๏ธ":["military_medal"],"๐Ÿ†๏ธ":["trophy"],"๐Ÿ…":["sports_medal"],"๐Ÿฅ‡":["1st","first_place_medal"],"๐Ÿฅˆ":["2nd","second_place_medal"],"๐Ÿฅ‰":["3rd","third_place_medal"],"โšฝ๏ธ":["soccer"],"โšพ๏ธ":["baseball"],"๐ŸฅŽ":["softball"],"๐Ÿ€":["basketball"],"๐Ÿ":["volleyball"],"๐Ÿˆ":["football"],"๐Ÿ‰":["rugby_football"],"๐ŸŽพ":["tennis"],"๐Ÿฅ":["flying_disc"],"๐ŸŽณ":["bowling"],"๐Ÿ":["cricket_game"],"๐Ÿ‘":["field_hockey"],"๐Ÿ’":["hockey"],"๐Ÿฅ":["lacrosse"],"๐Ÿ“":["ping_pong"],"๐Ÿธ":["badminton"],"๐ŸฅŠ":["boxing_glove"],"๐Ÿฅ‹":["martial_arts_uniform"],"๐Ÿฅ…":["goal_net"],"โ›ณ๏ธ":["golf"],"โ›ธ๏ธ":["ice_skate"],"๐ŸŽฃ":["fishing_pole","fishing_pole_and_fish"],"๐Ÿคฟ":["diving_mask"],"๐ŸŽฝ":["running_shirt","running_shirt_with_sash"],"๐ŸŽฟ":["ski"],"๐Ÿ›ท":["sled"],"๐ŸฅŒ":["curling_stone"],"๐ŸŽฏ":["bullseye","dart","direct_hit"],"๐Ÿช€":["yo_yo"],"๐Ÿช":["kite"],"๐ŸŽฑ":["8ball","billiards"],"๐Ÿ”ฎ":["crystal_ball"],"๐Ÿช„":["magic_wand"],"๐Ÿงฟ":["nazar_amulet"],"๐Ÿชฌ":["hamsa"],"๐ŸŽฎ๏ธ":["controller","video_game"],"๐Ÿ•น๏ธ":["joystick"],"๐ŸŽฐ":["slot_machine"],"๐ŸŽฒ":["game_die"],"๐Ÿงฉ":["jigsaw","puzzle_piece"],"๐Ÿงธ":["teddy_bear"],"๐Ÿช…":["pinata"],"๐Ÿชฉ":["disco","disco_ball","mirror_ball"],"๐Ÿช†":["nesting_dolls"],"โ™ ๏ธ":["spades"],"โ™ฅ๏ธ":["hearts"],"โ™ฆ๏ธ":["diamonds"],"โ™ฃ๏ธ":["clubs"],"โ™Ÿ๏ธ":["chess_pawn"],"๐Ÿƒ":["black_joker"],"๐Ÿ€„๏ธ":["mahjong"],"๐ŸŽด":["flower_playing_cards"],"๐ŸŽญ๏ธ":["performing_arts"],"๐Ÿ–ผ๏ธ":["frame_with_picture","framed_picture"],"๐ŸŽจ":["art","palette"],"๐Ÿงต":["thread"],"๐Ÿชก":["sewing_needle"],"๐Ÿงถ":["yarn"],"๐Ÿชข":["knot"],"๐Ÿ‘“๏ธ":["eyeglasses","glasses"],"๐Ÿ•ถ๏ธ":["sunglasses"],"๐Ÿฅฝ":["goggles"],"๐Ÿฅผ":["lab_coat"],"๐Ÿฆบ":["safety_vest"],"๐Ÿ‘”":["necktie"],"๐Ÿ‘•":["shirt"],"๐Ÿ‘–":["jeans"],"๐Ÿงฃ":["scarf"],"๐Ÿงค":["gloves"],"๐Ÿงฅ":["coat"],"๐Ÿงฆ":["socks"],"๐Ÿ‘—":["dress"],"๐Ÿ‘˜":["kimono"],"๐Ÿฅป":["sari"],"๐Ÿฉฑ":["one_piece_swimsuit"],"๐Ÿฉฒ":["briefs"],"๐Ÿฉณ":["shorts"],"๐Ÿ‘™":["bikini"],"๐Ÿ‘š":["womans_clothes"],"๐Ÿ‘›":["purse"],"๐Ÿ‘œ":["handbag"],"๐Ÿ‘":["clutch_bag","pouch"],"๐Ÿ›๏ธ":["shopping_bags"],"๐ŸŽ’":["backpack","school_satchel"],"๐Ÿฉด":["thong_sandal"],"๐Ÿ‘ž":["mans_shoe"],"๐Ÿ‘Ÿ":["athletic_shoe","sneaker"],"๐Ÿฅพ":["hiking_boot"],"๐Ÿฅฟ":["flat_shoe","womans_flat_shoe"],"๐Ÿ‘ ":["high_heel"],"๐Ÿ‘ก":["sandal"],"๐Ÿฉฐ":["ballet_shoes"],"๐Ÿ‘ข":["boot"],"๐Ÿ‘‘":["crown"],"๐Ÿ‘’":["womans_hat"],"๐ŸŽฉ":["top_hat","tophat"],"๐ŸŽ“๏ธ":["graduation_cap","mortar_board"],"๐Ÿงข":["billed_cap"],"๐Ÿช–":["military_helmet"],"โ›‘๏ธ":["helmet_with_cross","rescue_worker_helmet"],"๐Ÿ“ฟ":["prayer_beads"],"๐Ÿ’„":["lipstick"],"๐Ÿ’":["ring"],"๐Ÿ’Ž":["gem"],"๐Ÿ”‡":["mute","no_sound"],"๐Ÿ”ˆ๏ธ":["low_volume","quiet_sound","speaker"],"๐Ÿ”‰":["medium_volumne","sound"],"๐Ÿ”Š":["high_volume","loud_sound"],"๐Ÿ“ข":["loudspeaker"],"๐Ÿ“ฃ":["mega","megaphone"],"๐Ÿ“ฏ":["postal_horn"],"๐Ÿ””":["bell"],"๐Ÿ”•":["no_bell"],"๐ŸŽผ":["musical_score"],"๐ŸŽต":["musical_note"],"๐ŸŽถ":["musical_notes","notes"],"๐ŸŽ™๏ธ":["studio_microphone"],"๐ŸŽš๏ธ":["level_slider"],"๐ŸŽ›๏ธ":["control_knobs"],"๐ŸŽค":["microphone"],"๐ŸŽง๏ธ":["headphones"],"๐Ÿ“ป๏ธ":["radio"],"๐ŸŽท":["saxophone"],"๐Ÿช—":["accordion"],"๐ŸŽธ":["guitar"],"๐ŸŽน":["musical_keyboard"],"๐ŸŽบ":["trumpet"],"๐ŸŽป":["violin"],"๐Ÿช•":["banjo"],"๐Ÿฅ":["drum"],"๐Ÿช˜":["long_drum"],"๐Ÿ“ฑ":["android","iphone","mobile_phone"],"๐Ÿ“ฒ":["calling","mobile_phone_arrow"],"โ˜Ž๏ธ":["telephone"],"๐Ÿ“ž":["telephone_receiver"],"๐Ÿ“Ÿ๏ธ":["pager"],"๐Ÿ“ ":["fax","fax_machine"],"๐Ÿ”‹":["battery"],"๐Ÿชซ":["low_battery"],"๐Ÿ”Œ":["electric_plug"],"๐Ÿ’ป๏ธ":["laptop"],"๐Ÿ–ฅ๏ธ":["computer","desktop_computer"],"๐Ÿ–จ๏ธ":["printer"],"โŒจ๏ธ":["keyboard"],"๐Ÿ–ฑ๏ธ":["computer_mouse"],"๐Ÿ–ฒ๏ธ":["trackball"],"๐Ÿ’ฝ":["computer_disk","minidisc"],"๐Ÿ’พ":["floppy_disk"],"๐Ÿ’ฟ๏ธ":["cd","optical_disk"],"๐Ÿ“€":["dvd"],"๐Ÿงฎ":["abacus"],"๐ŸŽฅ":["movie_camera"],"๐ŸŽž๏ธ":["film_frames"],"๐Ÿ“ฝ๏ธ":["film_projector"],"๐ŸŽฌ๏ธ":["clapper"],"๐Ÿ“บ๏ธ":["tv"],"๐Ÿ“ท๏ธ":["camera"],"๐Ÿ“ธ":["camera_with_flash"],"๐Ÿ“น๏ธ":["video_camera"],"๐Ÿ“ผ":["vhs","videocassette"],"๐Ÿ”๏ธ":["mag"],"๐Ÿ”Ž":["mag_right"],"๐Ÿ•ฏ๏ธ":["candle"],"๐Ÿ’ก":["bulb","light_bulb"],"๐Ÿ”ฆ":["flashlight"],"๐Ÿฎ":["izakaya_lantern","red_paper_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"],"๐Ÿ—ž๏ธ":["rolled_up_newspaper"],"๐Ÿ“‘":["bookmark_tabs"],"๐Ÿ”–":["bookmark"],"๐Ÿท๏ธ":["label"],"๐Ÿ’ฐ๏ธ":["moneybag"],"๐Ÿช™":["coin"],"๐Ÿ’ด":["yen"],"๐Ÿ’ต":["dollar"],"๐Ÿ’ถ":["euro"],"๐Ÿ’ท":["pound"],"๐Ÿ’ธ":["money_with_wings"],"๐Ÿ’ณ๏ธ":["credit_card"],"๐Ÿงพ":["receipt"],"๐Ÿ’น":["chart"],"โœ‰๏ธ":["envelope"],"๐Ÿ“ง":["e-mail","email"],"๐Ÿ“จ":["incoming_envelope"],"๐Ÿ“ฉ":["envelope_with_arrow"],"๐Ÿ“ค๏ธ":["outbox_tray"],"๐Ÿ“ฅ๏ธ":["inbox_tray"],"๐Ÿ“ฆ๏ธ":["package"],"๐Ÿ“ซ๏ธ":["mailbox"],"๐Ÿ“ช๏ธ":["mailbox_closed"],"๐Ÿ“ฌ๏ธ":["mailbox_with_mail"],"๐Ÿ“ญ๏ธ":["mailbox_with_no_mail"],"๐Ÿ“ฎ":["postbox"],"๐Ÿ—ณ๏ธ":["ballot_box"],"โœ๏ธ":["pencil"],"โœ’๏ธ":["black_nib"],"๐Ÿ–‹๏ธ":["fountain_pen"],"๐Ÿ–Š๏ธ":["pen"],"๐Ÿ–Œ๏ธ":["paintbrush"],"๐Ÿ–๏ธ":["crayon"],"๐Ÿ“":["memo"],"๐Ÿ’ผ":["briefcase"],"๐Ÿ“":["file_folder"],"๐Ÿ“‚":["open_file_folder"],"๐Ÿ—‚๏ธ":["card_index_dividers"],"๐Ÿ“…":["date"],"๐Ÿ“†":["calendar"],"๐Ÿ—’๏ธ":["notepad_spiral"],"๐Ÿ—“๏ธ":["calendar_spiral"],"๐Ÿ“‡":["card_index"],"๐Ÿ“ˆ":["chart_increasing","chart_with_upwards_trend"],"๐Ÿ“‰":["chart_decreasing","chart_with_downwards_trend"],"๐Ÿ“Š":["bar_chart"],"๐Ÿ“‹๏ธ":["clipboard"],"๐Ÿ“Œ":["pushpin"],"๐Ÿ“":["round_pushpin"],"๐Ÿ“Ž":["paperclip"],"๐Ÿ–‡๏ธ":["paperclips"],"๐Ÿ“":["straight_ruler"],"๐Ÿ“":["triangular_ruler"],"โœ‚๏ธ":["scissors"],"๐Ÿ—ƒ๏ธ":["card_file_box"],"๐Ÿ—„๏ธ":["file_cabinet"],"๐Ÿ—‘๏ธ":["trashcan","wastebasket"],"๐Ÿ”’๏ธ":["lock","locked"],"๐Ÿ”“๏ธ":["unlock","unlocked"],"๐Ÿ”":["lock_with_ink_pen","locked_with_pen"],"๐Ÿ”":["closed_lock_with_key","locked_with_key"],"๐Ÿ”‘":["key"],"๐Ÿ—๏ธ":["old_key"],"๐Ÿ”จ":["hammer"],"๐Ÿช“":["axe"],"โ›๏ธ":["pick"],"โš’๏ธ":["hammer_and_pick"],"๐Ÿ› ๏ธ":["hammer_and_wrench"],"๐Ÿ—ก๏ธ":["dagger"],"โš”๏ธ":["crossed_swords"],"๐Ÿ”ซ":["gun","pistol"],"๐Ÿชƒ":["boomerang"],"๐Ÿน":["bow_and_arrow"],"๐Ÿ›ก๏ธ":["shield"],"๐Ÿชš":["carpentry_saw"],"๐Ÿ”ง":["wrench"],"๐Ÿช›":["screwdriver"],"๐Ÿ”ฉ":["nut_and_bolt"],"โš™๏ธ":["gear"],"๐Ÿ—œ๏ธ":["clamp","compression"],"โš–๏ธ":["scales"],"๐Ÿฆฏ":["probing_cane","white_cane"],"๐Ÿ”—":["link"],"โ›“๏ธ":["chains"],"๐Ÿช":["hook"],"๐Ÿงฐ":["toolbox"],"๐Ÿงฒ":["magnet"],"๐Ÿชœ":["ladder"],"โš—๏ธ":["alembic"],"๐Ÿงช":["test_tube"],"๐Ÿงซ":["petri_dish"],"๐Ÿงฌ":["dna","double_helix"],"๐Ÿ”ฌ":["microscope"],"๐Ÿ”ญ":["telescope"],"๐Ÿ“ก":["satellite_antenna"],"๐Ÿ’‰":["syringe"],"๐Ÿฉธ":["drop_of_blood"],"๐Ÿ’Š":["pill"],"๐Ÿฉน":["adhesive_bandage","bandaid"],"๐Ÿฉผ":["crutch"],"๐Ÿฉบ":["stethoscope"],"๐Ÿฉป":["x-ray","xray"],"๐Ÿšช":["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","toilet_paper"],"๐Ÿชฃ":["bucket"],"๐Ÿงผ":["soap"],"๐Ÿซง":["bubbles"],"๐Ÿชฅ":["toothbrush"],"๐Ÿงฝ":["sponge"],"๐Ÿงฏ":["fire_extinguisher"],"๐Ÿ›’":["shopping_cart"],"๐Ÿšฌ":["cigarette","smoking"],"โšฐ๏ธ":["coffin"],"๐Ÿชฆ":["headstone"],"โšฑ๏ธ":["funeral_urn"],"๐Ÿ—ฟ":["moai","moyai"],"๐Ÿชง":["placard"],"๐Ÿชช":["id_card"],"๐Ÿง":["atm"],"๐Ÿšฎ":["litter_bin","put_litter_in_its_place"],"๐Ÿšฐ":["potable_water"],"โ™ฟ๏ธ":["handicapped","wheelchair"],"๐Ÿšน๏ธ":["mens"],"๐Ÿšบ๏ธ":["womens"],"๐Ÿšป":["bathroom","restroom"],"๐Ÿšผ๏ธ":["baby_symbol"],"๐Ÿšพ":["water_closet","wc"],"๐Ÿ›‚":["passport_control"],"๐Ÿ›ƒ":["customs"],"๐Ÿ›„":["baggage_claim"],"๐Ÿ›…":["left_luggage"],"โš ๏ธ":["warning"],"๐Ÿšธ":["children_crossing"],"โ›”๏ธ":["no_entry"],"๐Ÿšซ":["no_entry_sign"],"๐Ÿšณ":["no_bicycles"],"๐Ÿšญ๏ธ":["no_smoking"],"๐Ÿšฏ":["do_not_litter","no_littering"],"๐Ÿšฑ":["non-potable_water"],"๐Ÿšท":["no_pedestrians"],"๐Ÿ“ต":["no_mobile_phones"],"๐Ÿ”ž":["no_one_under_18","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"],"โ†ฉ๏ธ":["arrow_left_hook","leftwards_arrow_with_hook"],"โ†ช๏ธ":["arrow_right_hook","rightwards_arrow_with_hook"],"โคด๏ธ":["arrow_heading_up"],"โคต๏ธ":["arrow_heading_down"],"๐Ÿ”ƒ":["arrows_clockwise","clockwise"],"๐Ÿ”„":["arrows_counterclockwise","counterclockwise"],"๐Ÿ”™":["back"],"๐Ÿ”š":["end"],"๐Ÿ”›":["on"],"๐Ÿ”œ":["soon"],"๐Ÿ”":["top"],"๐Ÿ›":["place_of_worship"],"โš›๏ธ":["atom","atom_symbol"],"๐Ÿ•‰๏ธ":["om"],"โœก๏ธ":["star_of_david"],"โ˜ธ๏ธ":["wheel_of_dharma"],"โ˜ฏ๏ธ":["yin_yang"],"โœ๏ธ":["latin_cross"],"โ˜ฆ๏ธ":["orthodox_cross"],"โ˜ช๏ธ":["star_and_crescent"],"โ˜ฎ๏ธ":["peace","peace_symbol"],"๐Ÿ•Ž":["menorah"],"๐Ÿ”ฏ":["six_pointed_star"],"โ™ˆ๏ธ":["aries"],"โ™‰๏ธ":["taurus"],"โ™Š๏ธ":["gemini"],"โ™‹๏ธ":["cancer"],"โ™Œ๏ธ":["leo"],"โ™๏ธ":["virgo"],"โ™Ž๏ธ":["libra"],"โ™๏ธ":["scorpius"],"โ™๏ธ":["sagittarius"],"โ™‘๏ธ":["capricorn"],"โ™’๏ธ":["aquarius"],"โ™“๏ธ":["pisces"],"โ›Ž":["ophiuchus"],"๐Ÿ”€":["shuffle","twisted_rightwards_arrows"],"๐Ÿ”":["repeat"],"๐Ÿ”‚":["repeat_one"],"โ–ถ๏ธ":["arrow_forward","play"],"โฉ๏ธ":["fast_forward"],"โญ๏ธ":["next_track"],"โฏ๏ธ":["play_pause"],"โ—€๏ธ":["arrow_backward","reverse"],"โช๏ธ":["fast_reverse","rewind"],"โฎ๏ธ":["previous_track"],"๐Ÿ”ผ":["arrow_up_small","up"],"โซ":["arrow_double_up","fast_up"],"๐Ÿ”ฝ":["arrow_down_small","down"],"โฌ":["arrow_double_down","fast_down"],"โธ๏ธ":["pause"],"โน๏ธ":["stop"],"โบ๏ธ":["record"],"โ๏ธ":["eject"],"๐ŸŽฆ":["cinema"],"๐Ÿ”…":["dim_button","low_brightness"],"๐Ÿ”†":["bright_button","high_brightness"],"๐Ÿ“ถ":["antenna_bars","signal_strength"],"๐Ÿ“ณ":["vibration_mode"],"๐Ÿ“ด":["mobile_phone_off"],"โ™€๏ธ":["female","female_sign"],"โ™‚๏ธ":["male","male_sign"],"โšง๏ธ":["transgender_symbol"],"โœ–๏ธ":["multiplication","multiply"],"โž•":["plus"],"โž–":["minus"],"โž—":["divide","division"],"๐ŸŸฐ":["heavy_equals_sign"],"โ™พ๏ธ":["infinity"],"โ€ผ๏ธ":["bangbang","double_exclamation"],"โ‰๏ธ":["exclamation_question","interrobang"],"โ“๏ธ":["question"],"โ”":["white_question"],"โ•":["white_exclamation"],"โ—๏ธ":["exclamation"],"ใ€ฐ๏ธ":["wavy_dash"],"๐Ÿ’ฑ":["currency_exchange"],"๐Ÿ’ฒ":["heavy_dollar_sign"],"โš•๏ธ":["medical","medical_symbol"],"โ™ป๏ธ":["recycle","recycling_symbol"],"โšœ๏ธ":["fleur-de-lis"],"๐Ÿ”ฑ":["trident"],"๐Ÿ“›":["name_badge"],"๐Ÿ”ฐ":["beginner"],"โญ•๏ธ":["hollow_red_circle","red_o"],"โœ…":["check_mark_button","white_check_mark"],"โ˜‘๏ธ":["ballot_box_with_check"],"โœ”๏ธ":["check_mark","heavy_check_mark"],"โŒ":["cross_mark","x"],"โŽ":["cross_mark_button","negative_squared_cross_mark"],"โžฐ":["curly_loop"],"โžฟ":["double_curly_loop","loop"],"ใ€ฝ๏ธ":["part_alternation_mark"],"โœณ๏ธ":["eight_spoked_asterisk"],"โœด๏ธ":["eight_pointed_black_star"],"โ‡๏ธ":["sparkle"],"ยฉ๏ธ":["copyright"],"ยฎ๏ธ":["registered"],"โ„ข๏ธ":["tm","trade_mark"],"#๏ธโƒฃ":["hash","number_sign"],"*๏ธโƒฃ":["asterisk"],"0๏ธโƒฃ":["zero"],"1๏ธโƒฃ":["one"],"2๏ธโƒฃ":["two"],"3๏ธโƒฃ":["three"],"4๏ธโƒฃ":["four"],"5๏ธโƒฃ":["five"],"6๏ธโƒฃ":["six"],"7๏ธโƒฃ":["seven"],"8๏ธโƒฃ":["eight"],"9๏ธโƒฃ":["nine"],"๐Ÿ”Ÿ":["ten"],"๐Ÿ” ":["capital_abcd"],"๐Ÿ”ก":["abcd"],"๐Ÿ”ข":["1234"],"๐Ÿ”ฃ":["symbols"],"๐Ÿ”ค":["abc"],"๐Ÿ…ฐ๏ธ":["a","a_blood"],"๐Ÿ†Ž":["ab","ab_blood"],"๐Ÿ…ฑ๏ธ":["b","b_blood"],"๐Ÿ†‘":["cl"],"๐Ÿ†’":["cool"],"๐Ÿ†“":["free"],"โ„น๏ธ":["info","information_source"],"๐Ÿ†”":["id"],"โ“‚๏ธ":["m"],"๐Ÿ†•":["new"],"๐Ÿ†–":["ng"],"๐Ÿ…พ๏ธ":["o","o_blood"],"๐Ÿ†—":["ok"],"๐Ÿ…ฟ๏ธ":["parking"],"๐Ÿ†˜":["sos"],"๐Ÿ†™":["up2"],"๐Ÿ†š":["vs"],"๐Ÿˆ":["ja_here","koko"],"๐Ÿˆ‚๏ธ":["ja_service_charge"],"๐Ÿˆท๏ธ":["ja_monthly_amount"],"๐Ÿˆถ":["ja_not_free_of_carge"],"๐Ÿˆฏ๏ธ":["ja_reserved"],"๐Ÿ‰":["ideograph_advantage","ja_bargain"],"๐Ÿˆน":["ja_discount"],"๐Ÿˆš๏ธ":["ja_free_of_charge"],"๐Ÿˆฒ":["ja_prohibited"],"๐Ÿ‰‘":["accept","ja_acceptable"],"๐Ÿˆธ":["ja_application"],"๐Ÿˆด":["ja_passing_grade"],"๐Ÿˆณ":["ja_vacancy"],"ใŠ—๏ธ":["congratulations","ja_congratulations"],"ใŠ™๏ธ":["ja_secret","secret"],"๐Ÿˆบ":["ja_open_for_business"],"๐Ÿˆต":["ja_no_vacancy"],"๐Ÿ”ด":["red_circle"],"๐ŸŸ ":["orange_circle"],"๐ŸŸก":["yellow_circle"],"๐ŸŸข":["green_circle"],"๐Ÿ”ต":["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","diamond_with_a_dot"],"๐Ÿ”˜":["radio_button"],"๐Ÿ”ณ":["white_square_button"],"๐Ÿ”ฒ":["black_square_button"],"๐Ÿ":["checkered_flag"],"๐Ÿšฉ":["triangular_flag","triangular_flag_on_post"],"๐ŸŽŒ":["crossed_flags"],"๐Ÿด":["black_flag"],"๐Ÿณ๏ธ":["white_flag"],"๐Ÿณ๏ธโ€๐ŸŒˆ":["rainbow_flag"],"๐Ÿณ๏ธโ€โšง๏ธ":["transgender_flag"],"๐Ÿดโ€โ˜ ๏ธ":["jolly_roger","pirate_flag"],"๐Ÿ‡ฆ๐Ÿ‡จ":["ascension_island","flag_ac"],"๐Ÿ‡ฆ๐Ÿ‡ฉ":["andorra","flag_ad"],"๐Ÿ‡ฆ๐Ÿ‡ช":["flag_ae","united_arab_emirates"],"๐Ÿ‡ฆ๐Ÿ‡ซ":["afghanistan","flag_af"],"๐Ÿ‡ฆ๐Ÿ‡ฌ":["antigua_barbuda","flag_ag"],"๐Ÿ‡ฆ๐Ÿ‡ฎ":["anguilla","flag_ai"],"๐Ÿ‡ฆ๐Ÿ‡ฑ":["albania","flag_al"],"๐Ÿ‡ฆ๐Ÿ‡ฒ":["armenia","flag_am"],"๐Ÿ‡ฆ๐Ÿ‡ด":["angola","flag_ao"],"๐Ÿ‡ฆ๐Ÿ‡ถ":["antarctica","flag_aq"],"๐Ÿ‡ฆ๐Ÿ‡ท":["argentina","flag_ar"],"๐Ÿ‡ฆ๐Ÿ‡ธ":["american_samoa","flag_as"],"๐Ÿ‡ฆ๐Ÿ‡น":["austria","flag_at"],"๐Ÿ‡ฆ๐Ÿ‡บ":["australia","flag_au"],"๐Ÿ‡ฆ๐Ÿ‡ผ":["aruba","flag_aw"],"๐Ÿ‡ฆ๐Ÿ‡ฝ":["aland_islands","flag_ax"],"๐Ÿ‡ฆ๐Ÿ‡ฟ":["azerbaijan","flag_az"],"๐Ÿ‡ง๐Ÿ‡ฆ":["bosnia_herzegovina","flag_ba"],"๐Ÿ‡ง๐Ÿ‡ง":["barbados","flag_bb"],"๐Ÿ‡ง๐Ÿ‡ฉ":["bangladesh","flag_bd"],"๐Ÿ‡ง๐Ÿ‡ช":["belgium","flag_be"],"๐Ÿ‡ง๐Ÿ‡ซ":["burkina_faso","flag_bf"],"๐Ÿ‡ง๐Ÿ‡ฌ":["bulgaria","flag_bg"],"๐Ÿ‡ง๐Ÿ‡ญ":["bahrain","flag_bh"],"๐Ÿ‡ง๐Ÿ‡ฎ":["burundi","flag_bi"],"๐Ÿ‡ง๐Ÿ‡ฏ":["benin","flag_bj"],"๐Ÿ‡ง๐Ÿ‡ฑ":["flag_bl","st_barthelemy"],"๐Ÿ‡ง๐Ÿ‡ฒ":["bermuda","flag_bm"],"๐Ÿ‡ง๐Ÿ‡ณ":["brunei","flag_bn"],"๐Ÿ‡ง๐Ÿ‡ด":["bolivia","flag_bo"],"๐Ÿ‡ง๐Ÿ‡ถ":["caribbean_netherlands","flag_bq"],"๐Ÿ‡ง๐Ÿ‡ท":["brazil","flag_br"],"๐Ÿ‡ง๐Ÿ‡ธ":["bahamas","flag_bs"],"๐Ÿ‡ง๐Ÿ‡น":["bhutan","flag_bt"],"๐Ÿ‡ง๐Ÿ‡ป":["bouvet_island","flag_bv"],"๐Ÿ‡ง๐Ÿ‡ผ":["botswana","flag_bw"],"๐Ÿ‡ง๐Ÿ‡พ":["belarus","flag_by"],"๐Ÿ‡ง๐Ÿ‡ฟ":["belize","flag_bz"],"๐Ÿ‡จ๐Ÿ‡ฆ":["canada","flag_ca"],"๐Ÿ‡จ๐Ÿ‡จ":["cocos_islands","flag_cc"],"๐Ÿ‡จ๐Ÿ‡ฉ":["congo_kinshasa","flag_cd"],"๐Ÿ‡จ๐Ÿ‡ซ":["central_african_republic","flag_cf"],"๐Ÿ‡จ๐Ÿ‡ฌ":["congo_brazzaville","flag_cg"],"๐Ÿ‡จ๐Ÿ‡ญ":["flag_ch","switzerland"],"๐Ÿ‡จ๐Ÿ‡ฎ":["cote_divoire","flag_ci"],"๐Ÿ‡จ๐Ÿ‡ฐ":["cook_islands","flag_ck"],"๐Ÿ‡จ๐Ÿ‡ฑ":["chile","flag_cl"],"๐Ÿ‡จ๐Ÿ‡ฒ":["cameroon","flag_cm"],"๐Ÿ‡จ๐Ÿ‡ณ":["china","flag_cn"],"๐Ÿ‡จ๐Ÿ‡ด":["colombia","flag_co"],"๐Ÿ‡จ๐Ÿ‡ต":["clipperton_island","flag_cp"],"๐Ÿ‡จ๐Ÿ‡ท":["costa_rica","flag_cr"],"๐Ÿ‡จ๐Ÿ‡บ":["cuba","flag_cu"],"๐Ÿ‡จ๐Ÿ‡ป":["cape_verde","flag_cv"],"๐Ÿ‡จ๐Ÿ‡ผ":["curacao","flag_cw"],"๐Ÿ‡จ๐Ÿ‡ฝ":["christmas_island","flag_cx"],"๐Ÿ‡จ๐Ÿ‡พ":["cyprus","flag_cy"],"๐Ÿ‡จ๐Ÿ‡ฟ":["czech_republic","czechia","flag_cz"],"๐Ÿ‡ฉ๐Ÿ‡ช":["flag_de","germany"],"๐Ÿ‡ฉ๐Ÿ‡ฌ":["diego_garcia","flag_dg"],"๐Ÿ‡ฉ๐Ÿ‡ฏ":["djibouti","flag_dj"],"๐Ÿ‡ฉ๐Ÿ‡ฐ":["denmark","flag_dk"],"๐Ÿ‡ฉ๐Ÿ‡ฒ":["dominica","flag_dm"],"๐Ÿ‡ฉ๐Ÿ‡ด":["dominican_republic","flag_do"],"๐Ÿ‡ฉ๐Ÿ‡ฟ":["algeria","flag_dz"],"๐Ÿ‡ช๐Ÿ‡ฆ":["ceuta_melilla","flag_ea"],"๐Ÿ‡ช๐Ÿ‡จ":["ecuador","flag_ec"],"๐Ÿ‡ช๐Ÿ‡ช":["estonia","flag_ee"],"๐Ÿ‡ช๐Ÿ‡ฌ":["egypt","flag_eg"],"๐Ÿ‡ช๐Ÿ‡ญ":["flag_eh","western_sahara"],"๐Ÿ‡ช๐Ÿ‡ท":["eritrea","flag_er"],"๐Ÿ‡ช๐Ÿ‡ธ":["flag_es","spain"],"๐Ÿ‡ช๐Ÿ‡น":["ethiopia","flag_et"],"๐Ÿ‡ช๐Ÿ‡บ":["european_union","flag_eu"],"๐Ÿ‡ซ๐Ÿ‡ฎ":["finland","flag_fi"],"๐Ÿ‡ซ๐Ÿ‡ฏ":["fiji","flag_fj"],"๐Ÿ‡ซ๐Ÿ‡ฐ":["falkland_islands","flag_fk"],"๐Ÿ‡ซ๐Ÿ‡ฒ":["flag_fm","micronesia"],"๐Ÿ‡ซ๐Ÿ‡ด":["faroe_islands","flag_fo"],"๐Ÿ‡ซ๐Ÿ‡ท":["flag_fr","france"],"๐Ÿ‡ฌ๐Ÿ‡ฆ":["flag_ga","gabon"],"๐Ÿ‡ฌ๐Ÿ‡ง":["flag_gb","uk","united_kingdom"],"๐Ÿ‡ฌ๐Ÿ‡ฉ":["flag_gd","grenada"],"๐Ÿ‡ฌ๐Ÿ‡ช":["flag_ge","georgia"],"๐Ÿ‡ฌ๐Ÿ‡ซ":["flag_gf","french_guiana"],"๐Ÿ‡ฌ๐Ÿ‡ฌ":["flag_gg","guernsey"],"๐Ÿ‡ฌ๐Ÿ‡ญ":["flag_gh","ghana"],"๐Ÿ‡ฌ๐Ÿ‡ฎ":["flag_gi","gibraltar"],"๐Ÿ‡ฌ๐Ÿ‡ฑ":["flag_gl","greenland"],"๐Ÿ‡ฌ๐Ÿ‡ฒ":["flag_gm","gambia"],"๐Ÿ‡ฌ๐Ÿ‡ณ":["flag_gn","guinea"],"๐Ÿ‡ฌ๐Ÿ‡ต":["flag_gp","guadeloupe"],"๐Ÿ‡ฌ๐Ÿ‡ถ":["equatorial_guinea","flag_gq"],"๐Ÿ‡ฌ๐Ÿ‡ท":["flag_gr","greece"],"๐Ÿ‡ฌ๐Ÿ‡ธ":["flag_gs","south_georgia_south_sandwich_islands"],"๐Ÿ‡ฌ๐Ÿ‡น":["flag_gt","guatemala"],"๐Ÿ‡ฌ๐Ÿ‡บ":["flag_gu","guam"],"๐Ÿ‡ฌ๐Ÿ‡ผ":["flag_gw","guinea_bissau"],"๐Ÿ‡ฌ๐Ÿ‡พ":["flag_gy","guyana"],"๐Ÿ‡ญ๐Ÿ‡ฐ":["flag_hk","hong_kong"],"๐Ÿ‡ญ๐Ÿ‡ฒ":["flag_hm","heard_mcdonald_islands"],"๐Ÿ‡ญ๐Ÿ‡ณ":["flag_hn","honduras"],"๐Ÿ‡ญ๐Ÿ‡ท":["croatia","flag_hr"],"๐Ÿ‡ญ๐Ÿ‡น":["flag_ht","haiti"],"๐Ÿ‡ญ๐Ÿ‡บ":["flag_hu","hungary"],"๐Ÿ‡ฎ๐Ÿ‡จ":["canary_islands","flag_ic"],"๐Ÿ‡ฎ๐Ÿ‡ฉ":["flag_id","indonesia"],"๐Ÿ‡ฎ๐Ÿ‡ช":["flag_ie","ireland"],"๐Ÿ‡ฎ๐Ÿ‡ฑ":["flag_il","israel"],"๐Ÿ‡ฎ๐Ÿ‡ฒ":["flag_im","isle_of_man"],"๐Ÿ‡ฎ๐Ÿ‡ณ":["flag_in","india"],"๐Ÿ‡ฎ๐Ÿ‡ด":["british_indian_ocean_territory","flag_io"],"๐Ÿ‡ฎ๐Ÿ‡ถ":["flag_iq","iraq"],"๐Ÿ‡ฎ๐Ÿ‡ท":["flag_ir","iran"],"๐Ÿ‡ฎ๐Ÿ‡ธ":["flag_is","iceland"],"๐Ÿ‡ฎ๐Ÿ‡น":["flag_it","italy"],"๐Ÿ‡ฏ๐Ÿ‡ช":["flag_je","jersey"],"๐Ÿ‡ฏ๐Ÿ‡ฒ":["flag_jm","jamaica"],"๐Ÿ‡ฏ๐Ÿ‡ด":["flag_jo","jordan"],"๐Ÿ‡ฏ๐Ÿ‡ต":["flag_jp","japan"],"๐Ÿ‡ฐ๐Ÿ‡ช":["flag_ke","kenya"],"๐Ÿ‡ฐ๐Ÿ‡ฌ":["flag_kg","kyrgyzstan"],"๐Ÿ‡ฐ๐Ÿ‡ญ":["cambodia","flag_kh"],"๐Ÿ‡ฐ๐Ÿ‡ฎ":["flag_ki","kiribati"],"๐Ÿ‡ฐ๐Ÿ‡ฒ":["comoros","flag_km"],"๐Ÿ‡ฐ๐Ÿ‡ณ":["flag_kn","st_kitts_nevis"],"๐Ÿ‡ฐ๐Ÿ‡ต":["flag_kp","north_korea"],"๐Ÿ‡ฐ๐Ÿ‡ท":["flag_kr","south_korea"],"๐Ÿ‡ฐ๐Ÿ‡ผ":["flag_kw","kuwait"],"๐Ÿ‡ฐ๐Ÿ‡พ":["cayman_islands","flag_ky"],"๐Ÿ‡ฐ๐Ÿ‡ฟ":["flag_kz","kazakhstan"],"๐Ÿ‡ฑ๐Ÿ‡ฆ":["flag_la","laos"],"๐Ÿ‡ฑ๐Ÿ‡ง":["flag_lb","lebanon"],"๐Ÿ‡ฑ๐Ÿ‡จ":["flag_lc","st_lucia"],"๐Ÿ‡ฑ๐Ÿ‡ฎ":["flag_li","liechtenstein"],"๐Ÿ‡ฑ๐Ÿ‡ฐ":["flag_lk","sri_lanka"],"๐Ÿ‡ฑ๐Ÿ‡ท":["flag_lr","liberia"],"๐Ÿ‡ฑ๐Ÿ‡ธ":["flag_ls","lesotho"],"๐Ÿ‡ฑ๐Ÿ‡น":["flag_lt","lithuania"],"๐Ÿ‡ฑ๐Ÿ‡บ":["flag_lu","luxembourg"],"๐Ÿ‡ฑ๐Ÿ‡ป":["flag_lv","latvia"],"๐Ÿ‡ฑ๐Ÿ‡พ":["flag_ly","libya"],"๐Ÿ‡ฒ๐Ÿ‡ฆ":["flag_ma","morocco"],"๐Ÿ‡ฒ๐Ÿ‡จ":["flag_mc","monaco"],"๐Ÿ‡ฒ๐Ÿ‡ฉ":["flag_md","moldova"],"๐Ÿ‡ฒ๐Ÿ‡ช":["flag_me","montenegro"],"๐Ÿ‡ฒ๐Ÿ‡ซ":["flag_mf","st_martin"],"๐Ÿ‡ฒ๐Ÿ‡ฌ":["flag_mg","madagascar"],"๐Ÿ‡ฒ๐Ÿ‡ญ":["flag_mh","marshall_islands"],"๐Ÿ‡ฒ๐Ÿ‡ฐ":["flag_mk","macedonia"],"๐Ÿ‡ฒ๐Ÿ‡ฑ":["flag_ml","mali"],"๐Ÿ‡ฒ๐Ÿ‡ฒ":["burma","flag_mm","myanmar"],"๐Ÿ‡ฒ๐Ÿ‡ณ":["flag_mn","mongolia"],"๐Ÿ‡ฒ๐Ÿ‡ด":["flag_mo","macao","macau"],"๐Ÿ‡ฒ๐Ÿ‡ต":["flag_mp","northern_mariana_islands"],"๐Ÿ‡ฒ๐Ÿ‡ถ":["flag_mq","martinique"],"๐Ÿ‡ฒ๐Ÿ‡ท":["flag_mr","mauritania"],"๐Ÿ‡ฒ๐Ÿ‡ธ":["flag_ms","montserrat"],"๐Ÿ‡ฒ๐Ÿ‡น":["flag_mt","malta"],"๐Ÿ‡ฒ๐Ÿ‡บ":["flag_mu","mauritius"],"๐Ÿ‡ฒ๐Ÿ‡ป":["flag_mv","maldives"],"๐Ÿ‡ฒ๐Ÿ‡ผ":["flag_mw","malawi"],"๐Ÿ‡ฒ๐Ÿ‡ฝ":["flag_mx","mexico"],"๐Ÿ‡ฒ๐Ÿ‡พ":["flag_my","malaysia"],"๐Ÿ‡ฒ๐Ÿ‡ฟ":["flag_mz","mozambique"],"๐Ÿ‡ณ๐Ÿ‡ฆ":["flag_na","namibia"],"๐Ÿ‡ณ๐Ÿ‡จ":["flag_nc","new_caledonia"],"๐Ÿ‡ณ๐Ÿ‡ช":["flag_ne","niger"],"๐Ÿ‡ณ๐Ÿ‡ซ":["flag_nf","norfolk_island"],"๐Ÿ‡ณ๐Ÿ‡ฌ":["flag_ng","nigeria"],"๐Ÿ‡ณ๐Ÿ‡ฎ":["flag_ni","nicaragua"],"๐Ÿ‡ณ๐Ÿ‡ฑ":["flag_nl","netherlands"],"๐Ÿ‡ณ๐Ÿ‡ด":["flag_no","norway"],"๐Ÿ‡ณ๐Ÿ‡ต":["flag_np","nepal"],"๐Ÿ‡ณ๐Ÿ‡ท":["flag_nr","nauru"],"๐Ÿ‡ณ๐Ÿ‡บ":["flag_nu","niue"],"๐Ÿ‡ณ๐Ÿ‡ฟ":["flag_nz","new_zealand"],"๐Ÿ‡ด๐Ÿ‡ฒ":["flag_om","oman"],"๐Ÿ‡ต๐Ÿ‡ฆ":["flag_pa","panama"],"๐Ÿ‡ต๐Ÿ‡ช":["flag_pe","peru"],"๐Ÿ‡ต๐Ÿ‡ซ":["flag_pf","french_polynesia"],"๐Ÿ‡ต๐Ÿ‡ฌ":["flag_pg","papua_new_guinea"],"๐Ÿ‡ต๐Ÿ‡ญ":["flag_ph","philippines"],"๐Ÿ‡ต๐Ÿ‡ฐ":["flag_pk","pakistan"],"๐Ÿ‡ต๐Ÿ‡ฑ":["flag_pl","poland"],"๐Ÿ‡ต๐Ÿ‡ฒ":["flag_pm","st_pierre_miquelon"],"๐Ÿ‡ต๐Ÿ‡ณ":["flag_pn","pitcairn_islands"],"๐Ÿ‡ต๐Ÿ‡ท":["flag_pr","puerto_rico"],"๐Ÿ‡ต๐Ÿ‡ธ":["flag_ps","palestinian_territories"],"๐Ÿ‡ต๐Ÿ‡น":["flag_pt","portugal"],"๐Ÿ‡ต๐Ÿ‡ผ":["flag_pw","palau"],"๐Ÿ‡ต๐Ÿ‡พ":["flag_py","paraguay"],"๐Ÿ‡ถ๐Ÿ‡ฆ":["flag_qa","qatar"],"๐Ÿ‡ท๐Ÿ‡ช":["flag_re","reunion"],"๐Ÿ‡ท๐Ÿ‡ด":["flag_ro","romania"],"๐Ÿ‡ท๐Ÿ‡ธ":["flag_rs","serbia"],"๐Ÿ‡ท๐Ÿ‡บ":["flag_ru","russia"],"๐Ÿ‡ท๐Ÿ‡ผ":["flag_rw","rwanda"],"๐Ÿ‡ธ๐Ÿ‡ฆ":["flag_sa","saudi_arabia"],"๐Ÿ‡ธ๐Ÿ‡ง":["flag_sb","solomon_islands"],"๐Ÿ‡ธ๐Ÿ‡จ":["flag_sc","seychelles"],"๐Ÿ‡ธ๐Ÿ‡ฉ":["flag_sd","sudan"],"๐Ÿ‡ธ๐Ÿ‡ช":["flag_se","sweden"],"๐Ÿ‡ธ๐Ÿ‡ฌ":["flag_sg","singapore"],"๐Ÿ‡ธ๐Ÿ‡ญ":["flag_sh","st_helena"],"๐Ÿ‡ธ๐Ÿ‡ฎ":["flag_si","slovenia"],"๐Ÿ‡ธ๐Ÿ‡ฏ":["flag_sj","svalbard_jan_mayen"],"๐Ÿ‡ธ๐Ÿ‡ฐ":["flag_sk","slovakia"],"๐Ÿ‡ธ๐Ÿ‡ฑ":["flag_sl","sierra_leone"],"๐Ÿ‡ธ๐Ÿ‡ฒ":["flag_sm","san_marino"],"๐Ÿ‡ธ๐Ÿ‡ณ":["flag_sn","senegal"],"๐Ÿ‡ธ๐Ÿ‡ด":["flag_so","somalia"],"๐Ÿ‡ธ๐Ÿ‡ท":["flag_sr","suriname"],"๐Ÿ‡ธ๐Ÿ‡ธ":["flag_ss","south_sudan"],"๐Ÿ‡ธ๐Ÿ‡น":["flag_st","sao_tome_principe"],"๐Ÿ‡ธ๐Ÿ‡ป":["el_salvador","flag_sv"],"๐Ÿ‡ธ๐Ÿ‡ฝ":["flag_sx","sint_maarten"],"๐Ÿ‡ธ๐Ÿ‡พ":["flag_sy","syria"],"๐Ÿ‡ธ๐Ÿ‡ฟ":["eswatini","flag_sz","swaziland"],"๐Ÿ‡น๐Ÿ‡ฆ":["flag_ta","tristan_da_cunha"],"๐Ÿ‡น๐Ÿ‡จ":["flag_tc","turks_caicos_islands"],"๐Ÿ‡น๐Ÿ‡ฉ":["chad","flag_td"],"๐Ÿ‡น๐Ÿ‡ซ":["flag_tf","french_southern_territories"],"๐Ÿ‡น๐Ÿ‡ฌ":["flag_tg","togo"],"๐Ÿ‡น๐Ÿ‡ญ":["flag_th","thailand"],"๐Ÿ‡น๐Ÿ‡ฏ":["flag_tj","tajikistan"],"๐Ÿ‡น๐Ÿ‡ฐ":["flag_tk","tokelau"],"๐Ÿ‡น๐Ÿ‡ฑ":["flag_tl","timor_leste"],"๐Ÿ‡น๐Ÿ‡ฒ":["flag_tm","turkmenistan"],"๐Ÿ‡น๐Ÿ‡ณ":["flag_tn","tunisia"],"๐Ÿ‡น๐Ÿ‡ด":["flag_to","tonga"],"๐Ÿ‡น๐Ÿ‡ท":["flag_tr","turkey_tr"],"๐Ÿ‡น๐Ÿ‡น":["flag_tt","trinidad_tobago"],"๐Ÿ‡น๐Ÿ‡ป":["flag_tv","tuvalu"],"๐Ÿ‡น๐Ÿ‡ผ":["flag_tw","taiwan"],"๐Ÿ‡น๐Ÿ‡ฟ":["flag_tz","tanzania"],"๐Ÿ‡บ๐Ÿ‡ฆ":["flag_ua","ukraine"],"๐Ÿ‡บ๐Ÿ‡ฌ":["flag_ug","uganda"],"๐Ÿ‡บ๐Ÿ‡ฒ":["flag_um","us_outlying_islands"],"๐Ÿ‡บ๐Ÿ‡ณ":["flag_un","un","united_nations"],"๐Ÿ‡บ๐Ÿ‡ธ":["flag_us","united_states","usa"],"๐Ÿ‡บ๐Ÿ‡พ":["flag_uy","uruguay"],"๐Ÿ‡บ๐Ÿ‡ฟ":["flag_uz","uzbekistan"],"๐Ÿ‡ป๐Ÿ‡ฆ":["flag_va","vatican_city"],"๐Ÿ‡ป๐Ÿ‡จ":["flag_vc","st_vincent_grenadines"],"๐Ÿ‡ป๐Ÿ‡ช":["flag_ve","venezuela"],"๐Ÿ‡ป๐Ÿ‡ฌ":["british_virgin_islands","flag_vg"],"๐Ÿ‡ป๐Ÿ‡ฎ":["flag_vi","us_virgin_islands"],"๐Ÿ‡ป๐Ÿ‡ณ":["flag_vn","vietnam"],"๐Ÿ‡ป๐Ÿ‡บ":["flag_vu","vanuatu"],"๐Ÿ‡ผ๐Ÿ‡ซ":["flag_wf","wallis_futuna"],"๐Ÿ‡ผ๐Ÿ‡ธ":["flag_ws","samoa"],"๐Ÿ‡ฝ๐Ÿ‡ฐ":["flag_xk","kosovo"],"๐Ÿ‡พ๐Ÿ‡ช":["flag_ye","yemen"],"๐Ÿ‡พ๐Ÿ‡น":["flag_yt","mayotte"],"๐Ÿ‡ฟ๐Ÿ‡ฆ":["flag_za","south_africa"],"๐Ÿ‡ฟ๐Ÿ‡ฒ":["flag_zm","zambia"],"๐Ÿ‡ฟ๐Ÿ‡ผ":["flag_zw","zimbabwe"],"๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ":["england","flag_gbeng"],"๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ":["flag_gbsct","scotland"],"๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ":["flag_gbwls","wales"]}'),o=flarum.core.compat["common/extend"],i=flarum.core.compat["common/components/TextEditor"];var r=d.n(i);const _=flarum.core.compat["common/components/TextEditorButton"];var f=d.n(_);const c=flarum.core.compat["common/utils/KeyboardNavigatable"];var t=d.n(c);function l(d,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,e){return d.__proto__=e,d},l(d,e)}const s=flarum.core.compat["common/Fragment"];var g=function(d){var e,u;function a(){for(var e,u=arguments.length,a=new Array(u),n=0;n=a.length&&(n=0),this.index=n;var o=a.removeClass("active").eq(n).addClass("active");if(e){var i,r=u.scrollTop(),_=u.offset().top,f=_+u.outerHeight(),c=o.offset().top,t=c+o.outerHeight();c<_?i=r-_+c-parseInt(u.css("padding-top"),10):t>f&&(i=r-f+t+parseInt(u.css("padding-bottom"),10)),void 0!==i&&u.stop(!0).animate({scrollTop:i},100)}}},a}(d.n(s)()),b=function(){var d={base:"https://twemoji.maxcdn.com/v/14.0.2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var e="string"==typeof d?parseInt(d,16):d;return e<65536?r(e):r(55296+((e-=65536)>>10),56320+(1023&e))},toCodePoint:h},onerror:function(){this.parentNode&&this.parentNode.replaceChild(_(this.alt,!1),this)},parse:function(e,u){return u&&"function"!=typeof u||(u={callback:u}),("string"==typeof e?s:l)(e,{callback:u.callback||f,attributes:"function"==typeof u.attributes?u.attributes:m,base:"string"==typeof u.base?u.base:d.base,ext:u.ext||d.ext,size:u.folder||(a=u.size||d.size,"number"==typeof a?a+"x"+a:a),className:u.className||d.className,onerror:u.onerror||d.onerror});var a},replace:b,test:function(d){u.lastIndex=0;var e=u.test(d);return u.lastIndex=0,e}},e={"&":"&","<":"<",">":">","'":"'",'"':"""},u=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[ยฉยฎ\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef6]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedd-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec2\uded0-\uded9\udee0-\udee7]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,a=/\uFE0F/g,n=String.fromCharCode(8205),o=/[&<>'"]/g,i=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,r=String.fromCharCode;return d;function _(d,e){return document.createTextNode(e?d.replace(a,""):d)}function f(d,e){return"".concat(e.base,e.size,"/",d,e.ext)}function c(d,e){for(var u,a,n=d.childNodes,o=n.length;o--;)3===(a=(u=n[o]).nodeType)?e.push(u):1!==a||"ownerSVGElement"in u||i.test(u.nodeName.toLowerCase())||c(u,e);return e}function t(d){return h(d.indexOf(n)<0?d.replace(a,""):d)}function l(d,e){for(var a,n,o,i,r,f,l,s,g,m,b,h,p,w=c(d,[]),k=w.length;k--;){for(o=!1,i=document.createDocumentFragment(),f=(r=w[k]).nodeValue,s=0;l=u.exec(f);){if((g=l.index)!==s&&i.appendChild(_(f.slice(s,g),!0)),h=t(b=l[0]),s=g+b.length,p=e.callback(h,e),h&&p){for(n in(m=new Image).onerror=e.onerror,m.setAttribute("draggable","false"),a=e.attributes(b,h))a.hasOwnProperty(n)&&0!==n.indexOf("on")&&!m.hasAttribute(n)&&m.setAttribute(n,a[n]);m.className=e.className,m.alt=b,m.src=p,o=!0,i.appendChild(m)}m||i.appendChild(_(b,!1)),m=null}o&&(s")}return n}))}function g(d){return e[d]}function m(){return null}function b(d,e){return String(d).replace(u,e)}function h(d,e){for(var u=[],a=0,n=0,o=0;o=d.length?{done:!0}:{done:!1,value:d[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(d,e){(null==e||e>d.length)&&(e=d.length);for(var u=0,a=new Array(e);u'),u=new g,(0,o.extend)(r().prototype,"oncreate",(function(){var d=this.$(".TextEditor-editor").wrap('
');this.navigator=new(t()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(d),d.after(e)})),(0,o.extend)(r().prototype,"buildEditorParams",(function(a){var o,i,r,_=this;a.inputListeners.push((function(){var a=_.attrs.composer.editor.getSelectionRange(),f=a[0];if(!(a[1]-f>0)){var c=_.attrs.composer.editor.getLastNChars(15);i=0;for(var t=c.length-1;t>=0;t--){var l=c.substr(t,1);if(!/[a-z0-9]|\+|\-|_|\:/.test(l))break;if(":"===l&&(0==t||/\s/.test(c.substr(t-1,1)))){o=t+1,i=f-c.length+t+1;break}}if(u.hide(),u.active=!1,i){r=c.substring(o).toLowerCase();var s=function(d){var e=d.emoji,a=d.name,n=d.code;return m("button",{key:e,onclick:function(){return d=e,_.attrs.composer.editor.replaceBeforeCursor(i-1,d+" "),void u.hide();var d},onmouseenter:function(){u.setIndex($(this).parent().index()-1)}},m("img",{alt:e,className:"emoji",draggable:"false",loading:"lazy",src:y+"72x72/"+n+".png"}),a)};!function(){var a,o,f=[],c=(a=r,o=new RegExp("\\((["+"+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1")+"])\\)","g"),new RegExp("(.*)"+a.toLowerCase().replace(/(.)/g,"($1)(.*?)").replace(o,"(\\$1)")+"$","i")),t=7,l=function(e){for(var u=0;u0;u++){var a=d[u];if(-1===f.indexOf(a))for(var o,i=v(n[a]);!(o=i()).done;)if(e(o.value)){--t,f.push(a);break}}};l((function(d){return 0===d.indexOf(r)})),l((function(d){return c.test(d)}));var g=f.map((function(d){return{emoji:d,name:n[d][0],code:k(d)}})).map(s);if(g.length){u.items=g,m.render(e[0],u.render()),u.show();var b=_.attrs.composer.editor.getCaretCoordinates(i),h=u.$().outerWidth(),p=u.$().outerHeight(),w=u.$().offsetParent(),y=b.left,x=b.top+15;x+p>w.height()&&(x=b.top-p-15),y+h>w.width()&&(y=w.width()-h),x=Math.max(-(w.offset().top-$(document).scrollTop()),x),y=Math.max(-w.offset().left,y),u.show(y,x)}}(),u.setIndex(0),u.$().scrollTop(0),u.active=!0}}}))})),(0,o.extend)(r().prototype,"toolbarItems",(function(d){var e=this;d.add("emoji",m(f(),{onclick:function(){return e.attrs.composer.editor.insertAtCursor(" :")},icon:"far fa-smile"},app.translator.trans("flarum-emoji.forum.composer.emoji_tooltip")))})),(0,o.override)(z().prototype,"contentHtml",(function(d){var e,u,a=d();if(this.oldContentHtml!==a){var n=h.parse((e=a,(u=document.implementation.createHTMLDocument()).body.innerHTML=e,u.body),q);this.emojifiedContentHtml=n.innerHTML,this.oldContentHtml=a}return this.emojifiedContentHtml})),(0,o.override)(s9e.TextFormatter,"preview",(function(d,e,u){d(e,u),h.parse(u,q)}))}))})(),module.exports=e})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/emoji/js/dist/forum.js.map b/extensions/emoji/js/dist/forum.js.map index 9d3f34b878..1c3dcc6159 100644 --- a/extensions/emoji/js/dist/forum.js.map +++ b/extensions/emoji/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,kCCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,6m9CCAlD,EAA+BF,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,6CCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,mDCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iDCAzC,SAASC,EAAgBhB,EAAGiB,GAKzC,OAJAD,EAAkBf,OAAOiB,eAAiBjB,OAAOiB,eAAeC,OAAS,SAAyBnB,EAAGiB,GAEnG,OADAjB,EAAEoB,UAAYH,EACPjB,CACT,EACOgB,EAAgBhB,EAAGiB,EAC5B,CCNA,MAAM,EAA+BJ,OAAOC,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AM,8CAG5B,KFnJA+L,EAAAA,EAAAA,UAASC,IAAAA,UAAgB,eAAe,SAAUC,GAChD,IATehF,EACXiF,EAQEC,EAAcF,IAEpB,GAAIhM,KAAKmM,iBAAmBD,EAAa,CAWvC,IAAME,EAAe5J,EAAAA,OAtBRwE,EAsBgCkF,GArB3CD,EAAMnH,SAASuH,eAAeC,sBAChCC,KAAKC,UAAYxF,EAEdiF,EAAIM,MAkBoDtH,GAG3DjF,KAAKyM,qBAAuBL,EAAaI,UAEzCxM,KAAKmM,eAAiBD,CACxB,CAEA,OAAOlM,KAAKyM,oBACd,KAEAX,EAAAA,EAAAA,UAASY,IAAIC,cAAe,WAAW,SAACX,EAAU7H,EAAMyI,GACtDZ,EAAS7H,EAAMyI,GAEfpK,EAAAA,MAAcoK,EAAS3H,EACzB,GC7CF","sources":["webpack://@flarum/emoji/webpack/bootstrap","webpack://@flarum/emoji/webpack/runtime/compat get default export","webpack://@flarum/emoji/webpack/runtime/define property getters","webpack://@flarum/emoji/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/emoji/webpack/runtime/make namespace object","webpack://@flarum/emoji/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/components/TextEditorButton']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/utils/KeyboardNavigatable']\"","webpack://@flarum/emoji/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/emoji/external root \"flarum.core.compat['common/Fragment']\"","webpack://@flarum/emoji/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/emoji/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/emoji/../../../node_modules/twemoji/dist/twemoji.esm.js","webpack://@flarum/emoji/./src/forum/helpers/getEmojiIconCode.js","webpack://@flarum/emoji/./src/forum/cdn.js","webpack://@flarum/emoji/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/emoji/./src/forum/renderEmoji.js","webpack://@flarum/emoji/./src/forum/index.js","webpack://@flarum/emoji/./src/forum/addComposerAutocomplete.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditorButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/KeyboardNavigatable'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Fragment'];","import Fragment from 'flarum/common/Fragment';\n\nexport default class AutocompleteDropdown extends Fragment {\n items = [];\n active = false;\n index = 0;\n keyWasJustPressed = false;\n\n view() {\n return (\n
    \n
  • {app.translator.trans('flarum-emoji.forum.composer.type_to_search_text')}
  • \n {this.items.map((item) => (\n
  • {item}
  • \n ))}\n
\n );\n }\n\n show(left, top) {\n this.$()\n .show()\n .css({\n left: left + 'px',\n top: top + 'px',\n });\n this.active = true;\n }\n\n hide() {\n this.$().hide();\n this.active = false;\n }\n\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => (this.keyWasJustPressed = false), 500);\n }\n\n complete() {\n this.$('li:not(.Dropdown-header)').eq(this.index).find('button').click();\n }\n\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n\n const $dropdown = this.$();\n const $items = $dropdown.find('li:not(.Dropdown-header)');\n let rangedIndex = index;\n\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n\n this.index = rangedIndex;\n\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({ scrollTop }, 100);\n }\n }\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\nvar twemoji=function(){\"use strict\";var twemoji={base:\"https://twemoji.maxcdn.com/v/14.0.2/\",ext:\".png\",size:\"72x72\",className:\"emoji\",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){if(this.parentNode){this.parentNode.replaceChild(createText(this.alt,false),this)}},parse:parse,replace:replace,test:test},escaper={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\"'\":\"'\",'\"':\""\"},re=/(?:\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udffe]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\udef1\\ud83c\\udffb\\u200d\\ud83e\\udef2\\ud83c[\\udffc-\\udfff]|\\ud83e\\udef1\\ud83c\\udffc\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\udef1\\ud83c\\udffd\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\udef1\\ud83c\\udffe\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\udef1\\ud83c\\udfff\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1|\\ud83d\\udc6b\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6c\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6d\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc8f\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc91\\ud83c[\\udffb-\\udfff]|\\ud83e\\udd1d\\ud83c[\\udffb-\\udfff]|\\ud83d[\\udc6b-\\udc6d\\udc8f\\udc91]|\\ud83e\\udd1d)|(?:\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1)(?:\\ud83c[\\udffb-\\udfff])?\\u200d(?:\\u2695\\ufe0f|\\u2696\\ufe0f|\\u2708\\ufe0f|\\ud83c[\\udf3e\\udf73\\udf7c\\udf84\\udf93\\udfa4\\udfa8\\udfeb\\udfed]|\\ud83d[\\udcbb\\udcbc\\udd27\\udd2c\\ude80\\ude92]|\\ud83e[\\uddaf-\\uddb3\\uddbc\\uddbd])|(?:\\ud83c[\\udfcb\\udfcc]|\\ud83d[\\udd74\\udd75]|\\u26f9)((?:\\ud83c[\\udffb-\\udfff]|\\ufe0f)\\u200d[\\u2640\\u2642]\\ufe0f)|(?:\\ud83c[\\udfc3\\udfc4\\udfca]|\\ud83d[\\udc6e\\udc70\\udc71\\udc73\\udc77\\udc81\\udc82\\udc86\\udc87\\ude45-\\ude47\\ude4b\\ude4d\\ude4e\\udea3\\udeb4-\\udeb6]|\\ud83e[\\udd26\\udd35\\udd37-\\udd39\\udd3d\\udd3e\\uddb8\\uddb9\\uddcd-\\uddcf\\uddd4\\uddd6-\\udddd])(?:\\ud83c[\\udffb-\\udfff])?\\u200d[\\u2640\\u2642]\\ufe0f|(?:\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83c\\udff3\\ufe0f\\u200d\\u26a7\\ufe0f|\\ud83c\\udff3\\ufe0f\\u200d\\ud83c\\udf08|\\ud83d\\ude36\\u200d\\ud83c\\udf2b\\ufe0f|\\u2764\\ufe0f\\u200d\\ud83d\\udd25|\\u2764\\ufe0f\\u200d\\ud83e\\ude79|\\ud83c\\udff4\\u200d\\u2620\\ufe0f|\\ud83d\\udc15\\u200d\\ud83e\\uddba|\\ud83d\\udc3b\\u200d\\u2744\\ufe0f|\\ud83d\\udc41\\u200d\\ud83d\\udde8|\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc6f\\u200d\\u2640\\ufe0f|\\ud83d\\udc6f\\u200d\\u2642\\ufe0f|\\ud83d\\ude2e\\u200d\\ud83d\\udca8|\\ud83d\\ude35\\u200d\\ud83d\\udcab|\\ud83e\\udd3c\\u200d\\u2640\\ufe0f|\\ud83e\\udd3c\\u200d\\u2642\\ufe0f|\\ud83e\\uddde\\u200d\\u2640\\ufe0f|\\ud83e\\uddde\\u200d\\u2642\\ufe0f|\\ud83e\\udddf\\u200d\\u2640\\ufe0f|\\ud83e\\udddf\\u200d\\u2642\\ufe0f|\\ud83d\\udc08\\u200d\\u2b1b)|[#*0-9]\\ufe0f?\\u20e3|(?:[ยฉยฎ\\u2122\\u265f]\\ufe0f)|(?:\\ud83c[\\udc04\\udd70\\udd71\\udd7e\\udd7f\\ude02\\ude1a\\ude2f\\ude37\\udf21\\udf24-\\udf2c\\udf36\\udf7d\\udf96\\udf97\\udf99-\\udf9b\\udf9e\\udf9f\\udfcd\\udfce\\udfd4-\\udfdf\\udff3\\udff5\\udff7]|\\ud83d[\\udc3f\\udc41\\udcfd\\udd49\\udd4a\\udd6f\\udd70\\udd73\\udd76-\\udd79\\udd87\\udd8a-\\udd8d\\udda5\\udda8\\uddb1\\uddb2\\uddbc\\uddc2-\\uddc4\\uddd1-\\uddd3\\udddc-\\uddde\\udde1\\udde3\\udde8\\uddef\\uddf3\\uddfa\\udecb\\udecd-\\udecf\\udee0-\\udee5\\udee9\\udef0\\udef3]|[\\u203c\\u2049\\u2139\\u2194-\\u2199\\u21a9\\u21aa\\u231a\\u231b\\u2328\\u23cf\\u23ed-\\u23ef\\u23f1\\u23f2\\u23f8-\\u23fa\\u24c2\\u25aa\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u2600-\\u2604\\u260e\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262a\\u262e\\u262f\\u2638-\\u263a\\u2640\\u2642\\u2648-\\u2653\\u2660\\u2663\\u2665\\u2666\\u2668\\u267b\\u267f\\u2692-\\u2697\\u2699\\u269b\\u269c\\u26a0\\u26a1\\u26a7\\u26aa\\u26ab\\u26b0\\u26b1\\u26bd\\u26be\\u26c4\\u26c5\\u26c8\\u26cf\\u26d1\\u26d3\\u26d4\\u26e9\\u26ea\\u26f0-\\u26f5\\u26f8\\u26fa\\u26fd\\u2702\\u2708\\u2709\\u270f\\u2712\\u2714\\u2716\\u271d\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u2764\\u27a1\\u2934\\u2935\\u2b05-\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u3030\\u303d\\u3297\\u3299])(?:\\ufe0f|(?!\\ufe0e))|(?:(?:\\ud83c[\\udfcb\\udfcc]|\\ud83d[\\udd74\\udd75\\udd90]|[\\u261d\\u26f7\\u26f9\\u270c\\u270d])(?:\\ufe0f|(?!\\ufe0e))|(?:\\ud83c[\\udf85\\udfc2-\\udfc4\\udfc7\\udfca]|\\ud83d[\\udc42\\udc43\\udc46-\\udc50\\udc66-\\udc69\\udc6e\\udc70-\\udc78\\udc7c\\udc81-\\udc83\\udc85-\\udc87\\udcaa\\udd7a\\udd95\\udd96\\ude45-\\ude47\\ude4b-\\ude4f\\udea3\\udeb4-\\udeb6\\udec0\\udecc]|\\ud83e[\\udd0c\\udd0f\\udd18-\\udd1c\\udd1e\\udd1f\\udd26\\udd30-\\udd39\\udd3d\\udd3e\\udd77\\uddb5\\uddb6\\uddb8\\uddb9\\uddbb\\uddcd-\\uddcf\\uddd1-\\udddd\\udec3-\\udec5\\udef0-\\udef6]|[\\u270a\\u270b]))(?:\\ud83c[\\udffb-\\udfff])?|(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc65\\udb40\\udc6e\\udb40\\udc67\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc73\\udb40\\udc63\\udb40\\udc74\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc77\\udb40\\udc6c\\udb40\\udc73\\udb40\\udc7f|\\ud83c\\udde6\\ud83c[\\udde8-\\uddec\\uddee\\uddf1\\uddf2\\uddf4\\uddf6-\\uddfa\\uddfc\\uddfd\\uddff]|\\ud83c\\udde7\\ud83c[\\udde6\\udde7\\udde9-\\uddef\\uddf1-\\uddf4\\uddf6-\\uddf9\\uddfb\\uddfc\\uddfe\\uddff]|\\ud83c\\udde8\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\uddee\\uddf0-\\uddf5\\uddf7\\uddfa-\\uddff]|\\ud83c\\udde9\\ud83c[\\uddea\\uddec\\uddef\\uddf0\\uddf2\\uddf4\\uddff]|\\ud83c\\uddea\\ud83c[\\udde6\\udde8\\uddea\\uddec\\udded\\uddf7-\\uddfa]|\\ud83c\\uddeb\\ud83c[\\uddee-\\uddf0\\uddf2\\uddf4\\uddf7]|\\ud83c\\uddec\\ud83c[\\udde6\\udde7\\udde9-\\uddee\\uddf1-\\uddf3\\uddf5-\\uddfa\\uddfc\\uddfe]|\\ud83c\\udded\\ud83c[\\uddf0\\uddf2\\uddf3\\uddf7\\uddf9\\uddfa]|\\ud83c\\uddee\\ud83c[\\udde8-\\uddea\\uddf1-\\uddf4\\uddf6-\\uddf9]|\\ud83c\\uddef\\ud83c[\\uddea\\uddf2\\uddf4\\uddf5]|\\ud83c\\uddf0\\ud83c[\\uddea\\uddec-\\uddee\\uddf2\\uddf3\\uddf5\\uddf7\\uddfc\\uddfe\\uddff]|\\ud83c\\uddf1\\ud83c[\\udde6-\\udde8\\uddee\\uddf0\\uddf7-\\uddfb\\uddfe]|\\ud83c\\uddf2\\ud83c[\\udde6\\udde8-\\udded\\uddf0-\\uddff]|\\ud83c\\uddf3\\ud83c[\\udde6\\udde8\\uddea-\\uddec\\uddee\\uddf1\\uddf4\\uddf5\\uddf7\\uddfa\\uddff]|\\ud83c\\uddf4\\ud83c\\uddf2|\\ud83c\\uddf5\\ud83c[\\udde6\\uddea-\\udded\\uddf0-\\uddf3\\uddf7-\\uddf9\\uddfc\\uddfe]|\\ud83c\\uddf6\\ud83c\\udde6|\\ud83c\\uddf7\\ud83c[\\uddea\\uddf4\\uddf8\\uddfa\\uddfc]|\\ud83c\\uddf8\\ud83c[\\udde6-\\uddea\\uddec-\\uddf4\\uddf7-\\uddf9\\uddfb\\uddfd-\\uddff]|\\ud83c\\uddf9\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\udded\\uddef-\\uddf4\\uddf7\\uddf9\\uddfb\\uddfc\\uddff]|\\ud83c\\uddfa\\ud83c[\\udde6\\uddec\\uddf2\\uddf3\\uddf8\\uddfe\\uddff]|\\ud83c\\uddfb\\ud83c[\\udde6\\udde8\\uddea\\uddec\\uddee\\uddf3\\uddfa]|\\ud83c\\uddfc\\ud83c[\\uddeb\\uddf8]|\\ud83c\\uddfd\\ud83c\\uddf0|\\ud83c\\uddfe\\ud83c[\\uddea\\uddf9]|\\ud83c\\uddff\\ud83c[\\udde6\\uddf2\\uddfc]|\\ud83c[\\udccf\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01\\ude32-\\ude36\\ude38-\\ude3a\\ude50\\ude51\\udf00-\\udf20\\udf2d-\\udf35\\udf37-\\udf7c\\udf7e-\\udf84\\udf86-\\udf93\\udfa0-\\udfc1\\udfc5\\udfc6\\udfc8\\udfc9\\udfcf-\\udfd3\\udfe0-\\udff0\\udff4\\udff8-\\udfff]|\\ud83d[\\udc00-\\udc3e\\udc40\\udc44\\udc45\\udc51-\\udc65\\udc6a\\udc6f\\udc79-\\udc7b\\udc7d-\\udc80\\udc84\\udc88-\\udc8e\\udc90\\udc92-\\udca9\\udcab-\\udcfc\\udcff-\\udd3d\\udd4b-\\udd4e\\udd50-\\udd67\\udda4\\uddfb-\\ude44\\ude48-\\ude4a\\ude80-\\udea2\\udea4-\\udeb3\\udeb7-\\udebf\\udec1-\\udec5\\uded0-\\uded2\\uded5-\\uded7\\udedd-\\udedf\\udeeb\\udeec\\udef4-\\udefc\\udfe0-\\udfeb\\udff0]|\\ud83e[\\udd0d\\udd0e\\udd10-\\udd17\\udd20-\\udd25\\udd27-\\udd2f\\udd3a\\udd3c\\udd3f-\\udd45\\udd47-\\udd76\\udd78-\\uddb4\\uddb7\\uddba\\uddbc-\\uddcc\\uddd0\\uddde-\\uddff\\ude70-\\ude74\\ude78-\\ude7c\\ude80-\\ude86\\ude90-\\udeac\\udeb0-\\udeba\\udec0-\\udec2\\uded0-\\uded9\\udee0-\\udee7]|[\\u23e9-\\u23ec\\u23f0\\u23f3\\u267e\\u26ce\\u2705\\u2728\\u274c\\u274e\\u2753-\\u2755\\u2795-\\u2797\\u27b0\\u27bf\\ue50a])|\\ufe0f/g,UFE0Fg=/\\uFE0F/g,U200D=String.fromCharCode(8205),rescaper=/[&<>'\"]/g,shouldntBeParsed=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,fromCharCode=String.fromCharCode;return twemoji;function createText(text,clean){return document.createTextNode(clean?text.replace(UFE0Fg,\"\"):text)}function escapeHTML(s){return s.replace(rescaper,replacer)}function defaultImageSrcGenerator(icon,options){return\"\".concat(options.base,options.size,\"/\",icon,options.ext)}function grabAllTextNodes(node,allText){var childNodes=node.childNodes,length=childNodes.length,subnode,nodeType;while(length--){subnode=childNodes[length];nodeType=subnode.nodeType;if(nodeType===3){allText.push(subnode)}else if(nodeType===1&&!(\"ownerSVGElement\"in subnode)&&!shouldntBeParsed.test(subnode.nodeName.toLowerCase())){grabAllTextNodes(subnode,allText)}}return allText}function grabTheRightIcon(rawText){return toCodePoint(rawText.indexOf(U200D)<0?rawText.replace(UFE0Fg,\"\"):rawText)}function parseNode(node,options){var allText=grabAllTextNodes(node,[]),length=allText.length,attrib,attrname,modified,fragment,subnode,text,match,i,index,img,rawText,iconId,src;while(length--){modified=false;fragment=document.createDocumentFragment();subnode=allText[length];text=subnode.nodeValue;i=0;while(match=re.exec(text)){index=match.index;if(index!==i){fragment.appendChild(createText(text.slice(i,index),true))}rawText=match[0];iconId=grabTheRightIcon(rawText);i=index+rawText.length;src=options.callback(iconId,options);if(iconId&&src){img=new Image;img.onerror=options.onerror;img.setAttribute(\"draggable\",\"false\");attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf(\"on\")!==0&&!img.hasAttribute(attrname)){img.setAttribute(attrname,attrib[attrname])}}img.className=options.className;img.alt=rawText;img.src=src;modified=true;fragment.appendChild(img)}if(!img)fragment.appendChild(createText(rawText,false));img=null}if(modified){if(i\")}return ret})}function replacer(m){return escaper[m]}function returnNull(){return null}function toSizeSquaredAsset(value){return typeof value===\"number\"?value+\"x\"+value:value}function fromCodePoint(codepoint){var code=typeof codepoint===\"string\"?parseInt(codepoint,16):codepoint;if(code<65536){return fromCharCode(code)}code-=65536;return fromCharCode(55296+(code>>10),56320+(code&1023))}function parse(what,how){if(!how||typeof how===\"function\"){how={callback:how}}return(typeof what===\"string\"?parseString:parseNode)(what,{callback:how.callback||defaultImageSrcGenerator,attributes:typeof how.attributes===\"function\"?how.attributes:returnNull,base:typeof how.base===\"string\"?how.base:twemoji.base,ext:how.ext||twemoji.ext,size:how.folder||toSizeSquaredAsset(how.size||twemoji.size),className:how.className||twemoji.className,onerror:how.onerror||twemoji.onerror})}function replace(text,callback){return String(text).replace(re,callback)}function test(text){re.lastIndex=0;var result=re.test(text);re.lastIndex=0;return result}function toCodePoint(unicodeSurrogates,sep){var r=[],c=0,p=0,i=0;while(i ({\n loading: 'lazy',\n }),\n};\n\n/**\n * Parses an HTML string into a `` node containing the HTML content.\n *\n * Vanilla JS implementation of jQuery's `$.parseHTML()`,\n * sourced from http://youmightnotneedjquery.com/\n */\nfunction parseHTML(str) {\n const tmp = document.implementation.createHTMLDocument();\n tmp.body.innerHTML = str;\n\n return tmp.body;\n}\n\nexport default function renderEmoji() {\n override(Post.prototype, 'contentHtml', function (original) {\n const contentHtml = original();\n\n if (this.oldContentHtml !== contentHtml) {\n // We need to parse the HTML string into a DOM node, then give it to Twemoji.\n //\n // This prevents some issues with the default find-replace that would be performed\n // on a string passed to `Twemoji.parse()`.\n //\n // The parse function can only handle a single DOM node provided, so we need to\n // wrap it in a node. In our `parseHTML` implementation, we wrap it in a ``\n // element. This gets stripped below.\n //\n // See https://github.com/flarum/core/issues/2958\n const emojifiedDom = twemoji.parse(parseHTML(contentHtml), options);\n\n // Steal the HTML string inside the emojified DOM `` tag.\n this.emojifiedContentHtml = emojifiedDom.innerHTML;\n\n this.oldContentHtml = contentHtml;\n }\n\n return this.emojifiedContentHtml;\n });\n\n override(s9e.TextFormatter, 'preview', (original, text, element) => {\n original(text, element);\n\n twemoji.parse(element, options);\n });\n}\n","import app from 'flarum/forum/app';\n\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport renderEmoji from './renderEmoji';\n\napp.initializers.add('flarum-emoji', () => {\n // After typing ':' in the composer, show a dropdown suggesting a bunch of\n // emoji that the user could use.\n addComposerAutocomplete();\n\n // render emoji as image in Posts content and title.\n renderEmoji();\n});\n","import emojiMap from 'simple-emoji-map';\n\nimport { extend } from 'flarum/common/extend';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport TextEditorButton from 'flarum/common/components/TextEditorButton';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\n\nimport AutocompleteDropdown from './fragments/AutocompleteDropdown';\nimport getEmojiIconCode from './helpers/getEmojiIconCode';\nimport cdn from './cdn';\n\nexport default function addComposerAutocomplete() {\n const emojiKeys = Object.keys(emojiMap);\n const $container = $('
');\n const dropdown = new AutocompleteDropdown();\n\n extend(TextEditor.prototype, 'oncreate', function () {\n const $editor = this.$('.TextEditor-editor').wrap('
');\n\n this.navigator = new KeyboardNavigatable();\n this.navigator\n .when(() => dropdown.active)\n .onUp(() => dropdown.navigate(-1))\n .onDown(() => dropdown.navigate(1))\n .onSelect(dropdown.complete.bind(dropdown))\n .onCancel(dropdown.hide.bind(dropdown))\n .bindTo($editor);\n\n $editor.after($container);\n });\n\n extend(TextEditor.prototype, 'buildEditorParams', function (params) {\n let relEmojiStart;\n let absEmojiStart;\n let typed;\n\n const applySuggestion = (replacement) => {\n this.attrs.composer.editor.replaceBeforeCursor(absEmojiStart - 1, replacement + ' ');\n\n dropdown.hide();\n };\n\n params.inputListeners.push(() => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n\n const cursor = selection[0];\n\n if (selection[1] - cursor > 0) return;\n\n // Search backwards from the cursor for an ':' symbol. If we find\n // one and followed by a whitespace, we will want to show the\n // autocomplete dropdown!\n const lastChunk = this.attrs.composer.editor.getLastNChars(15);\n absEmojiStart = 0;\n for (let i = lastChunk.length - 1; i >= 0; i--) {\n const character = lastChunk.substr(i, 1);\n // check what user typed, emoji names only contains alphanumeric,\n // underline, '+' and '-'\n if (!/[a-z0-9]|\\+|\\-|_|\\:/.test(character)) break;\n // make sure ':' preceded by a whitespace or newline\n if (character === ':' && (i == 0 || /\\s/.test(lastChunk.substr(i - 1, 1)))) {\n relEmojiStart = i + 1;\n absEmojiStart = cursor - lastChunk.length + i + 1;\n break;\n }\n }\n\n dropdown.hide();\n dropdown.active = false;\n\n if (absEmojiStart) {\n typed = lastChunk.substring(relEmojiStart).toLowerCase();\n\n const makeSuggestion = function ({ emoji, name, code }) {\n return (\n applySuggestion(emoji)}\n onmouseenter={function () {\n dropdown.setIndex($(this).parent().index() - 1);\n }}\n >\n {emoji}\n {name}\n \n );\n };\n\n const buildSuggestions = () => {\n const similarEmoji = [];\n\n // Build a regular expression to do a fuzzy match of the given input string\n const fuzzyRegexp = function (str) {\n const reEscape = new RegExp('\\\\(([' + '+.*?[]{}()^$|\\\\'.replace(/(.)/g, '\\\\$1') + '])\\\\)', 'g');\n return new RegExp('(.*)' + str.toLowerCase().replace(/(.)/g, '($1)(.*?)').replace(reEscape, '(\\\\$1)') + '$', 'i');\n };\n const regTyped = fuzzyRegexp(typed);\n\n let maxSuggestions = 7;\n\n const findMatchingEmojis = (matcher) => {\n for (let i = 0; i < emojiKeys.length && maxSuggestions > 0; i++) {\n const curEmoji = emojiKeys[i];\n\n if (similarEmoji.indexOf(curEmoji) === -1) {\n const names = emojiMap[curEmoji];\n for (let name of names) {\n if (matcher(name)) {\n --maxSuggestions;\n similarEmoji.push(curEmoji);\n break;\n }\n }\n }\n }\n };\n\n // First, try to find all emojis starting with the given string\n findMatchingEmojis((emoji) => emoji.indexOf(typed) === 0);\n\n // If there are still suggestions left, try for some fuzzy matches\n findMatchingEmojis((emoji) => regTyped.test(emoji));\n\n const suggestions = similarEmoji\n .map((emoji) => ({\n emoji,\n name: emojiMap[emoji][0],\n code: getEmojiIconCode(emoji),\n }))\n .map(makeSuggestion);\n\n if (suggestions.length) {\n dropdown.items = suggestions;\n m.render($container[0], dropdown.render());\n\n dropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(absEmojiStart);\n const width = dropdown.$().outerWidth();\n const height = dropdown.$().outerHeight();\n const parent = dropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n\n dropdown.show(left, top);\n }\n };\n\n buildSuggestions();\n\n dropdown.setIndex(0);\n dropdown.$().scrollTop(0);\n dropdown.active = true;\n }\n });\n });\n\n extend(TextEditor.prototype, 'toolbarItems', function (items) {\n items.add(\n 'emoji',\n this.attrs.composer.editor.insertAtCursor(' :')} icon=\"far fa-smile\">\n {app.translator.trans('flarum-emoji.forum.composer.emoji_tooltip')}\n \n );\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","AutocompleteDropdown","subClass","superClass","items","active","index","keyWasJustPressed","create","constructor","view","className","app","translator","trans","this","map","item","attrs","show","left","top","$","css","hide","navigate","delta","setIndex","clearTimeout","keyWasJustPressedTimeout","setTimeout","complete","eq","find","click","scrollToItem","$dropdown","$items","rangedIndex","length","$item","removeClass","addClass","scrollTop","dropdownScroll","dropdownTop","offset","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","stop","animate","Fragment","twemoji","base","ext","size","convert","fromCodePoint","codepoint","code","fromCharCode","toCodePoint","onerror","parentNode","replaceChild","createText","alt","parse","what","how","callback","parseString","parseNode","defaultImageSrcGenerator","attributes","returnNull","folder","replace","test","text","re","lastIndex","result","escaper","UFE0Fg","U200D","String","rescaper","shouldntBeParsed","clean","document","createTextNode","icon","options","concat","grabAllTextNodes","node","allText","subnode","nodeType","childNodes","push","nodeName","toLowerCase","grabTheRightIcon","rawText","indexOf","attrib","attrname","modified","fragment","match","i","img","iconId","src","createDocumentFragment","nodeValue","exec","appendChild","slice","Image","setAttribute","hasAttribute","str","ret","replacer","m","unicodeSurrogates","sep","r","c","charCodeAt","toString","join","getEmojiIconCode","emoji","loading","emojiKeys","$container","dropdown","keys","emojiMap","extend","TextEditor","$editor","wrap","navigator","KeyboardNavigatable","when","onUp","onDown","onSelect","onCancel","bindTo","after","params","relEmojiStart","absEmojiStart","typed","inputListeners","selection","composer","editor","getSelectionRange","cursor","lastChunk","getLastNChars","character","substr","substring","makeSuggestion","name","onclick","replacement","replaceBeforeCursor","onmouseenter","parent","class","draggable","cdn","reEscape","similarEmoji","regTyped","RegExp","maxSuggestions","findMatchingEmojis","matcher","curEmoji","suggestions","render","coordinates","getCaretCoordinates","width","outerWidth","height","offsetParent","Math","max","buildSuggestions","add","insertAtCursor","override","Post","original","tmp","contentHtml","oldContentHtml","emojifiedDom","implementation","createHTMLDocument","body","innerHTML","emojifiedContentHtml","s9e","TextFormatter","element"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa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,EAAMkL,KAAKC,MAAMpB,EAAOtI,SAASzB,IAAMC,EAAEuE,UAAUlD,aAActB,GACjED,EAAOmL,KAAKC,KAAKpB,EAAOtI,SAAS1B,KAAMA,GAEvC2H,EAAS5H,KAAKC,EAAMC,EACtB,CACF,CAEAoL,GAEA1D,EAASpH,SAAS,GAClBoH,EAASzH,IAAIqB,UAAU,GACvBoG,EAAS1I,QAAS,CACpB,CArHqC,CAsHvC,GACF,KAEA6I,EAAAA,EAAAA,QAAOC,IAAAA,UAAsB,gBAAgB,SAAU/I,GAAO,WAC5DA,EAAMsM,IACJ,QACA,EAAC,IAAgB,CAAC1B,QAAS,kBAAM,EAAK9J,MAAMmJ,SAASC,OAAOqC,eAAe,KAAK,EAAE5G,KAAK,gBACpFnF,IAAIC,WAAWC,MAAM,8CAG5B,KFnJA8L,EAAAA,EAAAA,UAASC,IAAAA,UAAgB,eAAe,SAAUC,GAChD,IATe/E,EACXgF,EAQEC,EAAcF,IAEpB,GAAI/L,KAAKkM,iBAAmBD,EAAa,CAWvC,IAAME,EAAe3J,EAAAA,OAtBRwE,EAsBgCiF,GArB3CD,EAAMlH,SAASsH,eAAeC,sBAChCC,KAAKC,UAAYvF,EAEdgF,EAAIM,MAkBoDrH,GAG3DjF,KAAKwM,qBAAuBL,EAAaI,UAEzCvM,KAAKkM,eAAiBD,CACxB,CAEA,OAAOjM,KAAKwM,oBACd,KAEAX,EAAAA,EAAAA,UAASY,IAAIC,cAAe,WAAW,SAACX,EAAU5H,EAAMwI,GACtDZ,EAAS5H,EAAMwI,GAEfnK,EAAAA,MAAcmK,EAAS1H,EACzB,GC7CF","sources":["webpack://@flarum/emoji/webpack/bootstrap","webpack://@flarum/emoji/webpack/runtime/compat get default export","webpack://@flarum/emoji/webpack/runtime/define property getters","webpack://@flarum/emoji/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/emoji/webpack/runtime/make namespace object","webpack://@flarum/emoji/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/components/TextEditorButton']\"","webpack://@flarum/emoji/external root \"flarum.core.compat['common/utils/KeyboardNavigatable']\"","webpack://@flarum/emoji/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/emoji/external root \"flarum.core.compat['common/Fragment']\"","webpack://@flarum/emoji/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/emoji/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/emoji/../../../node_modules/twemoji/dist/twemoji.esm.js","webpack://@flarum/emoji/./src/forum/helpers/getEmojiIconCode.js","webpack://@flarum/emoji/./src/forum/cdn.js","webpack://@flarum/emoji/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/emoji/./src/forum/renderEmoji.js","webpack://@flarum/emoji/./src/forum/index.js","webpack://@flarum/emoji/./src/forum/addComposerAutocomplete.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditorButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/KeyboardNavigatable'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Fragment'];","import Fragment from 'flarum/common/Fragment';\n\nexport default class AutocompleteDropdown extends Fragment {\n items = [];\n active = false;\n index = 0;\n keyWasJustPressed = false;\n\n view() {\n return (\n
    \n
  • {app.translator.trans('flarum-emoji.forum.composer.type_to_search_text')}
  • \n {this.items.map((item) => (\n
  • {item}
  • \n ))}\n
\n );\n }\n\n show(left, top) {\n this.$()\n .show()\n .css({\n left: left + 'px',\n top: top + 'px',\n });\n this.active = true;\n }\n\n hide() {\n this.$().hide();\n this.active = false;\n }\n\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => (this.keyWasJustPressed = false), 500);\n }\n\n complete() {\n this.$('li:not(.Dropdown-header)').eq(this.index).find('button').click();\n }\n\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n\n const $dropdown = this.$();\n const $items = $dropdown.find('li:not(.Dropdown-header)');\n let rangedIndex = index;\n\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n\n this.index = rangedIndex;\n\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({ scrollTop }, 100);\n }\n }\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\nvar twemoji=function(){\"use strict\";var twemoji={base:\"https://twemoji.maxcdn.com/v/14.0.2/\",ext:\".png\",size:\"72x72\",className:\"emoji\",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){if(this.parentNode){this.parentNode.replaceChild(createText(this.alt,false),this)}},parse:parse,replace:replace,test:test},escaper={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\"'\":\"'\",'\"':\""\"},re=/(?:\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udffe]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\udef1\\ud83c\\udffb\\u200d\\ud83e\\udef2\\ud83c[\\udffc-\\udfff]|\\ud83e\\udef1\\ud83c\\udffc\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\udef1\\ud83c\\udffd\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\udef1\\ud83c\\udffe\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\udef1\\ud83c\\udfff\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1|\\ud83d\\udc6b\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6c\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6d\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc8f\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc91\\ud83c[\\udffb-\\udfff]|\\ud83e\\udd1d\\ud83c[\\udffb-\\udfff]|\\ud83d[\\udc6b-\\udc6d\\udc8f\\udc91]|\\ud83e\\udd1d)|(?:\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1)(?:\\ud83c[\\udffb-\\udfff])?\\u200d(?:\\u2695\\ufe0f|\\u2696\\ufe0f|\\u2708\\ufe0f|\\ud83c[\\udf3e\\udf73\\udf7c\\udf84\\udf93\\udfa4\\udfa8\\udfeb\\udfed]|\\ud83d[\\udcbb\\udcbc\\udd27\\udd2c\\ude80\\ude92]|\\ud83e[\\uddaf-\\uddb3\\uddbc\\uddbd])|(?:\\ud83c[\\udfcb\\udfcc]|\\ud83d[\\udd74\\udd75]|\\u26f9)((?:\\ud83c[\\udffb-\\udfff]|\\ufe0f)\\u200d[\\u2640\\u2642]\\ufe0f)|(?:\\ud83c[\\udfc3\\udfc4\\udfca]|\\ud83d[\\udc6e\\udc70\\udc71\\udc73\\udc77\\udc81\\udc82\\udc86\\udc87\\ude45-\\ude47\\ude4b\\ude4d\\ude4e\\udea3\\udeb4-\\udeb6]|\\ud83e[\\udd26\\udd35\\udd37-\\udd39\\udd3d\\udd3e\\uddb8\\uddb9\\uddcd-\\uddcf\\uddd4\\uddd6-\\udddd])(?:\\ud83c[\\udffb-\\udfff])?\\u200d[\\u2640\\u2642]\\ufe0f|(?:\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83c\\udff3\\ufe0f\\u200d\\u26a7\\ufe0f|\\ud83c\\udff3\\ufe0f\\u200d\\ud83c\\udf08|\\ud83d\\ude36\\u200d\\ud83c\\udf2b\\ufe0f|\\u2764\\ufe0f\\u200d\\ud83d\\udd25|\\u2764\\ufe0f\\u200d\\ud83e\\ude79|\\ud83c\\udff4\\u200d\\u2620\\ufe0f|\\ud83d\\udc15\\u200d\\ud83e\\uddba|\\ud83d\\udc3b\\u200d\\u2744\\ufe0f|\\ud83d\\udc41\\u200d\\ud83d\\udde8|\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc6f\\u200d\\u2640\\ufe0f|\\ud83d\\udc6f\\u200d\\u2642\\ufe0f|\\ud83d\\ude2e\\u200d\\ud83d\\udca8|\\ud83d\\ude35\\u200d\\ud83d\\udcab|\\ud83e\\udd3c\\u200d\\u2640\\ufe0f|\\ud83e\\udd3c\\u200d\\u2642\\ufe0f|\\ud83e\\uddde\\u200d\\u2640\\ufe0f|\\ud83e\\uddde\\u200d\\u2642\\ufe0f|\\ud83e\\udddf\\u200d\\u2640\\ufe0f|\\ud83e\\udddf\\u200d\\u2642\\ufe0f|\\ud83d\\udc08\\u200d\\u2b1b)|[#*0-9]\\ufe0f?\\u20e3|(?:[ยฉยฎ\\u2122\\u265f]\\ufe0f)|(?:\\ud83c[\\udc04\\udd70\\udd71\\udd7e\\udd7f\\ude02\\ude1a\\ude2f\\ude37\\udf21\\udf24-\\udf2c\\udf36\\udf7d\\udf96\\udf97\\udf99-\\udf9b\\udf9e\\udf9f\\udfcd\\udfce\\udfd4-\\udfdf\\udff3\\udff5\\udff7]|\\ud83d[\\udc3f\\udc41\\udcfd\\udd49\\udd4a\\udd6f\\udd70\\udd73\\udd76-\\udd79\\udd87\\udd8a-\\udd8d\\udda5\\udda8\\uddb1\\uddb2\\uddbc\\uddc2-\\uddc4\\uddd1-\\uddd3\\udddc-\\uddde\\udde1\\udde3\\udde8\\uddef\\uddf3\\uddfa\\udecb\\udecd-\\udecf\\udee0-\\udee5\\udee9\\udef0\\udef3]|[\\u203c\\u2049\\u2139\\u2194-\\u2199\\u21a9\\u21aa\\u231a\\u231b\\u2328\\u23cf\\u23ed-\\u23ef\\u23f1\\u23f2\\u23f8-\\u23fa\\u24c2\\u25aa\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u2600-\\u2604\\u260e\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262a\\u262e\\u262f\\u2638-\\u263a\\u2640\\u2642\\u2648-\\u2653\\u2660\\u2663\\u2665\\u2666\\u2668\\u267b\\u267f\\u2692-\\u2697\\u2699\\u269b\\u269c\\u26a0\\u26a1\\u26a7\\u26aa\\u26ab\\u26b0\\u26b1\\u26bd\\u26be\\u26c4\\u26c5\\u26c8\\u26cf\\u26d1\\u26d3\\u26d4\\u26e9\\u26ea\\u26f0-\\u26f5\\u26f8\\u26fa\\u26fd\\u2702\\u2708\\u2709\\u270f\\u2712\\u2714\\u2716\\u271d\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u2764\\u27a1\\u2934\\u2935\\u2b05-\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u3030\\u303d\\u3297\\u3299])(?:\\ufe0f|(?!\\ufe0e))|(?:(?:\\ud83c[\\udfcb\\udfcc]|\\ud83d[\\udd74\\udd75\\udd90]|[\\u261d\\u26f7\\u26f9\\u270c\\u270d])(?:\\ufe0f|(?!\\ufe0e))|(?:\\ud83c[\\udf85\\udfc2-\\udfc4\\udfc7\\udfca]|\\ud83d[\\udc42\\udc43\\udc46-\\udc50\\udc66-\\udc69\\udc6e\\udc70-\\udc78\\udc7c\\udc81-\\udc83\\udc85-\\udc87\\udcaa\\udd7a\\udd95\\udd96\\ude45-\\ude47\\ude4b-\\ude4f\\udea3\\udeb4-\\udeb6\\udec0\\udecc]|\\ud83e[\\udd0c\\udd0f\\udd18-\\udd1c\\udd1e\\udd1f\\udd26\\udd30-\\udd39\\udd3d\\udd3e\\udd77\\uddb5\\uddb6\\uddb8\\uddb9\\uddbb\\uddcd-\\uddcf\\uddd1-\\udddd\\udec3-\\udec5\\udef0-\\udef6]|[\\u270a\\u270b]))(?:\\ud83c[\\udffb-\\udfff])?|(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc65\\udb40\\udc6e\\udb40\\udc67\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc73\\udb40\\udc63\\udb40\\udc74\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc77\\udb40\\udc6c\\udb40\\udc73\\udb40\\udc7f|\\ud83c\\udde6\\ud83c[\\udde8-\\uddec\\uddee\\uddf1\\uddf2\\uddf4\\uddf6-\\uddfa\\uddfc\\uddfd\\uddff]|\\ud83c\\udde7\\ud83c[\\udde6\\udde7\\udde9-\\uddef\\uddf1-\\uddf4\\uddf6-\\uddf9\\uddfb\\uddfc\\uddfe\\uddff]|\\ud83c\\udde8\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\uddee\\uddf0-\\uddf5\\uddf7\\uddfa-\\uddff]|\\ud83c\\udde9\\ud83c[\\uddea\\uddec\\uddef\\uddf0\\uddf2\\uddf4\\uddff]|\\ud83c\\uddea\\ud83c[\\udde6\\udde8\\uddea\\uddec\\udded\\uddf7-\\uddfa]|\\ud83c\\uddeb\\ud83c[\\uddee-\\uddf0\\uddf2\\uddf4\\uddf7]|\\ud83c\\uddec\\ud83c[\\udde6\\udde7\\udde9-\\uddee\\uddf1-\\uddf3\\uddf5-\\uddfa\\uddfc\\uddfe]|\\ud83c\\udded\\ud83c[\\uddf0\\uddf2\\uddf3\\uddf7\\uddf9\\uddfa]|\\ud83c\\uddee\\ud83c[\\udde8-\\uddea\\uddf1-\\uddf4\\uddf6-\\uddf9]|\\ud83c\\uddef\\ud83c[\\uddea\\uddf2\\uddf4\\uddf5]|\\ud83c\\uddf0\\ud83c[\\uddea\\uddec-\\uddee\\uddf2\\uddf3\\uddf5\\uddf7\\uddfc\\uddfe\\uddff]|\\ud83c\\uddf1\\ud83c[\\udde6-\\udde8\\uddee\\uddf0\\uddf7-\\uddfb\\uddfe]|\\ud83c\\uddf2\\ud83c[\\udde6\\udde8-\\udded\\uddf0-\\uddff]|\\ud83c\\uddf3\\ud83c[\\udde6\\udde8\\uddea-\\uddec\\uddee\\uddf1\\uddf4\\uddf5\\uddf7\\uddfa\\uddff]|\\ud83c\\uddf4\\ud83c\\uddf2|\\ud83c\\uddf5\\ud83c[\\udde6\\uddea-\\udded\\uddf0-\\uddf3\\uddf7-\\uddf9\\uddfc\\uddfe]|\\ud83c\\uddf6\\ud83c\\udde6|\\ud83c\\uddf7\\ud83c[\\uddea\\uddf4\\uddf8\\uddfa\\uddfc]|\\ud83c\\uddf8\\ud83c[\\udde6-\\uddea\\uddec-\\uddf4\\uddf7-\\uddf9\\uddfb\\uddfd-\\uddff]|\\ud83c\\uddf9\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\udded\\uddef-\\uddf4\\uddf7\\uddf9\\uddfb\\uddfc\\uddff]|\\ud83c\\uddfa\\ud83c[\\udde6\\uddec\\uddf2\\uddf3\\uddf8\\uddfe\\uddff]|\\ud83c\\uddfb\\ud83c[\\udde6\\udde8\\uddea\\uddec\\uddee\\uddf3\\uddfa]|\\ud83c\\uddfc\\ud83c[\\uddeb\\uddf8]|\\ud83c\\uddfd\\ud83c\\uddf0|\\ud83c\\uddfe\\ud83c[\\uddea\\uddf9]|\\ud83c\\uddff\\ud83c[\\udde6\\uddf2\\uddfc]|\\ud83c[\\udccf\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01\\ude32-\\ude36\\ude38-\\ude3a\\ude50\\ude51\\udf00-\\udf20\\udf2d-\\udf35\\udf37-\\udf7c\\udf7e-\\udf84\\udf86-\\udf93\\udfa0-\\udfc1\\udfc5\\udfc6\\udfc8\\udfc9\\udfcf-\\udfd3\\udfe0-\\udff0\\udff4\\udff8-\\udfff]|\\ud83d[\\udc00-\\udc3e\\udc40\\udc44\\udc45\\udc51-\\udc65\\udc6a\\udc6f\\udc79-\\udc7b\\udc7d-\\udc80\\udc84\\udc88-\\udc8e\\udc90\\udc92-\\udca9\\udcab-\\udcfc\\udcff-\\udd3d\\udd4b-\\udd4e\\udd50-\\udd67\\udda4\\uddfb-\\ude44\\ude48-\\ude4a\\ude80-\\udea2\\udea4-\\udeb3\\udeb7-\\udebf\\udec1-\\udec5\\uded0-\\uded2\\uded5-\\uded7\\udedd-\\udedf\\udeeb\\udeec\\udef4-\\udefc\\udfe0-\\udfeb\\udff0]|\\ud83e[\\udd0d\\udd0e\\udd10-\\udd17\\udd20-\\udd25\\udd27-\\udd2f\\udd3a\\udd3c\\udd3f-\\udd45\\udd47-\\udd76\\udd78-\\uddb4\\uddb7\\uddba\\uddbc-\\uddcc\\uddd0\\uddde-\\uddff\\ude70-\\ude74\\ude78-\\ude7c\\ude80-\\ude86\\ude90-\\udeac\\udeb0-\\udeba\\udec0-\\udec2\\uded0-\\uded9\\udee0-\\udee7]|[\\u23e9-\\u23ec\\u23f0\\u23f3\\u267e\\u26ce\\u2705\\u2728\\u274c\\u274e\\u2753-\\u2755\\u2795-\\u2797\\u27b0\\u27bf\\ue50a])|\\ufe0f/g,UFE0Fg=/\\uFE0F/g,U200D=String.fromCharCode(8205),rescaper=/[&<>'\"]/g,shouldntBeParsed=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,fromCharCode=String.fromCharCode;return twemoji;function createText(text,clean){return document.createTextNode(clean?text.replace(UFE0Fg,\"\"):text)}function escapeHTML(s){return s.replace(rescaper,replacer)}function defaultImageSrcGenerator(icon,options){return\"\".concat(options.base,options.size,\"/\",icon,options.ext)}function grabAllTextNodes(node,allText){var childNodes=node.childNodes,length=childNodes.length,subnode,nodeType;while(length--){subnode=childNodes[length];nodeType=subnode.nodeType;if(nodeType===3){allText.push(subnode)}else if(nodeType===1&&!(\"ownerSVGElement\"in subnode)&&!shouldntBeParsed.test(subnode.nodeName.toLowerCase())){grabAllTextNodes(subnode,allText)}}return allText}function grabTheRightIcon(rawText){return toCodePoint(rawText.indexOf(U200D)<0?rawText.replace(UFE0Fg,\"\"):rawText)}function parseNode(node,options){var allText=grabAllTextNodes(node,[]),length=allText.length,attrib,attrname,modified,fragment,subnode,text,match,i,index,img,rawText,iconId,src;while(length--){modified=false;fragment=document.createDocumentFragment();subnode=allText[length];text=subnode.nodeValue;i=0;while(match=re.exec(text)){index=match.index;if(index!==i){fragment.appendChild(createText(text.slice(i,index),true))}rawText=match[0];iconId=grabTheRightIcon(rawText);i=index+rawText.length;src=options.callback(iconId,options);if(iconId&&src){img=new Image;img.onerror=options.onerror;img.setAttribute(\"draggable\",\"false\");attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf(\"on\")!==0&&!img.hasAttribute(attrname)){img.setAttribute(attrname,attrib[attrname])}}img.className=options.className;img.alt=rawText;img.src=src;modified=true;fragment.appendChild(img)}if(!img)fragment.appendChild(createText(rawText,false));img=null}if(modified){if(i\")}return ret})}function replacer(m){return escaper[m]}function returnNull(){return null}function toSizeSquaredAsset(value){return typeof value===\"number\"?value+\"x\"+value:value}function fromCodePoint(codepoint){var code=typeof codepoint===\"string\"?parseInt(codepoint,16):codepoint;if(code<65536){return fromCharCode(code)}code-=65536;return fromCharCode(55296+(code>>10),56320+(code&1023))}function parse(what,how){if(!how||typeof how===\"function\"){how={callback:how}}return(typeof what===\"string\"?parseString:parseNode)(what,{callback:how.callback||defaultImageSrcGenerator,attributes:typeof how.attributes===\"function\"?how.attributes:returnNull,base:typeof how.base===\"string\"?how.base:twemoji.base,ext:how.ext||twemoji.ext,size:how.folder||toSizeSquaredAsset(how.size||twemoji.size),className:how.className||twemoji.className,onerror:how.onerror||twemoji.onerror})}function replace(text,callback){return String(text).replace(re,callback)}function test(text){re.lastIndex=0;var result=re.test(text);re.lastIndex=0;return result}function toCodePoint(unicodeSurrogates,sep){var r=[],c=0,p=0,i=0;while(i ({\n loading: 'lazy',\n }),\n};\n\n/**\n * Parses an HTML string into a `` node containing the HTML content.\n *\n * Vanilla JS implementation of jQuery's `$.parseHTML()`,\n * sourced from http://youmightnotneedjquery.com/\n */\nfunction parseHTML(str) {\n const tmp = document.implementation.createHTMLDocument();\n tmp.body.innerHTML = str;\n\n return tmp.body;\n}\n\nexport default function renderEmoji() {\n override(Post.prototype, 'contentHtml', function (original) {\n const contentHtml = original();\n\n if (this.oldContentHtml !== contentHtml) {\n // We need to parse the HTML string into a DOM node, then give it to Twemoji.\n //\n // This prevents some issues with the default find-replace that would be performed\n // on a string passed to `Twemoji.parse()`.\n //\n // The parse function can only handle a single DOM node provided, so we need to\n // wrap it in a node. In our `parseHTML` implementation, we wrap it in a ``\n // element. This gets stripped below.\n //\n // See https://github.com/flarum/core/issues/2958\n const emojifiedDom = twemoji.parse(parseHTML(contentHtml), options);\n\n // Steal the HTML string inside the emojified DOM `` tag.\n this.emojifiedContentHtml = emojifiedDom.innerHTML;\n\n this.oldContentHtml = contentHtml;\n }\n\n return this.emojifiedContentHtml;\n });\n\n override(s9e.TextFormatter, 'preview', (original, text, element) => {\n original(text, element);\n\n twemoji.parse(element, options);\n });\n}\n","import app from 'flarum/forum/app';\n\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport renderEmoji from './renderEmoji';\n\napp.initializers.add('flarum-emoji', () => {\n // After typing ':' in the composer, show a dropdown suggesting a bunch of\n // emoji that the user could use.\n addComposerAutocomplete();\n\n // render emoji as image in Posts content and title.\n renderEmoji();\n});\n","import emojiMap from 'simple-emoji-map';\n\nimport { extend } from 'flarum/common/extend';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport TextEditorButton from 'flarum/common/components/TextEditorButton';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\n\nimport AutocompleteDropdown from './fragments/AutocompleteDropdown';\nimport getEmojiIconCode from './helpers/getEmojiIconCode';\nimport cdn from './cdn';\n\nexport default function addComposerAutocomplete() {\n const emojiKeys = Object.keys(emojiMap);\n const $container = $('
');\n const dropdown = new AutocompleteDropdown();\n\n extend(TextEditor.prototype, 'oncreate', function () {\n const $editor = this.$('.TextEditor-editor').wrap('
');\n\n this.navigator = new KeyboardNavigatable();\n this.navigator\n .when(() => dropdown.active)\n .onUp(() => dropdown.navigate(-1))\n .onDown(() => dropdown.navigate(1))\n .onSelect(dropdown.complete.bind(dropdown))\n .onCancel(dropdown.hide.bind(dropdown))\n .bindTo($editor);\n\n $editor.after($container);\n });\n\n extend(TextEditor.prototype, 'buildEditorParams', function (params) {\n let relEmojiStart;\n let absEmojiStart;\n let typed;\n\n const applySuggestion = (replacement) => {\n this.attrs.composer.editor.replaceBeforeCursor(absEmojiStart - 1, replacement + ' ');\n\n dropdown.hide();\n };\n\n params.inputListeners.push(() => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n\n const cursor = selection[0];\n\n if (selection[1] - cursor > 0) return;\n\n // Search backwards from the cursor for an ':' symbol. If we find\n // one and followed by a whitespace, we will want to show the\n // autocomplete dropdown!\n const lastChunk = this.attrs.composer.editor.getLastNChars(15);\n absEmojiStart = 0;\n for (let i = lastChunk.length - 1; i >= 0; i--) {\n const character = lastChunk.substr(i, 1);\n // check what user typed, emoji names only contains alphanumeric,\n // underline, '+' and '-'\n if (!/[a-z0-9]|\\+|\\-|_|\\:/.test(character)) break;\n // make sure ':' preceded by a whitespace or newline\n if (character === ':' && (i == 0 || /\\s/.test(lastChunk.substr(i - 1, 1)))) {\n relEmojiStart = i + 1;\n absEmojiStart = cursor - lastChunk.length + i + 1;\n break;\n }\n }\n\n dropdown.hide();\n dropdown.active = false;\n\n if (absEmojiStart) {\n typed = lastChunk.substring(relEmojiStart).toLowerCase();\n\n const makeSuggestion = function ({ emoji, name, code }) {\n return (\n applySuggestion(emoji)}\n onmouseenter={function () {\n dropdown.setIndex($(this).parent().index() - 1);\n }}\n >\n {emoji}\n {name}\n \n );\n };\n\n const buildSuggestions = () => {\n const similarEmoji = [];\n\n // Build a regular expression to do a fuzzy match of the given input string\n const fuzzyRegexp = function (str) {\n const reEscape = new RegExp('\\\\(([' + '+.*?[]{}()^$|\\\\'.replace(/(.)/g, '\\\\$1') + '])\\\\)', 'g');\n return new RegExp('(.*)' + str.toLowerCase().replace(/(.)/g, '($1)(.*?)').replace(reEscape, '(\\\\$1)') + '$', 'i');\n };\n const regTyped = fuzzyRegexp(typed);\n\n let maxSuggestions = 7;\n\n const findMatchingEmojis = (matcher) => {\n for (let i = 0; i < emojiKeys.length && maxSuggestions > 0; i++) {\n const curEmoji = emojiKeys[i];\n\n if (similarEmoji.indexOf(curEmoji) === -1) {\n const names = emojiMap[curEmoji];\n for (let name of names) {\n if (matcher(name)) {\n --maxSuggestions;\n similarEmoji.push(curEmoji);\n break;\n }\n }\n }\n }\n };\n\n // First, try to find all emojis starting with the given string\n findMatchingEmojis((emoji) => emoji.indexOf(typed) === 0);\n\n // If there are still suggestions left, try for some fuzzy matches\n findMatchingEmojis((emoji) => regTyped.test(emoji));\n\n const suggestions = similarEmoji\n .map((emoji) => ({\n emoji,\n name: emojiMap[emoji][0],\n code: getEmojiIconCode(emoji),\n }))\n .map(makeSuggestion);\n\n if (suggestions.length) {\n dropdown.items = suggestions;\n m.render($container[0], dropdown.render());\n\n dropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(absEmojiStart);\n const width = dropdown.$().outerWidth();\n const height = dropdown.$().outerHeight();\n const parent = dropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n\n dropdown.show(left, top);\n }\n };\n\n buildSuggestions();\n\n dropdown.setIndex(0);\n dropdown.$().scrollTop(0);\n dropdown.active = true;\n }\n });\n });\n\n extend(TextEditor.prototype, 'toolbarItems', function (items) {\n items.add(\n 'emoji',\n this.attrs.composer.editor.insertAtCursor(' :')} icon=\"far fa-smile\">\n {app.translator.trans('flarum-emoji.forum.composer.emoji_tooltip')}\n \n );\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","AutocompleteDropdown","subClass","superClass","items","active","index","keyWasJustPressed","create","constructor","view","className","app","translator","trans","this","map","item","attrs","show","left","top","$","css","hide","navigate","delta","setIndex","clearTimeout","keyWasJustPressedTimeout","setTimeout","complete","eq","find","click","scrollToItem","$dropdown","$items","rangedIndex","length","$item","removeClass","addClass","scrollTop","dropdownScroll","dropdownTop","offset","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","stop","animate","Fragment","twemoji","base","ext","size","convert","fromCodePoint","codepoint","code","fromCharCode","toCodePoint","onerror","parentNode","replaceChild","createText","alt","parse","what","how","callback","parseString","parseNode","defaultImageSrcGenerator","attributes","returnNull","folder","replace","test","text","re","lastIndex","result","escaper","UFE0Fg","U200D","String","rescaper","shouldntBeParsed","clean","document","createTextNode","icon","options","concat","grabAllTextNodes","node","allText","subnode","nodeType","childNodes","push","nodeName","toLowerCase","grabTheRightIcon","rawText","indexOf","attrib","attrname","modified","fragment","match","i","img","iconId","src","createDocumentFragment","nodeValue","exec","appendChild","slice","Image","setAttribute","hasAttribute","str","ret","replacer","m","unicodeSurrogates","sep","r","c","charCodeAt","toString","join","getEmojiIconCode","emoji","loading","emojiKeys","$container","dropdown","keys","emojiMap","extend","TextEditor","$editor","wrap","navigator","KeyboardNavigatable","when","onUp","onDown","onSelect","onCancel","bindTo","after","params","relEmojiStart","absEmojiStart","typed","inputListeners","selection","composer","editor","getSelectionRange","cursor","lastChunk","getLastNChars","character","substr","substring","makeSuggestion","name","onclick","replacement","replaceBeforeCursor","onmouseenter","parent","draggable","cdn","reEscape","similarEmoji","regTyped","RegExp","maxSuggestions","findMatchingEmojis","matcher","curEmoji","suggestions","render","coordinates","getCaretCoordinates","width","outerWidth","height","offsetParent","Math","max","buildSuggestions","add","insertAtCursor","override","Post","original","tmp","contentHtml","oldContentHtml","emojifiedDom","implementation","createHTMLDocument","body","innerHTML","emojifiedContentHtml","s9e","TextFormatter","element"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts b/extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts index 87af955e12..15f614f791 100644 --- a/extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts +++ b/extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts @@ -1,7 +1,7 @@ -export default class FlagsDropdown { +export default class FlagsDropdown extends NotificationsDropdown { static initAttrs(attrs: any): void; - getMenu(): JSX.Element; - goToRoute(): void; + constructor(); getUnreadCount(): any; getNewCount(): unknown; } +import NotificationsDropdown from "flarum/forum/components/NotificationsDropdown"; diff --git a/extensions/flags/js/dist/forum.js b/extensions/flags/js/dist/forum.js index bc6185f7a8..d87dc8ccbd 100644 --- a/extensions/flags/js/dist/forum.js +++ b/extensions/flags/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:a=>{var o=a&&a.__esModule?()=>a.default:()=>a;return t.d(o,{a:o}),o},d:(a,o)=>{for(var s in o)t.o(o,s)&&!t.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})},o:(t,a)=>Object.prototype.hasOwnProperty.call(t,a),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},a={};(()=>{"use strict";t.r(a),t.d(a,{extend:()=>et});const o=flarum.core.compat["forum/app"];var s=t.n(o),e=function(){function t(t){this.app=t,this.loading=!1}return t.prototype.load=function(){var t=this;this.cache&&!this.app.session.user.attribute("newFlagCount")||(this.loading=!0,m.redraw(),this.app.store.find("flags").then((function(a){t.app.session.user.pushAttributes({newFlagCount:0}),t.cache=a.sort((function(t,a){return a.createdAt()-t.createdAt()}))})).catch((function(){})).then((function(){t.loading=!1,m.redraw()})))},t}();const n=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/utils/PostControls"];var l=t.n(r);const i=flarum.core.compat["common/components/Button"];var c=t.n(i);function u(t,a){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},u(t,a)}function f(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,u(t,a)}const p=flarum.core.compat["common/components/Modal"];var d=t.n(p);const g=flarum.core.compat["common/utils/Stream"];var h=t.n(g);const v=flarum.core.compat["common/utils/withAttr"];var _=t.n(v);const b=flarum.core.compat["common/utils/ItemList"];var y=t.n(b),N=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=h()(""),this.reasonDetail=h()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return s().translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},s().translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},s().translator.trans("flarum-flags.forum.flag_post.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,this.flagReasons().toArray())),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},s().translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.flagReasons=function(){var t=new(y()),a=s().forum.attribute("guidelinesUrl");return t.add("off-topic",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)}):""),70),t.add("inappropriate",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:a?m("a",{href:a,target:"_blank"}):void 0}),"inappropriate"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)}):""),60),t.add("spam",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)}):""),50),t.add("other",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()?m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)}):""),10),t},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,s().store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:s().session.user,post:this.attrs.post}},{errorHandler:this.onerror.bind(this)}).then((function(){return a.success=!0})).catch((function(){})).then(this.loaded.bind(this))},a}(d());function F(){(0,n.extend)(l(),"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(c(),{icon:"fas fa-flag",onclick:function(){return s().modal.show(N,{post:a})}},s().translator.trans("flarum-flags.forum.post_controls.flag_button")))}))}const x=flarum.core.compat["forum/components/HeaderSecondary"];var k=t.n(x);const w=flarum.core.compat["components/NotificationsDropdown"];var P=t.n(w);const C=flarum.core.compat["common/Component"];var D=t.n(C);const A=flarum.core.compat["common/components/Link"];var O=t.n(A);const M=flarum.core.compat["common/components/LoadingIndicator"];var L=t.n(M);const B=flarum.core.compat["common/helpers/avatar"];var j=t.n(B);const T=flarum.core.compat["common/helpers/username"];var S=t.n(T);const R=flarum.core.compat["common/helpers/icon"];var E=t.n(R);const I=flarum.core.compat["common/helpers/humanTime"];var H=t.n(I),U=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.state=this.attrs.state},o.view=function(){var t=this.state.cache||[];return m("div",{className:"NotificationList FlagList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},s().translator.trans("flarum-flags.forum.flagged_posts.title"))),m("div",{className:"NotificationList-content"},m("ul",{className:"NotificationGroup-content"},t.length?t.map((function(t){var a=t.post();return m("li",null,m(O(),{href:s().route.post(a),className:"Notification Flag",onclick:function(t){s().flags.index=a,t.redraw=!1}},j()(a.user()),E()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},s().translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:S()(a.user()),em:m("em",null),discussion:a.discussion().title()})),H()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?L().component({className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},s().translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(D()),G=function(t){function a(){return t.apply(this,arguments)||this}f(a,t),a.initAttrs=function(a){a.label=a.label||s().translator.trans("flarum-flags.forum.flagged_posts.tooltip"),a.icon=a.icon||"fas fa-flag",t.initAttrs.call(this,a)};var o=a.prototype;return o.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing?U.component({state:this.attrs.state}):"")},o.goToRoute=function(){m.route.set(s().route("flags"))},o.getUnreadCount=function(){return s().flags.cache?s().flags.cache.length:s().forum.attribute("flagCount")},o.getNewCount=function(){return s().session.user.attribute("newFlagCount")},a}(P());function q(){(0,n.extend)(k().prototype,"items",(function(t){s().forum.attribute("canViewFlags")&&t.add("flags",m(G,{state:s().flags}),15)}))}const z=flarum.core.compat["forum/components/Post"];var V=t.n(z);const J=flarum.core.compat["common/utils/humanTime"];var K=t.n(J);function Q(){(0,n.extend)(V().prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),V().prototype.dismissFlag=function(t){var a=this.attrs.post;return delete a.data.relationships.flags,this.subtree.invalidate(),s().flags.cache&&s().flags.cache.some((function(t,o){if(t.post()===a){if(s().flags.cache.splice(o,1),s().flags.index===a){var e=s().flags.cache[o];if(e||(e=s().flags.cache[0]),e){var n=e.post();s().flags.index=n,m.route.set(s().route.post(n))}}return!0}})),s().request({url:s().forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},V().prototype.flagActionItems=function(){var t=this,a=new(y()),o=l().destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var s=o.get(a).attrs;s.className="Button",(0,n.extend)(s,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(c(),{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},s().translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},(0,n.extend)(V().prototype,"content",(function(t){var a=this,o=this.attrs.post,s=o.flags();s.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},s.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),V().prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?s().translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),n=K()(t.createdAt());return[s().translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:n,user:a,reason:o}),e?m("span",{className:"Post-flagged-detail"},e):""]}}}const W=flarum.core.compat["common/extenders"];var X=t.n(W);const Y=flarum.core.compat["common/models/Post"];var Z=t.n(Y);const $=flarum.core.compat["components/Page"];var tt=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),s().history.push("flags"),s().flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(U,{state:s().flags}))},a}(t.n($)());const at=flarum.core.compat["common/Model"];var ot=t.n(at),st=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.type=function(){return ot().attribute("type").call(this)},o.reason=function(){return ot().attribute("reason").call(this)},o.reasonDetail=function(){return ot().attribute("reasonDetail").call(this)},o.createdAt=function(){return ot().attribute("createdAt",ot().transformDate).call(this)},o.post=function(){return ot().hasOne("post").call(this)},o.user=function(){return ot().hasOne("user").call(this)},a}(ot());const et=[(new(X().Routes)).add("flags","/flags",tt),(new(X().Store)).add("flags",st),new(X().Model)(Z()).hasMany("flags").attribute("canFlag")],nt={"flags/addFlagsToPosts":Q,"flags/addFlagControl":F,"flags/addFlagsDropdown":q,"flags/models/Flag":st,"flags/components/FlagList":U,"flags/components/FlagPostModal":N,"flags/components/FlagsPage":tt,"flags/components/FlagsDropdown":G},rt=flarum.core;s().initializers.add("flarum-flags",(function(){s().flags=new e(s()),F(),q(),Q()})),Object.assign(rt.compat,nt)})(),module.exports=a})(); +(()=>{var t={n:a=>{var o=a&&a.__esModule?()=>a.default:()=>a;return t.d(o,{a:o}),o},d:(a,o)=>{for(var s in o)t.o(o,s)&&!t.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})},o:(t,a)=>Object.prototype.hasOwnProperty.call(t,a),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},a={};(()=>{"use strict";t.r(a),t.d(a,{extend:()=>et});const o=flarum.core.compat["forum/app"];var s=t.n(o),e=function(){function t(t){this.app=t,this.loading=!1}return t.prototype.load=function(){var t=this;this.cache&&!this.app.session.user.attribute("newFlagCount")||(this.loading=!0,m.redraw(),this.app.store.find("flags").then((function(a){t.app.session.user.pushAttributes({newFlagCount:0}),t.cache=a.sort((function(t,a){return a.createdAt()-t.createdAt()}))})).catch((function(){})).then((function(){t.loading=!1,m.redraw()})))},t}();const n=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/utils/PostControls"];var l=t.n(r);const i=flarum.core.compat["common/components/Button"];var c=t.n(i);function u(t,a){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},u(t,a)}function f(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,u(t,a)}const p=flarum.core.compat["common/components/Modal"];var d=t.n(p);const g=flarum.core.compat["common/utils/Stream"];var h=t.n(g);const v=flarum.core.compat["common/utils/withAttr"];var _=t.n(v);const b=flarum.core.compat["common/utils/ItemList"];var y=t.n(b),N=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=h()(""),this.reasonDetail=h()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return s().translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},s().translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},s().translator.trans("flarum-flags.forum.flag_post.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,this.flagReasons().toArray())),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},s().translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.flagReasons=function(){var t=new(y()),a=s().forum.attribute("guidelinesUrl");return t.add("off-topic",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),70),t.add("inappropriate",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:a?m("a",{href:a,target:"_blank"}):void 0}),"inappropriate"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),60),t.add("spam",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),50),t.add("other",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()&&m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),10),t},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,s().store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:s().session.user,post:this.attrs.post}},{errorHandler:this.onerror.bind(this)}).then((function(){return a.success=!0})).catch((function(){})).then(this.loaded.bind(this))},a}(d());function F(){(0,n.extend)(l(),"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(c(),{icon:"fas fa-flag",onclick:function(){return s().modal.show(N,{post:a})}},s().translator.trans("flarum-flags.forum.post_controls.flag_button")))}))}const x=flarum.core.compat["forum/components/HeaderSecondary"];var k=t.n(x);const w=flarum.core.compat["forum/components/NotificationsDropdown"];var P=t.n(w);const C=flarum.core.compat["common/Component"];var D=t.n(C);const A=flarum.core.compat["common/components/Link"];var O=t.n(A);const M=flarum.core.compat["common/components/LoadingIndicator"];var L=t.n(M);const B=flarum.core.compat["common/helpers/avatar"];var j=t.n(B);const T=flarum.core.compat["common/helpers/username"];var S=t.n(T);const R=flarum.core.compat["common/helpers/icon"];var E=t.n(R);const I=flarum.core.compat["common/helpers/humanTime"];var H=t.n(I),U=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.state=this.attrs.state},o.view=function(){var t=this.state.cache||[];return m("div",{className:"NotificationList FlagList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},s().translator.trans("flarum-flags.forum.flagged_posts.title"))),m("div",{className:"NotificationList-content"},m("ul",{className:"NotificationGroup-content"},t.length?t.map((function(t){var a=t.post();return m("li",null,m(O(),{href:s().route.post(a),className:"Notification Flag",onclick:function(t){s().flags.index=a,t.redraw=!1}},j()(a.user()),E()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},s().translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:S()(a.user()),em:m("em",null),discussion:a.discussion().title()})),H()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?m(L(),{className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},s().translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(D()),G=function(t){function a(){return t.apply(this,arguments)||this}f(a,t),a.initAttrs=function(a){a.label=a.label||s().translator.trans("flarum-flags.forum.flagged_posts.tooltip"),a.icon=a.icon||"fas fa-flag",t.initAttrs.call(this,a)};var o=a.prototype;return o.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing&&m(U,{state:this.attrs.state}))},o.goToRoute=function(){m.route.set(s().route("flags"))},o.getUnreadCount=function(){return s().flags.cache?s().flags.cache.length:s().forum.attribute("flagCount")},o.getNewCount=function(){return s().session.user.attribute("newFlagCount")},a}(P());function q(){(0,n.extend)(k().prototype,"items",(function(t){s().forum.attribute("canViewFlags")&&t.add("flags",m(G,{state:s().flags}),15)}))}const z=flarum.core.compat["forum/components/Post"];var V=t.n(z);const J=flarum.core.compat["common/utils/humanTime"];var K=t.n(J);function Q(){(0,n.extend)(V().prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),V().prototype.dismissFlag=function(t){var a=this.attrs.post;return delete a.data.relationships.flags,this.subtree.invalidate(),s().flags.cache&&s().flags.cache.some((function(t,o){if(t.post()===a){if(s().flags.cache.splice(o,1),s().flags.index===a){var e=s().flags.cache[o];if(e||(e=s().flags.cache[0]),e){var n=e.post();s().flags.index=n,m.route.set(s().route.post(n))}}return!0}})),s().request({url:s().forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},V().prototype.flagActionItems=function(){var t=this,a=new(y()),o=l().destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var s=o.get(a).attrs;s.className="Button",(0,n.extend)(s,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(c(),{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},s().translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},(0,n.extend)(V().prototype,"content",(function(t){var a=this,o=this.attrs.post,s=o.flags();s.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},s.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),V().prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?s().translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),n=K()(t.createdAt());return[s().translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:n,user:a,reason:o}),!!e&&m("span",{className:"Post-flagged-detail"},e)]}}}const W=flarum.core.compat["common/extenders"];var X=t.n(W);const Y=flarum.core.compat["common/models/Post"];var Z=t.n(Y);const $=flarum.core.compat["components/Page"];var tt=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),s().history.push("flags"),s().flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(U,{state:s().flags}))},a}(t.n($)());const at=flarum.core.compat["common/Model"];var ot=t.n(at),st=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.type=function(){return ot().attribute("type").call(this)},o.reason=function(){return ot().attribute("reason").call(this)},o.reasonDetail=function(){return ot().attribute("reasonDetail").call(this)},o.createdAt=function(){return ot().attribute("createdAt",ot().transformDate).call(this)},o.post=function(){return ot().hasOne("post").call(this)},o.user=function(){return ot().hasOne("user").call(this)},a}(ot());const et=[(new(X().Routes)).add("flags","/flags",tt),(new(X().Store)).add("flags",st),new(X().Model)(Z()).hasMany("flags").attribute("canFlag")],nt={"flags/addFlagsToPosts":Q,"flags/addFlagControl":F,"flags/addFlagsDropdown":q,"flags/models/Flag":st,"flags/components/FlagList":U,"flags/components/FlagPostModal":N,"flags/components/FlagsPage":tt,"flags/components/FlagsDropdown":G},rt=flarum.core;s().initializers.add("flarum-flags",(function(){s().flags=new e(s()),F(),q(),Q()})),Object.assign(rt.compat,nt)})(),module.exports=a})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/flags/js/dist/forum.js.map b/extensions/flags/js/dist/forum.js.map index 6f789c4f70..b0b9e46ea4 100644 --- a/extensions/flags/js/dist/forum.js.map +++ b/extensions/flags/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,sDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAnCC,EAAa,WAChC,WAAYC,GACVC,KAAKD,IAAMA,EAOXC,KAAKC,SAAU,CACjB,CAyBC,OAvBD,YAIAC,KAAA,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vD,EAC7B,iCAAkC7C,EAClC,6BAA8BiG,GAC9B,iCAAkCtC,GCjB9B,GAA+B5F,OAAOC,KCS5CG,IAAAA,aAAAA,IAAqB,gBAAgB,WACnCA,IAAAA,MAAY,IAAID,EAAcC,KAE9BsI,IACAC,IACAF,GACF,IAMArJ,OAAOwJ,OAAO1I,GAAAA,OAAQ2I,G","sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/webpack/runtime/compat get default export","webpack://@flarum/flags/webpack/runtime/define property getters","webpack://@flarum/flags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/flags/webpack/runtime/make namespace object","webpack://@flarum/flags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/flags/./src/forum/states/FlagListState.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/flags/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/withAttr']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/flags/./src/forum/components/FlagPostModal.js","webpack://@flarum/flags/./src/forum/addFlagControl.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/HeaderSecondary']\"","webpack://@flarum/flags/external root \"flarum.core.compat['components/NotificationsDropdown']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/flags/./src/forum/components/FlagList.js","webpack://@flarum/flags/./src/forum/components/FlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsDropdown.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/humanTime']\"","webpack://@flarum/flags/./src/forum/addFlagsToPosts.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['components/Page']\"","webpack://@flarum/flags/./src/forum/components/FlagsPage.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/flags/./src/forum/models/Flag.ts","webpack://@flarum/flags/./src/forum/extend.ts","webpack://@flarum/flags/./src/forum/compat.js","webpack://@flarum/flags/external assign \"flarum.core\"","webpack://@flarum/flags/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","export default class FlagListState {\n constructor(app) {\n this.app = app;\n\n /**\n * Whether or not the flags are loading.\n *\n * @type {Boolean}\n */\n this.loading = false;\n }\n\n /**\n * Load flags into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (this.cache && !this.app.session.user.attribute('newFlagCount')) {\n return;\n }\n\n this.loading = true;\n m.redraw();\n\n this.app.store\n .find('flags')\n .then((flags) => {\n this.app.session.user.pushAttributes({ newFlagCount: 0 });\n this.cache = flags.sort((a, b) => b.createdAt() - a.createdAt());\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\n\nimport Stream from 'flarum/common/utils/Stream';\nimport withAttr from 'flarum/common/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class FlagPostModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.success = false;\n\n this.reason = Stream('');\n this.reasonDetail = Stream('');\n }\n\n className() {\n return 'FlagPostModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-flags.forum.flag_post.title');\n }\n\n content() {\n if (this.success) {\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}

\n
\n \n
\n
\n
\n );\n }\n\n return (\n
\n
\n
\n
{this.flagReasons().toArray()}
\n
\n\n
\n \n
\n
\n
\n );\n }\n\n flagReasons() {\n const items = new ItemList();\n const guidelinesUrl = app.forum.attribute('guidelinesUrl');\n\n items.add(\n 'off-topic',\n ,\n 70\n );\n\n items.add(\n 'inappropriate',\n ,\n 60\n );\n\n items.add(\n 'spam',\n ,\n 50\n );\n\n items.add(\n 'other',\n ,\n 10\n );\n\n return items;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n app.store\n .createRecord('flags')\n .save(\n {\n reason: this.reason() === 'other' ? null : this.reason(),\n reasonDetail: this.reasonDetail(),\n relationships: {\n user: app.session.user,\n post: this.attrs.post,\n },\n },\n { errorHandler: this.onerror.bind(this) }\n )\n .then(() => (this.success = true))\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport Button from 'flarum/common/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\nexport default function () {\n extend(PostControls, 'userControls', function (items, post) {\n if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;\n\n items.add(\n 'flag',\n \n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/HeaderSecondary'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/NotificationsDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nexport default class FlagList extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = this.attrs.state;\n }\n\n view() {\n const flags = this.state.cache || [];\n\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flagged_posts.title')}

\n
\n
\n
    \n {flags.length ? (\n flags.map((flag) => {\n const post = flag.post();\n\n return (\n
  • \n {\n app.flags.index = post;\n e.redraw = false;\n }}\n >\n {avatar(post.user())}\n {icon('fas fa-flag', { className: 'Notification-icon' })}\n \n {app.translator.trans('flarum-flags.forum.flagged_posts.item_text', {\n username: username(post.user()),\n em: ,\n discussion: post.discussion().title(),\n })}\n \n {humanTime(flag.createdAt())}\n
    {post.contentPlain()}
    \n \n
  • \n );\n })\n ) : !this.state.loading ? (\n
    {app.translator.trans('flarum-flags.forum.flagged_posts.empty_text')}
    \n ) : (\n LoadingIndicator.component({ className: 'LoadingIndicator--block' })\n )}\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport NotificationsDropdown from 'flarum/components/NotificationsDropdown';\n\nimport FlagList from './FlagList';\n\nexport default class FlagsDropdown extends NotificationsDropdown {\n static initAttrs(attrs) {\n attrs.label = attrs.label || app.translator.trans('flarum-flags.forum.flagged_posts.tooltip');\n attrs.icon = attrs.icon || 'fas fa-flag';\n\n super.initAttrs(attrs);\n }\n\n getMenu() {\n return (\n
\n {this.showing ? FlagList.component({ state: this.attrs.state }) : ''}\n
\n );\n }\n\n goToRoute() {\n m.route.set(app.route('flags'));\n }\n\n getUnreadCount() {\n return app.flags.cache ? app.flags.cache.length : app.forum.attribute('flagCount');\n }\n\n getNewCount() {\n return app.session.user.attribute('newFlagCount');\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default function () {\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.forum.attribute('canViewFlags')) {\n items.add('flags', , 15);\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/humanTime'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Post from 'flarum/forum/components/Post';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport humanTime from 'flarum/common/utils/humanTime';\n\nexport default function () {\n extend(Post.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.post.flags().length) {\n attrs.className += ' Post--flagged';\n }\n });\n\n Post.prototype.dismissFlag = function (body) {\n const post = this.attrs.post;\n\n delete post.data.relationships.flags;\n\n this.subtree.invalidate();\n\n if (app.flags.cache) {\n app.flags.cache.some((flag, i) => {\n if (flag.post() === post) {\n app.flags.cache.splice(i, 1);\n\n if (app.flags.index === post) {\n let next = app.flags.cache[i];\n\n if (!next) next = app.flags.cache[0];\n\n if (next) {\n const nextPost = next.post();\n app.flags.index = nextPost;\n m.route.set(app.route.post(nextPost));\n }\n }\n\n return true;\n }\n });\n }\n\n return app.request({\n url: app.forum.attribute('apiUrl') + post.apiEndpoint() + '/flags',\n method: 'DELETE',\n body,\n });\n };\n\n Post.prototype.flagActionItems = function () {\n const items = new ItemList();\n\n const controls = PostControls.destructiveControls(this.attrs.post);\n\n Object.keys(controls.items).forEach((k) => {\n const attrs = controls.get(k).attrs;\n\n attrs.className = 'Button';\n\n extend(attrs, 'onclick', () => this.dismissFlag());\n });\n\n items.add('controls',
{controls.toArray()}
);\n\n items.add(\n 'dismiss',\n ,\n -100\n );\n\n return items;\n };\n\n extend(Post.prototype, 'content', function (vdom) {\n const post = this.attrs.post;\n const flags = post.flags();\n\n if (!flags.length) return;\n\n if (post.isHidden()) this.revealContent = true;\n\n vdom.unshift(\n
\n
\n {flags.map((flag) => (\n
{this.flagReason(flag)}
\n ))}\n
\n
{this.flagActionItems().toArray()}
\n
\n );\n });\n\n Post.prototype.flagReason = function (flag) {\n if (flag.type() === 'user') {\n const user = flag.user();\n const reason = flag.reason() ? app.translator.trans(`flarum-flags.forum.flag_post.reason_${flag.reason()}_label`) : null;\n const detail = flag.reasonDetail();\n const time = humanTime(flag.createdAt());\n\n return [\n app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {\n time,\n user,\n reason,\n }),\n detail ? {detail} : '',\n ];\n }\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Page'];","import app from 'flarum/forum/app';\nimport Page from 'flarum/components/Page';\n\nimport FlagList from './FlagList';\n\n/**\n * The `FlagsPage` component shows the flags list. It is only\n * used on mobile devices where the flags dropdown is within the drawer.\n */\nexport default class FlagsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('flags');\n\n app.flags.load();\n\n this.bodyClass = 'App--flags';\n }\n\n view() {\n return (\n
\n \n
\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\nimport type Post from 'flarum/common/models/Post';\nimport type User from 'flarum/common/models/User';\n\nexport default class Flag extends Model {\n type() {\n return Model.attribute('type').call(this);\n }\n reason() {\n return Model.attribute('reason').call(this);\n }\n reasonDetail() {\n return Model.attribute('reasonDetail').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n post() {\n return Model.hasOne('post').call(this);\n }\n user() {\n return Model.hasOne('user').call(this);\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport FlagsPage from './components/FlagsPage';\nimport Flag from './models/Flag';\n\nexport default [\n new Extend.Routes() //\n .add('flags', '/flags', FlagsPage),\n\n new Extend.Store() //\n .add('flags', Flag),\n\n new Extend.Model(Post) //\n .hasMany('flags')\n .attribute('canFlag'),\n];\n","import addFlagsToPosts from './addFlagsToPosts';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport Flag from './models/Flag';\nimport FlagList from './components/FlagList';\nimport FlagPostModal from './components/FlagPostModal';\nimport FlagsPage from './components/FlagsPage';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default {\n 'flags/addFlagsToPosts': addFlagsToPosts,\n 'flags/addFlagControl': addFlagControl,\n 'flags/addFlagsDropdown': addFlagsDropdown,\n 'flags/models/Flag': Flag,\n 'flags/components/FlagList': FlagList,\n 'flags/components/FlagPostModal': FlagPostModal,\n 'flags/components/FlagsPage': FlagsPage,\n 'flags/components/FlagsDropdown': FlagsDropdown,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\n\nimport FlagListState from './states/FlagListState';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport addFlagsToPosts from './addFlagsToPosts';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-flags', () => {\n app.flags = new FlagListState(app);\n\n addFlagControl();\n addFlagsDropdown();\n addFlagsToPosts();\n});\n\n// Expose compat API\nimport flagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, flagsCompat);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","FlagListState","app","this","loading","load","cache","session","user","attribute","m","redraw","store","find","then","flags","pushAttributes","newFlagCount","sort","b","createdAt","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","FlagPostModal","oninit","vnode","success","reason","Stream","reasonDetail","className","title","content","onclick","hide","flagReasons","toArray","type","disabled","items","ItemList","guidelinesUrl","add","name","checked","withAttr","placeholder","oninput","href","target","undefined","onsubmit","e","preventDefault","save","relationships","post","attrs","errorHandler","onerror","loaded","Modal","extend","PostControls","isHidden","contentType","canFlag","icon","FlagList","state","view","length","map","flag","avatar","username","em","discussion","humanTime","contentPlain","LoadingIndicator","Component","FlagsDropdown","initAttrs","label","getMenu","menuClassName","menuClick","showing","component","goToRoute","route","set","getUnreadCount","getNewCount","NotificationsDropdown","HeaderSecondary","Post","body","data","subtree","invalidate","i","next","nextPost","url","apiEndpoint","method","controls","keys","forEach","k","dismissFlag","vdom","revealContent","unshift","flagReason","flagActionItems","detail","time","FlagsPage","bodyClass","Page","Flag","Model","Extend","hasMany","addFlagsToPosts","addFlagControl","addFlagsDropdown","assign","flagsCompat"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,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WACE,OAAO6F,KAAAA,UAA+B,gBAAgBxI,KAAKS,KAC7D,EAAC,EACDiB,UAAA,WACE,OAAO8G,KAAAA,UAAgB,YAAaA,KAAAA,eAAqBxI,KAAKS,KAChE,EAAC,EAED6D,KAAA,WACE,OAAOkE,KAAAA,OAAmB,QAAQxI,KAAKS,KACzC,EAAC,EACDK,KAAA,WACE,OAAO0H,KAAAA,OAA0B,QAAQxI,KAAKS,KAChD,EAAC,EAnBsB,CAAS+H,MCClC,WACE,IAAIC,IAAAA,SACDjF,IAAI,QAAS,SAAU4E,KAE1B,IAAIK,IAAAA,QACDjF,IAAI,QAAS+E,IAEhB,IAAIE,IAAAA,OAAa5B,KACd6B,QAAc,SACd3H,UAAmB,YCLxB,IACE,wBAAyB4H,EACzB,uBAAwBC,EACxB,yBAA0BC,EAC1B,oBAAqBN,GACrB,4BAA6BrD,EAC7B,iCAAkC7C,EAClC,6BAA8B+F,GAC9B,iCAAkCrC,GCjB9B,GAA+B3F,OAAOC,KCS5CG,IAAAA,aAAAA,IAAqB,gBAAgB,WACnCA,IAAAA,MAAY,IAAID,EAAcC,KAE9BoI,IACAC,IACAF,GACF,IAMAnJ,OAAOsJ,OAAOxI,GAAAA,OAAQyI,G","sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/webpack/runtime/compat get default export","webpack://@flarum/flags/webpack/runtime/define property getters","webpack://@flarum/flags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/flags/webpack/runtime/make namespace object","webpack://@flarum/flags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/flags/./src/forum/states/FlagListState.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/flags/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/withAttr']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/flags/./src/forum/components/FlagPostModal.js","webpack://@flarum/flags/./src/forum/addFlagControl.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/HeaderSecondary']\"","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/NotificationsDropdown']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/flags/./src/forum/components/FlagList.js","webpack://@flarum/flags/./src/forum/components/FlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsDropdown.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/humanTime']\"","webpack://@flarum/flags/./src/forum/addFlagsToPosts.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['components/Page']\"","webpack://@flarum/flags/./src/forum/components/FlagsPage.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/flags/./src/forum/models/Flag.ts","webpack://@flarum/flags/./src/forum/extend.ts","webpack://@flarum/flags/./src/forum/compat.js","webpack://@flarum/flags/external assign \"flarum.core\"","webpack://@flarum/flags/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","export default class FlagListState {\n constructor(app) {\n this.app = app;\n\n /**\n * Whether or not the flags are loading.\n *\n * @type {Boolean}\n */\n this.loading = false;\n }\n\n /**\n * Load flags into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (this.cache && !this.app.session.user.attribute('newFlagCount')) {\n return;\n }\n\n this.loading = true;\n m.redraw();\n\n this.app.store\n .find('flags')\n .then((flags) => {\n this.app.session.user.pushAttributes({ newFlagCount: 0 });\n this.cache = flags.sort((a, b) => b.createdAt() - a.createdAt());\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\n\nimport Stream from 'flarum/common/utils/Stream';\nimport withAttr from 'flarum/common/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class FlagPostModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.success = false;\n\n this.reason = Stream('');\n this.reasonDetail = Stream('');\n }\n\n className() {\n return 'FlagPostModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-flags.forum.flag_post.title');\n }\n\n content() {\n if (this.success) {\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}

\n
\n \n
\n
\n
\n );\n }\n\n return (\n
\n
\n
\n
{this.flagReasons().toArray()}
\n
\n\n
\n \n
\n
\n
\n );\n }\n\n flagReasons() {\n const items = new ItemList();\n const guidelinesUrl = app.forum.attribute('guidelinesUrl');\n\n items.add(\n 'off-topic',\n ,\n 70\n );\n\n items.add(\n 'inappropriate',\n
: undefined,\n })}\n {this.reason() === 'inappropriate' && (\n \n )}\n ,\n 60\n );\n\n items.add(\n 'spam',\n ,\n 50\n );\n\n items.add(\n 'other',\n ,\n 10\n );\n\n return items;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n app.store\n .createRecord('flags')\n .save(\n {\n reason: this.reason() === 'other' ? null : this.reason(),\n reasonDetail: this.reasonDetail(),\n relationships: {\n user: app.session.user,\n post: this.attrs.post,\n },\n },\n { errorHandler: this.onerror.bind(this) }\n )\n .then(() => (this.success = true))\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport Button from 'flarum/common/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\nexport default function () {\n extend(PostControls, 'userControls', function (items, post) {\n if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;\n\n items.add(\n 'flag',\n \n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/HeaderSecondary'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationsDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nexport default class FlagList extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = this.attrs.state;\n }\n\n view() {\n const flags = this.state.cache || [];\n\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flagged_posts.title')}

\n
\n
\n
    \n {flags.length ? (\n flags.map((flag) => {\n const post = flag.post();\n\n return (\n
  • \n {\n app.flags.index = post;\n e.redraw = false;\n }}\n >\n {avatar(post.user())}\n {icon('fas fa-flag', { className: 'Notification-icon' })}\n \n {app.translator.trans('flarum-flags.forum.flagged_posts.item_text', {\n username: username(post.user()),\n em: ,\n discussion: post.discussion().title(),\n })}\n \n {humanTime(flag.createdAt())}\n
    {post.contentPlain()}
    \n \n
  • \n );\n })\n ) : !this.state.loading ? (\n
    {app.translator.trans('flarum-flags.forum.flagged_posts.empty_text')}
    \n ) : (\n \n )}\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport NotificationsDropdown from 'flarum/forum/components/NotificationsDropdown';\n\nimport FlagList from './FlagList';\n\nexport default class FlagsDropdown extends NotificationsDropdown {\n static initAttrs(attrs) {\n attrs.label = attrs.label || app.translator.trans('flarum-flags.forum.flagged_posts.tooltip');\n attrs.icon = attrs.icon || 'fas fa-flag';\n\n super.initAttrs(attrs);\n }\n\n getMenu() {\n return (\n
\n {this.showing && }\n
\n );\n }\n\n goToRoute() {\n m.route.set(app.route('flags'));\n }\n\n getUnreadCount() {\n return app.flags.cache ? app.flags.cache.length : app.forum.attribute('flagCount');\n }\n\n getNewCount() {\n return app.session.user.attribute('newFlagCount');\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default function () {\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.forum.attribute('canViewFlags')) {\n items.add('flags', , 15);\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/humanTime'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Post from 'flarum/forum/components/Post';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport humanTime from 'flarum/common/utils/humanTime';\n\nexport default function () {\n extend(Post.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.post.flags().length) {\n attrs.className += ' Post--flagged';\n }\n });\n\n Post.prototype.dismissFlag = function (body) {\n const post = this.attrs.post;\n\n delete post.data.relationships.flags;\n\n this.subtree.invalidate();\n\n if (app.flags.cache) {\n app.flags.cache.some((flag, i) => {\n if (flag.post() === post) {\n app.flags.cache.splice(i, 1);\n\n if (app.flags.index === post) {\n let next = app.flags.cache[i];\n\n if (!next) next = app.flags.cache[0];\n\n if (next) {\n const nextPost = next.post();\n app.flags.index = nextPost;\n m.route.set(app.route.post(nextPost));\n }\n }\n\n return true;\n }\n });\n }\n\n return app.request({\n url: app.forum.attribute('apiUrl') + post.apiEndpoint() + '/flags',\n method: 'DELETE',\n body,\n });\n };\n\n Post.prototype.flagActionItems = function () {\n const items = new ItemList();\n\n const controls = PostControls.destructiveControls(this.attrs.post);\n\n Object.keys(controls.items).forEach((k) => {\n const attrs = controls.get(k).attrs;\n\n attrs.className = 'Button';\n\n extend(attrs, 'onclick', () => this.dismissFlag());\n });\n\n items.add('controls',
{controls.toArray()}
);\n\n items.add(\n 'dismiss',\n ,\n -100\n );\n\n return items;\n };\n\n extend(Post.prototype, 'content', function (vdom) {\n const post = this.attrs.post;\n const flags = post.flags();\n\n if (!flags.length) return;\n\n if (post.isHidden()) this.revealContent = true;\n\n vdom.unshift(\n
\n
\n {flags.map((flag) => (\n
{this.flagReason(flag)}
\n ))}\n
\n
{this.flagActionItems().toArray()}
\n
\n );\n });\n\n Post.prototype.flagReason = function (flag) {\n if (flag.type() === 'user') {\n const user = flag.user();\n const reason = flag.reason() ? app.translator.trans(`flarum-flags.forum.flag_post.reason_${flag.reason()}_label`) : null;\n const detail = flag.reasonDetail();\n const time = humanTime(flag.createdAt());\n\n return [\n app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {\n time,\n user,\n reason,\n }),\n !!detail && {detail},\n ];\n }\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Page'];","import app from 'flarum/forum/app';\nimport Page from 'flarum/components/Page';\n\nimport FlagList from './FlagList';\n\n/**\n * The `FlagsPage` component shows the flags list. It is only\n * used on mobile devices where the flags dropdown is within the drawer.\n */\nexport default class FlagsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('flags');\n\n app.flags.load();\n\n this.bodyClass = 'App--flags';\n }\n\n view() {\n return (\n
\n \n
\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\nimport type Post from 'flarum/common/models/Post';\nimport type User from 'flarum/common/models/User';\n\nexport default class Flag extends Model {\n type() {\n return Model.attribute('type').call(this);\n }\n reason() {\n return Model.attribute('reason').call(this);\n }\n reasonDetail() {\n return Model.attribute('reasonDetail').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n post() {\n return Model.hasOne('post').call(this);\n }\n user() {\n return Model.hasOne('user').call(this);\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport FlagsPage from './components/FlagsPage';\nimport Flag from './models/Flag';\n\nexport default [\n new Extend.Routes() //\n .add('flags', '/flags', FlagsPage),\n\n new Extend.Store() //\n .add('flags', Flag),\n\n new Extend.Model(Post) //\n .hasMany('flags')\n .attribute('canFlag'),\n];\n","import addFlagsToPosts from './addFlagsToPosts';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport Flag from './models/Flag';\nimport FlagList from './components/FlagList';\nimport FlagPostModal from './components/FlagPostModal';\nimport FlagsPage from './components/FlagsPage';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default {\n 'flags/addFlagsToPosts': addFlagsToPosts,\n 'flags/addFlagControl': addFlagControl,\n 'flags/addFlagsDropdown': addFlagsDropdown,\n 'flags/models/Flag': Flag,\n 'flags/components/FlagList': FlagList,\n 'flags/components/FlagPostModal': FlagPostModal,\n 'flags/components/FlagsPage': FlagsPage,\n 'flags/components/FlagsDropdown': FlagsDropdown,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\n\nimport FlagListState from './states/FlagListState';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport addFlagsToPosts from './addFlagsToPosts';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-flags', () => {\n app.flags = new FlagListState(app);\n\n addFlagControl();\n addFlagsDropdown();\n addFlagsToPosts();\n});\n\n// Expose compat API\nimport flagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, flagsCompat);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","FlagListState","app","this","loading","load","cache","session","user","attribute","m","redraw","store","find","then","flags","pushAttributes","newFlagCount","sort","b","createdAt","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","FlagPostModal","oninit","vnode","success","reason","Stream","reasonDetail","className","title","content","onclick","hide","flagReasons","toArray","type","disabled","items","ItemList","guidelinesUrl","add","name","checked","withAttr","placeholder","oninput","href","target","undefined","onsubmit","e","preventDefault","save","relationships","post","attrs","errorHandler","onerror","loaded","Modal","extend","PostControls","isHidden","contentType","canFlag","icon","FlagList","state","view","length","map","flag","avatar","username","em","discussion","humanTime","contentPlain","Component","FlagsDropdown","initAttrs","label","getMenu","menuClassName","menuClick","showing","goToRoute","route","set","getUnreadCount","getNewCount","NotificationsDropdown","HeaderSecondary","Post","body","data","subtree","invalidate","i","next","nextPost","url","apiEndpoint","method","controls","keys","forEach","k","dismissFlag","vdom","revealContent","unshift","flagReason","flagActionItems","detail","time","FlagsPage","bodyClass","Page","Flag","Model","Extend","hasMany","addFlagsToPosts","addFlagControl","addFlagsDropdown","assign","flagsCompat"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/likes/js/dist/forum.js b/extensions/likes/js/dist/forum.js index ced91923b5..05b5a88d0f 100644 --- a/extensions/likes/js/dist/forum.js +++ b/extensions/likes/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>nt});const n=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var i=t.n(r);const o=flarum.core.compat["forum/components/NotificationGrid"];var a=t.n(o);const s=flarum.core.compat["common/components/Button"];var u=t.n(s);const l=flarum.core.compat["forum/components/CommentPost"];var c=t.n(l);const f=flarum.core.compat["common/components/Link"];var p=t.n(f);const d=flarum.core.compat["common/helpers/punctuateSeries"];var h=t.n(d);const g=flarum.core.compat["common/helpers/username"];var v=t.n(g);const b=flarum.core.compat["common/helpers/icon"];var y=t.n(b);function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function N(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,k(t,e)}const P=flarum.core.compat["common/components/Modal"];var x=t.n(P);const L=flarum.core.compat["common/helpers/avatar"];var _=t.n(L);function j(){return j=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.getNextPageNumber()-1?this.pages.push(o):this.pages.unshift(o),this.location={page:r},m.redraw()},e.loadPage=function(t){void 0===t&&(t=1);var e=this.requestParams(),n=Array.isArray(e.include)?e.include.join(","):e.include,r=j({},e,{page:j({},e.page,{offset:this.pageSize*(t-1)}),include:n});return A.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}());function I(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}var S=function(){function t(){this.element=void 0,this.attrs=void 0,this.state=void 0}var e=t.prototype;return e.oninit=function(t){this.setAttrs(t.attrs)},e.oncreate=function(t){this.element=t.dom},e.onbeforeupdate=function(t){this.setAttrs(t.attrs)},e.onupdate=function(t){},e.onbeforeremove=function(t){},e.onremove=function(t){},e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=j({},t);return m(this,n,e)},e.setAttrs=function(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("["+this.constructor.name+'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute');if("tag"in t)throw new Error("["+this.constructor.name+'] You cannot use the "tag" attribute name with Mithril 2.')}this.attrs=t},t.initAttrs=function(t){},t}();function M(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e4,o=n.sort((function(t){return t===i().session.user?-1:1})).slice(0,r?3:4).map((function(t){return m(p(),{href:i().route.user(t)},t===i().session.user?i().translator.trans("flarum-likes.forum.post.you_text"):v()(t))}));if(r){var a=e.likesCount()-o.length,s=i().translator.trans("flarum-likes.forum.post.others_link",{count:a});i().forum.attribute("canSearchUsers")?o.push(m(F,{className:"Button Button--ua-reset Button--text",onclick:function(t){t.preventDefault(),i().modal.show(U,{post:e})}},s)):o.push(m("span",null,s))}t.add("liked",m("div",{className:"Post-likedBy"},y()("far fa-thumbs-up"),i().translator.trans("flarum-likes.forum.post.liked_by"+(n[0]===i().session.user?"_self":"")+"_text",{count:o.length,users:h()(o)})))}})),(0,n.extend)(Y().prototype,"navItems",(function(t){var e=this.user;t.add("likes",m(K(),{href:i().route("user.likes",{username:null==e?void 0:e.slug()}),icon:"far fa-thumbs-up"},i().translator.trans("flarum-likes.forum.user.likes_link")),88)})),(0,n.extend)(a().prototype,"notificationTypes",(function(t){t.add("postLiked",{name:"postLiked",icon:"far fa-thumbs-up",label:i().translator.trans("flarum-likes.forum.settings.notify_post_liked_label")})}))}))})(),module.exports=e})(); +(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>nt});const n=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var i=t.n(r);const o=flarum.core.compat["forum/components/NotificationGrid"];var a=t.n(o);const s=flarum.core.compat["common/components/Button"];var u=t.n(s);const l=flarum.core.compat["forum/components/CommentPost"];var c=t.n(l);const f=flarum.core.compat["common/components/Link"];var p=t.n(f);const d=flarum.core.compat["common/helpers/punctuateSeries"];var h=t.n(d);const g=flarum.core.compat["common/helpers/username"];var v=t.n(g);const b=flarum.core.compat["common/helpers/icon"];var y=t.n(b);function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function N(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,k(t,e)}const P=flarum.core.compat["common/components/Modal"];var x=t.n(P);const L=flarum.core.compat["common/helpers/avatar"];var _=t.n(L);function j(){return j=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.getNextPageNumber()-1?this.pages.push(o):this.pages.unshift(o),this.location={page:r},m.redraw()},e.loadPage=function(t){void 0===t&&(t=1);var e=this.requestParams(),n=Array.isArray(e.include)?e.include.join(","):e.include,r=j({},e,{page:j({},e.page,{offset:this.pageSize*(t-1)}),include:n});return A.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}());function I(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}var S=function(){function t(){this.element=void 0,this.attrs=void 0,this.state=void 0}var e=t.prototype;return e.oninit=function(t){this.setAttrs(t.attrs)},e.oncreate=function(t){this.element=t.dom},e.onbeforeupdate=function(t){this.setAttrs(t.attrs)},e.onupdate=function(t){},e.onbeforeremove=function(t){},e.onremove=function(t){},e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=j({},t);return m(this,n,e)},e.setAttrs=function(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("["+this.constructor.name+'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute');if("tag"in t)throw new Error("["+this.constructor.name+'] You cannot use the "tag" attribute name with Mithril 2.')}this.attrs=t},t.initAttrs=function(t){},t}();function M(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e4,o=n.sort((function(t){return t===i().session.user?-1:1})).slice(0,r?3:4).map((function(t){return m(p(),{href:i().route.user(t)},t===i().session.user?i().translator.trans("flarum-likes.forum.post.you_text"):v()(t))}));if(r){var a=e.likesCount()-o.length,s=i().translator.trans("flarum-likes.forum.post.others_link",{count:a});i().forum.attribute("canSearchUsers")?o.push(m(F,{className:"Button Button--ua-reset Button--text",onclick:function(t){t.preventDefault(),i().modal.show(U,{post:e})}},s)):o.push(m("span",null,s))}t.add("liked",m("div",{className:"Post-likedBy"},y()("far fa-thumbs-up"),i().translator.trans("flarum-likes.forum.post.liked_by"+(n[0]===i().session.user?"_self":"")+"_text",{count:o.length,users:h()(o)})))}})),(0,n.extend)(Y().prototype,"navItems",(function(t){var e=this.user;t.add("likes",m(K(),{href:i().route("user.likes",{username:null==e?void 0:e.slug()}),icon:"far fa-thumbs-up"},i().translator.trans("flarum-likes.forum.user.likes_link")),88)})),(0,n.extend)(a().prototype,"notificationTypes",(function(t){t.add("postLiked",{name:"postLiked",icon:"far fa-thumbs-up",label:i().translator.trans("flarum-likes.forum.settings.notify_post_liked_label")})}))}))})(),module.exports=e})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/likes/js/dist/forum.js.map b/extensions/likes/js/dist/forum.js.map index 611dbb17b7..dc47b1de28 100644 --- a/extensions/likes/js/dist/forum.js.map +++ b/extensions/likes/js/dist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KAAegJ,IACxBA,IAAShJ,IAAAA,QAAAA,KAAmBA,IAAAA,WAAAA,MAAqB,oCAAsCmJ,IAASH,GAGvG,IAKF,GAAImC,EAAW,CACb,IAAM1B,EAAQZ,EAAKuC,aAAeC,EAAMpM,OAClCsM,EAAQvL,IAAAA,WAAAA,MAAqB,sCAAuC,CAAEyJ,MAAAA,IAExEzJ,IAAAA,MAAAA,UAAoB,kBACtBqL,EAAM7I,KACJ,EAAC+E,EAAM,CACLR,UAAU,uCACVgB,QAAS,SAAC7B,GACRA,EAAEsF,iBACFxL,IAAAA,MAAAA,KAAe0I,EAAgB,CAAEG,KAAAA,GACnC,GAEC0C,IAILF,EAAM7I,KAAK,cAAO+I,GAEtB,CAEArJ,EAAMmI,IACJ,QACA,SAAKtD,UAAU,gBACZY,IAAK,oBACL3H,IAAAA,WAAAA,MAAqB,oCAAsC4K,EAAM,KAAO5K,IAAAA,QAAAA,KAAmB,QAAU,IAAM,QAAS,CACnHyJ,MAAO4B,EAAMpM,OACbwM,MAAOC,IAAgBL,MAI/B,CACF,KC5DAb,EAAAA,EAAAA,QAAOmB,IAAAA,UAAoB,YAAY,SAAUzJ,GAC/C,IAAM8G,EAAO5J,KAAK4J,KAClB9G,EAAMmI,IACJ,QACA,EAAC,IAAU,CAACpB,KAAMjJ,IAAAA,MAAU,aAAc,CAAEmJ,SAAc,MAAJH,OAAI,EAAJA,EAAM4C,SAAWjE,KAAK,oBACzE3H,IAAAA,WAAAA,MAAqB,uCAExB,GAEJ,KHCAwK,EAAAA,EAAAA,QAAOqB,IAAAA,UAA4B,qBAAqB,SAAU3J,GAChEA,EAAMmI,IAAI,YAAa,CACrBrE,KAAM,YACN2B,KAAM,mBACN4D,MAAOvL,IAAAA,WAAAA,MAAqB,wDAEhC,GACF,G","sources":["webpack://@flarum/likes/webpack/bootstrap","webpack://@flarum/likes/webpack/runtime/compat get default export","webpack://@flarum/likes/webpack/runtime/define property getters","webpack://@flarum/likes/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/likes/webpack/runtime/make namespace object","webpack://@flarum/likes/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/punctuateSeries']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/likes/../../../framework/core/js/src/common/app.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/states/PaginatedListState.ts","webpack://@flarum/likes/./src/forum/states/PostLikesModalState.ts","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/likes/../../../framework/core/js/src/common/Component.ts","webpack://@flarum/likes/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/likes/../../../framework/core/js/src/common/utils/classList.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/utils/extractText.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/components/LoadingIndicator.tsx","webpack://@flarum/likes/../../../framework/core/js/src/common/components/Button.tsx","webpack://@flarum/likes/../../../framework/core/js/src/common/helpers/fireDebugWarning.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/helpers/icon.tsx","webpack://@flarum/likes/./src/forum/components/PostLikesModal.tsx","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/likes/./src/forum/components/PostLikedNotification.js","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/UserPage']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/PostsUserPage']\"","webpack://@flarum/likes/./src/forum/components/LikesUserPage.tsx","webpack://@flarum/likes/./src/forum/extend.ts","webpack://@flarum/likes/./src/forum/index.js","webpack://@flarum/likes/./src/forum/addLikeAction.js","webpack://@flarum/likes/./src/forum/addLikesList.js","webpack://@flarum/likes/./src/forum/addLikesTabToUserProfile.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/punctuateSeries'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n {},\n {\n get(_, properties) {\n return Reflect.get(w.app, properties, w.app);\n },\n set(_, properties, value) {\n return Reflect.set(w.app, properties, value, w.app);\n },\n }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page {\n number: number;\n items: TModel[];\n\n hasPrev?: boolean;\n hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n page: number;\n startIndex?: number;\n endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit {\n include?: string | string[];\n}\n\nexport default abstract class PaginatedListState {\n protected location!: PaginationLocation;\n protected pageSize: number;\n\n protected pages: Page[] = [];\n protected params: P = {} as P;\n\n protected initialLoading: boolean = false;\n protected loadingPrev: boolean = false;\n protected loadingNext: boolean = false;\n\n protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n this.params = params;\n\n this.location = { page };\n this.pageSize = pageSize;\n }\n\n abstract get type(): string;\n\n public clear(): void {\n this.pages = [];\n\n m.redraw();\n }\n\n public loadPrev(): Promise {\n if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n this.loadingPrev = true;\n\n const page: number = this.getPrevPageNumber();\n\n return this.loadPage(page)\n .then(this.parseResults.bind(this, page))\n .finally(() => (this.loadingPrev = false));\n }\n\n public loadNext(): Promise {\n if (this.loadingNext) return Promise.resolve();\n\n this.loadingNext = true;\n\n const page: number = this.getNextPageNumber();\n\n return this.loadPage(page)\n .then(this.parseResults.bind(this, page))\n .finally(() => (this.loadingNext = false));\n }\n\n protected parseResults(pg: number, results: ApiResponsePlural): void {\n const pageNum = Number(pg);\n\n const links = results.payload?.links;\n const page = {\n number: pageNum,\n items: results,\n hasNext: !!links?.next,\n hasPrev: !!links?.prev,\n };\n\n if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n this.pages.push(page);\n } else {\n this.pages.unshift(page);\n }\n\n this.location = { page: pageNum };\n\n m.redraw();\n }\n\n /**\n * Load a new page of results.\n */\n protected loadPage(page = 1): Promise> {\n const reqParams = this.requestParams();\n\n const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n const params: ApiQueryParamsPlural = {\n ...reqParams,\n page: {\n ...reqParams.page,\n offset: this.pageSize * (page - 1),\n },\n include,\n };\n\n return app.store.find(this.type, params);\n }\n\n /**\n * Get the parameters that should be passed in the API request.\n * Do not include page offset unless subclass overrides loadPage.\n *\n * @abstract\n * @see loadPage\n */\n protected requestParams(): PaginatedListRequestParams {\n return this.params;\n }\n\n /**\n * Update the `this.params` object, calling `refresh` if they have changed.\n * Use `requestParams` for converting `this.params` into API parameters\n *\n * @param newParams\n * @param page\n * @see requestParams\n */\n public refreshParams(newParams: P, page: number): Promise {\n if (this.isEmpty() || this.paramsChanged(newParams)) {\n this.params = newParams;\n\n return this.refresh(page);\n }\n\n return Promise.resolve();\n }\n\n public refresh(page: number = 1): Promise {\n this.initialLoading = true;\n this.loadingPrev = false;\n this.loadingNext = false;\n\n this.clear();\n\n this.location = { page };\n\n return this.loadPage()\n .then((results) => {\n this.pages = [];\n this.parseResults(this.location.page, results);\n })\n .finally(() => (this.initialLoading = false));\n }\n\n public getPages(): Page[] {\n return this.pages;\n }\n public getLocation(): PaginationLocation {\n return this.location;\n }\n\n public isLoading(): boolean {\n return this.initialLoading || this.loadingNext || this.loadingPrev;\n }\n public isInitialLoading(): boolean {\n return this.initialLoading;\n }\n public isLoadingPrev(): boolean {\n return this.loadingPrev;\n }\n public isLoadingNext(): boolean {\n return this.loadingNext;\n }\n\n /**\n * Returns true when the number of items across all loaded pages is not 0.\n *\n * @see isEmpty\n */\n public hasItems(): boolean {\n return !!this.getAllItems().length;\n }\n\n /**\n * Returns true when there aren't any items *and* the state has already done its initial loading.\n * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n *\n * @see hasItems\n */\n public isEmpty(): boolean {\n return !this.isInitialLoading() && !this.hasItems();\n }\n\n public hasPrev(): boolean {\n return !!this.pages[0]?.hasPrev;\n }\n public hasNext(): boolean {\n return !!this.pages[this.pages.length - 1]?.hasNext;\n }\n\n /**\n * Stored state parameters.\n */\n public getParams(): P {\n return this.params;\n }\n\n protected getNextPageNumber(): number {\n const pg = this.pages[this.pages.length - 1]?.number;\n\n if (pg && !isNaN(pg)) {\n return pg + 1;\n } else {\n return this.location.page;\n }\n }\n protected getPrevPageNumber(): number {\n const pg = this.pages[0]?.number;\n\n if (pg && !isNaN(pg)) {\n // If the calculated page number is less than 1,\n // return 1 as the prev page (first possible page number)\n return Math.max(pg - 1, 1);\n } else {\n return this.location.page;\n }\n }\n\n protected paramsChanged(newParams: P): boolean {\n return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n }\n\n protected getAllItems(): T[] {\n return this.getPages()\n .map((pg) => pg.items)\n .flat();\n }\n}\n","import PaginatedListState, { PaginatedListParams } from '@flarum/core/src/common/states/PaginatedListState';\nimport User from 'flarum/common/models/User';\n\nexport interface PostLikesModalListParams extends PaginatedListParams {\n filter: {\n liked: string;\n };\n page?: {\n offset?: number;\n limit: number;\n };\n}\n\nexport default class PostLikesModalState

extends PaginatedListState {\n constructor(params: P, page: number = 1) {\n const limit = 10;\n\n params.page = { ...(params.page || {}), limit };\n\n super(params, page, limit);\n }\n\n get type(): string {\n return 'users';\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n * - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n * This allows us to use attrs across components without having to pass the vnode to every single\n * method.\n * - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n * the attrs that have been passed into a component.\n * - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n * us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n * - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div',

Hello World

);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component implements Mithril.ClassComponent {\n /**\n * The root DOM element for the component.\n */\n element!: Element;\n\n /**\n * The attributes passed into the component.\n *\n * @see https://mithril.js.org/components.html#passing-data-to-components\n */\n attrs!: Attrs;\n\n /**\n * Class component state that is persisted between redraws.\n *\n * Updating this will **not** automatically trigger a redraw, unlike\n * other frameworks.\n *\n * This is different to Vnode state, which is always an instance of your\n * class component.\n *\n * This is `undefined` by default.\n */\n state!: State;\n\n /**\n * @inheritdoc\n */\n abstract view(vnode: Mithril.Vnode): Mithril.Children;\n\n /**\n * @inheritdoc\n */\n oninit(vnode: Mithril.Vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n oncreate(vnode: Mithril.VnodeDOM) {\n this.element = vnode.dom;\n }\n\n /**\n * @inheritdoc\n */\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n onupdate(vnode: Mithril.VnodeDOM) {}\n\n /**\n * @inheritdoc\n */\n onbeforeremove(vnode: Mithril.VnodeDOM) {}\n\n /**\n * @inheritdoc\n */\n onremove(vnode: Mithril.VnodeDOM) {}\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param [selector] a jQuery-compatible selector string\n * @returns the jQuery object for the DOM node\n * @final\n */\n $(selector?: string): JQuery {\n const $element = $(this.element) as JQuery;\n\n return selector ? $element.find(selector) : $element;\n }\n\n /**\n * Convenience method to attach a component without JSX.\n * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n *\n * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n */\n static component(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n const componentAttrs = { ...attrs };\n\n return m(this as any, componentAttrs, children);\n }\n\n /**\n * Saves a reference to the vnode attrs after running them through initAttrs,\n * and checking for common issues.\n */\n private setAttrs(attrs: Attrs = {} as Attrs): void {\n (this.constructor as typeof Component).initAttrs(attrs);\n\n if (attrs) {\n if ('children' in attrs) {\n throw new Error(\n `[${\n (this.constructor as typeof Component).name\n }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n );\n }\n\n if ('tag' in attrs) {\n throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n }\n }\n\n this.attrs = attrs;\n }\n\n /**\n * Initialize the component's attrs.\n *\n * This can be used to assign default values for missing, optional attrs.\n */\n static initAttrs(attrs: unknown): void {}\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t extractText(element)).join('');\n } else if (typeof vdom === 'object' && vdom !== null) {\n return vdom.children ? extractText(vdom.children) : String(vdom.text);\n } else {\n return String(vdom);\n }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n /**\n * Custom classes for the loading indicator's container.\n */\n className?: string;\n /**\n * Custom classes for the loading indicator's container.\n */\n containerClassName?: string;\n /**\n * Optional size for the loading indicator.\n */\n size?: 'large' | 'medium' | 'small';\n /**\n * Optional attributes to apply to the loading indicator's container.\n */\n containerAttrs?: Partial;\n /**\n * Display type of the spinner.\n *\n * @default 'block'\n */\n display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component {\n view() {\n const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n const completeClassName = classList('LoadingIndicator', className);\n const completeContainerClassName = classList(\n 'LoadingIndicator-container',\n display !== 'unset' && `LoadingIndicator-container--${display}`,\n size && `LoadingIndicator-container--${size}`,\n containerClassName\n );\n\n return (\n \n
\n
\n );\n }\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n /**\n * Class(es) of an optional icon to be rendered within the button.\n *\n * If provided, the button will gain a `has-icon` class.\n */\n icon?: string;\n /**\n * Disables button from user input.\n *\n * Default: `false`\n */\n disabled?: boolean;\n /**\n * Show a loading spinner within the button.\n *\n * If `true`, also disables the button.\n *\n * Default: `false`\n */\n loading?: boolean;\n /**\n * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n * the `` component.\n *\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n *\n * @deprecated\n */\n title?: string | Mithril.ChildArray;\n /**\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n */\n 'aria-label'?: string | Mithril.ChildArray;\n /**\n * Button type.\n *\n * Default: `\"button\"`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n */\n type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `;\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n const { 'aria-label': ariaLabel } = this.attrs;\n\n if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n fireDebugWarning(\n '[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read \"Button\". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',\n this.element\n );\n }\n }\n\n /**\n * Get the template for the button's content.\n */\n protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n const iconName = this.attrs.icon;\n\n return [\n iconName && icon(iconName, { className: 'Button-icon' }),\n children && {children},\n this.attrs.loading && ,\n ];\n }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters): void {\n if (!app.forum.attribute('debug')) return;\n\n console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the iconโ€™s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');\n\n return ;\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Link from 'flarum/common/components/Link';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport type { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport type Post from 'flarum/common/models/Post';\nimport type Mithril from 'mithril';\nimport PostLikesModalState from '../states/PostLikesModalState';\nimport Button from '@flarum/core/src/common/components/Button';\nimport LoadingIndicator from '@flarum/core/src/common/components/LoadingIndicator';\n\nexport interface IPostLikesModalAttrs extends IInternalModalAttrs {\n post: Post;\n}\n\nexport default class PostLikesModal extends Modal {\n oninit(vnode: Mithril.VnodeDOM) {\n super.oninit(vnode);\n\n this.state = new PostLikesModalState({\n filter: {\n liked: this.attrs.post.id()!,\n },\n });\n\n this.state.refresh();\n }\n\n className() {\n return 'PostLikesModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-likes.forum.post_likes.title');\n }\n\n content() {\n return (\n <>\n
\n {this.state.isInitialLoading() ? (\n \n ) : (\n
    \n {this.state.getPages().map((page) =>\n page.items.map((user) => (\n
  • \n \n {avatar(user)} {username(user)}\n \n
  • \n ))\n )}\n
\n )}\n
\n {this.state.hasNext() ? (\n
\n
\n
\n \n
\n
\n
\n ) : null}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default class PostLikedNotification extends Notification {\n icon() {\n return 'far fa-thumbs-up';\n }\n\n href() {\n return app.route.post(this.attrs.notification.subject());\n }\n\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n\n return app.translator.trans('flarum-likes.forum.notifications.post_liked_text', { user, count: 1 });\n }\n\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostsUserPage'];","import app from 'flarum/forum/app';\nimport PostsUserPage from 'flarum/forum/components/PostsUserPage';\n\n/**\n * The `LikesUserPage` component shows posts which user the user liked.\n */\nexport default class LikesUserPage extends PostsUserPage {\n /**\n * Load a new page of the user's activity feed.\n *\n * @param offset The position to start getting results from.\n * @protected\n */\n loadResults(offset: number) {\n return app.store.find('posts', {\n filter: {\n type: 'comment',\n likedBy: this.user.id(),\n },\n page: { offset, limit: this.loadLimit },\n sort: '-createdAt',\n });\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport LikesUserPage from './components/LikesUserPage';\n\nexport default [\n new Extend.Routes() //\n .add('user.likes', '/u/:username/likes', LikesUserPage),\n\n new Extend.Model(Post) //\n .hasMany('likes')\n .attribute('likesCount')\n .attribute('canLike'),\n];\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addLikeAction from './addLikeAction';\nimport addLikesList from './addLikesList';\nimport PostLikedNotification from './components/PostLikedNotification';\nimport addLikesTabToUserProfile from './addLikesTabToUserProfile';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-likes', () => {\n app.notificationComponents.postLiked = PostLikedNotification;\n\n addLikeAction();\n addLikesList();\n addLikesTabToUserProfile();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('postLiked', {\n name: 'postLiked',\n icon: 'far fa-thumbs-up',\n label: app.translator.trans('flarum-likes.forum.settings.notify_post_liked_label'),\n });\n });\n});\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport CommentPost from 'flarum/forum/components/CommentPost';\n\nexport default function () {\n extend(CommentPost.prototype, 'actionItems', function (items) {\n const post = this.attrs.post;\n\n if (post.isHidden() || !post.canLike()) return;\n\n const likes = post.likes();\n\n let isLiked = app.session.user && likes && likes.some((user) => user === app.session.user);\n\n items.add(\n 'like',\n Button.component(\n {\n className: 'Button Button--link',\n onclick: () => {\n isLiked = !isLiked;\n\n post.save({ isLiked });\n\n // We've saved the fact that we do or don't like the post, but in order\n // to provide instantaneous feedback to the user, we'll need to add or\n // remove the like from the relationship data manually.\n const data = post.data.relationships.likes.data;\n data.some((like, i) => {\n if (like.id === app.session.user.id()) {\n data.splice(i, 1);\n return true;\n }\n });\n\n if (isLiked) {\n data.unshift({ type: 'users', id: app.session.user.id() });\n }\n },\n },\n app.translator.trans(isLiked ? 'flarum-likes.forum.post.unlike_link' : 'flarum-likes.forum.post.like_link')\n )\n );\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Link from 'flarum/common/components/Link';\nimport punctuateSeries from 'flarum/common/helpers/punctuateSeries';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\n\nimport PostLikesModal from './components/PostLikesModal';\nimport Button from '@flarum/core/src/common/components/Button';\n\nexport default function () {\n extend(CommentPost.prototype, 'footerItems', function (items) {\n const post = this.attrs.post;\n const likes = post.likes();\n\n if (likes && likes.length) {\n const limit = 4;\n const overLimit = post.likesCount() > limit;\n\n // Construct a list of names of users who have liked this post. Make sure the\n // current user is first in the list, and cap a maximum of 4 items.\n const names = likes\n .sort((a) => (a === app.session.user ? -1 : 1))\n .slice(0, overLimit ? limit - 1 : limit)\n .map((user) => {\n return (\n \n {user === app.session.user ? app.translator.trans('flarum-likes.forum.post.you_text') : username(user)}\n \n );\n });\n\n // If there are more users that we've run out of room to display, add a \"x\n // others\" name to the end of the list. Clicking on it will display a modal\n // with a full list of names.\n if (overLimit) {\n const count = post.likesCount() - names.length;\n const label = app.translator.trans('flarum-likes.forum.post.others_link', { count });\n\n if (app.forum.attribute('canSearchUsers')) {\n names.push(\n {\n e.preventDefault();\n app.modal.show(PostLikesModal, { post });\n }}\n >\n {label}\n \n );\n } else {\n names.push({label});\n }\n }\n\n items.add(\n 'liked',\n
\n {icon('far fa-thumbs-up')}\n {app.translator.trans('flarum-likes.forum.post.liked_by' + (likes[0] === app.session.user ? '_self' : '') + '_text', {\n count: names.length,\n users: punctuateSeries(names),\n })}\n
\n );\n }\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type Mithril from 'mithril';\n\nexport default function addLikesTabToUserProfile() {\n extend(UserPage.prototype, 'navItems', function (items: ItemList) {\n const user = this.user;\n items.add(\n 'likes',\n \n {app.translator.trans('flarum-likes.forum.user.likes_link')}\n ,\n 88\n );\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","_extends","assign","target","i","arguments","length","source","apply","this","_defineProperties","props","descriptor","configurable","writable","w","window","Proxy","_","properties","Reflect","app","set","PostLikesModalState","params","page","limit","Constructor","protoProps","pageSize","location","pages","initialLoading","loadingPrev","loadingNext","clear","m","redraw","loadPrev","getLocation","Promise","resolve","getPrevPageNumber","loadPage","then","parseResults","loadNext","getNextPageNumber","pg","results","pageNum","Number","links","payload","number","items","hasNext","next","hasPrev","prev","isEmpty","push","unshift","reqParams","requestParams","include","Array","isArray","join","offset","store","find","type","refreshParams","newParams","paramsChanged","refresh","getPages","isLoading","isInitialLoading","isLoadingPrev","isLoadingNext","hasItems","getAllItems","getParams","isNaN","Math","max","keys","some","map","flat","_objectWithoutPropertiesLoose","excluded","sourceKeys","indexOf","Component","element","attrs","state","oninit","vnode","setAttrs","oncreate","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","$","selector","$element","component","children","componentAttrs","initAttrs","Error","name","r","e","t","f","n","extractText","vdom","String","text","LoadingIndicator","view","display","size","containerClassName","className","completeClassName","classList","completeContainerClassName","translator","trans","role","containerAttrs","Button","title","ariaLabel","iconName","icon","disabled","loading","_class","onclick","buttonAttrs","hasIcon","getButtonContent","getAttribute","forum","attribute","console","warn","fireDebugWarning","fontClass","PostLikesModal","filter","liked","post","id","content","user","href","avatar","username","Modal","PostLikedNotification","notification","subject","fromUser","count","excerpt","truncate","contentPlain","Notification","LikesUserPage","loadResults","likedBy","loadLimit","sort","PostsUserPage","Extend","add","Post","hasMany","extend","CommentPost","isHidden","canLike","likes","isLiked","save","data","relationships","like","splice","overLimit","likesCount","names","slice","label","preventDefault","users","punctuateSeries","UserPage","slug","NotificationGrid"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eA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AC5GyJ,MAAO4B,EAAMpM,OACbwM,MAAOC,IAAgBL,MAI/B,CACF,KC5DAb,EAAAA,EAAAA,QAAOmB,IAAAA,UAAoB,YAAY,SAAUzJ,GAC/C,IAAM8G,EAAO5J,KAAK4J,KAClB9G,EAAMmI,IACJ,QACA,EAAC,IAAU,CAACpB,KAAMjJ,IAAAA,MAAU,aAAc,CAAEmJ,SAAc,MAAJH,OAAI,EAAJA,EAAM4C,SAAWjE,KAAK,oBACzE3H,IAAAA,WAAAA,MAAqB,uCAExB,GAEJ,KHCAwK,EAAAA,EAAAA,QAAOqB,IAAAA,UAA4B,qBAAqB,SAAU3J,GAChEA,EAAMmI,IAAI,YAAa,CACrBrE,KAAM,YACN2B,KAAM,mBACN4D,MAAOvL,IAAAA,WAAAA,MAAqB,wDAEhC,GACF,G","sources":["webpack://@flarum/likes/webpack/bootstrap","webpack://@flarum/likes/webpack/runtime/compat get default export","webpack://@flarum/likes/webpack/runtime/define property getters","webpack://@flarum/likes/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/likes/webpack/runtime/make namespace object","webpack://@flarum/likes/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/punctuateSeries']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/likes/../../../framework/core/js/src/common/app.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/states/PaginatedListState.ts","webpack://@flarum/likes/./src/forum/states/PostLikesModalState.ts","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/likes/../../../framework/core/js/src/common/Component.ts","webpack://@flarum/likes/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/likes/../../../framework/core/js/src/common/utils/classList.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/utils/extractText.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/components/LoadingIndicator.tsx","webpack://@flarum/likes/../../../framework/core/js/src/common/components/Button.tsx","webpack://@flarum/likes/../../../framework/core/js/src/common/helpers/fireDebugWarning.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/helpers/icon.tsx","webpack://@flarum/likes/./src/forum/components/PostLikesModal.tsx","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/likes/./src/forum/components/PostLikedNotification.js","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/UserPage']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/PostsUserPage']\"","webpack://@flarum/likes/./src/forum/components/LikesUserPage.tsx","webpack://@flarum/likes/./src/forum/extend.ts","webpack://@flarum/likes/./src/forum/index.js","webpack://@flarum/likes/./src/forum/addLikeAction.js","webpack://@flarum/likes/./src/forum/addLikesList.js","webpack://@flarum/likes/./src/forum/addLikesTabToUserProfile.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/punctuateSeries'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n {},\n {\n get(_, properties) {\n return Reflect.get(w.app, properties, w.app);\n },\n set(_, properties, value) {\n return Reflect.set(w.app, properties, value, w.app);\n },\n }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page {\n number: number;\n items: TModel[];\n\n hasPrev?: boolean;\n hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n page: number;\n startIndex?: number;\n endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit {\n include?: string | string[];\n}\n\nexport default abstract class PaginatedListState {\n protected location!: PaginationLocation;\n protected pageSize: number;\n\n protected pages: Page[] = [];\n protected params: P = {} as P;\n\n protected initialLoading: boolean = false;\n protected loadingPrev: boolean = false;\n protected loadingNext: boolean = false;\n\n protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n this.params = params;\n\n this.location = { page };\n this.pageSize = pageSize;\n }\n\n abstract get type(): string;\n\n public clear(): void {\n this.pages = [];\n\n m.redraw();\n }\n\n public loadPrev(): Promise {\n if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n this.loadingPrev = true;\n\n const page: number = this.getPrevPageNumber();\n\n return this.loadPage(page)\n .then(this.parseResults.bind(this, page))\n .finally(() => (this.loadingPrev = false));\n }\n\n public loadNext(): Promise {\n if (this.loadingNext) return Promise.resolve();\n\n this.loadingNext = true;\n\n const page: number = this.getNextPageNumber();\n\n return this.loadPage(page)\n .then(this.parseResults.bind(this, page))\n .finally(() => (this.loadingNext = false));\n }\n\n protected parseResults(pg: number, results: ApiResponsePlural): void {\n const pageNum = Number(pg);\n\n const links = results.payload?.links;\n const page = {\n number: pageNum,\n items: results,\n hasNext: !!links?.next,\n hasPrev: !!links?.prev,\n };\n\n if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n this.pages.push(page);\n } else {\n this.pages.unshift(page);\n }\n\n this.location = { page: pageNum };\n\n m.redraw();\n }\n\n /**\n * Load a new page of results.\n */\n protected loadPage(page = 1): Promise> {\n const reqParams = this.requestParams();\n\n const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n const params: ApiQueryParamsPlural = {\n ...reqParams,\n page: {\n ...reqParams.page,\n offset: this.pageSize * (page - 1),\n },\n include,\n };\n\n return app.store.find(this.type, params);\n }\n\n /**\n * Get the parameters that should be passed in the API request.\n * Do not include page offset unless subclass overrides loadPage.\n *\n * @abstract\n * @see loadPage\n */\n protected requestParams(): PaginatedListRequestParams {\n return this.params;\n }\n\n /**\n * Update the `this.params` object, calling `refresh` if they have changed.\n * Use `requestParams` for converting `this.params` into API parameters\n *\n * @param newParams\n * @param page\n * @see requestParams\n */\n public refreshParams(newParams: P, page: number): Promise {\n if (this.isEmpty() || this.paramsChanged(newParams)) {\n this.params = newParams;\n\n return this.refresh(page);\n }\n\n return Promise.resolve();\n }\n\n public refresh(page: number = 1): Promise {\n this.initialLoading = true;\n this.loadingPrev = false;\n this.loadingNext = false;\n\n this.clear();\n\n this.location = { page };\n\n return this.loadPage()\n .then((results) => {\n this.pages = [];\n this.parseResults(this.location.page, results);\n })\n .finally(() => (this.initialLoading = false));\n }\n\n public getPages(): Page[] {\n return this.pages;\n }\n public getLocation(): PaginationLocation {\n return this.location;\n }\n\n public isLoading(): boolean {\n return this.initialLoading || this.loadingNext || this.loadingPrev;\n }\n public isInitialLoading(): boolean {\n return this.initialLoading;\n }\n public isLoadingPrev(): boolean {\n return this.loadingPrev;\n }\n public isLoadingNext(): boolean {\n return this.loadingNext;\n }\n\n /**\n * Returns true when the number of items across all loaded pages is not 0.\n *\n * @see isEmpty\n */\n public hasItems(): boolean {\n return !!this.getAllItems().length;\n }\n\n /**\n * Returns true when there aren't any items *and* the state has already done its initial loading.\n * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n *\n * @see hasItems\n */\n public isEmpty(): boolean {\n return !this.isInitialLoading() && !this.hasItems();\n }\n\n public hasPrev(): boolean {\n return !!this.pages[0]?.hasPrev;\n }\n public hasNext(): boolean {\n return !!this.pages[this.pages.length - 1]?.hasNext;\n }\n\n /**\n * Stored state parameters.\n */\n public getParams(): P {\n return this.params;\n }\n\n protected getNextPageNumber(): number {\n const pg = this.pages[this.pages.length - 1]?.number;\n\n if (pg && !isNaN(pg)) {\n return pg + 1;\n } else {\n return this.location.page;\n }\n }\n protected getPrevPageNumber(): number {\n const pg = this.pages[0]?.number;\n\n if (pg && !isNaN(pg)) {\n // If the calculated page number is less than 1,\n // return 1 as the prev page (first possible page number)\n return Math.max(pg - 1, 1);\n } else {\n return this.location.page;\n }\n }\n\n protected paramsChanged(newParams: P): boolean {\n return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n }\n\n protected getAllItems(): T[] {\n return this.getPages()\n .map((pg) => pg.items)\n .flat();\n }\n}\n","import PaginatedListState, { PaginatedListParams } from '@flarum/core/src/common/states/PaginatedListState';\nimport User from 'flarum/common/models/User';\n\nexport interface PostLikesModalListParams extends PaginatedListParams {\n filter: {\n liked: string;\n };\n page?: {\n offset?: number;\n limit: number;\n };\n}\n\nexport default class PostLikesModalState

extends PaginatedListState {\n constructor(params: P, page: number = 1) {\n const limit = 10;\n\n params.page = { ...(params.page || {}), limit };\n\n super(params, page, limit);\n }\n\n get type(): string {\n return 'users';\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n * - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n * This allows us to use attrs across components without having to pass the vnode to every single\n * method.\n * - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n * the attrs that have been passed into a component.\n * - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n * us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n * - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div',

Hello World

);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component implements Mithril.ClassComponent {\n /**\n * The root DOM element for the component.\n */\n element!: Element;\n\n /**\n * The attributes passed into the component.\n *\n * @see https://mithril.js.org/components.html#passing-data-to-components\n */\n attrs!: Attrs;\n\n /**\n * Class component state that is persisted between redraws.\n *\n * Updating this will **not** automatically trigger a redraw, unlike\n * other frameworks.\n *\n * This is different to Vnode state, which is always an instance of your\n * class component.\n *\n * This is `undefined` by default.\n */\n state!: State;\n\n /**\n * @inheritdoc\n */\n abstract view(vnode: Mithril.Vnode): Mithril.Children;\n\n /**\n * @inheritdoc\n */\n oninit(vnode: Mithril.Vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n oncreate(vnode: Mithril.VnodeDOM) {\n this.element = vnode.dom;\n }\n\n /**\n * @inheritdoc\n */\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n onupdate(vnode: Mithril.VnodeDOM) {}\n\n /**\n * @inheritdoc\n */\n onbeforeremove(vnode: Mithril.VnodeDOM) {}\n\n /**\n * @inheritdoc\n */\n onremove(vnode: Mithril.VnodeDOM) {}\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param [selector] a jQuery-compatible selector string\n * @returns the jQuery object for the DOM node\n * @final\n */\n $(selector?: string): JQuery {\n const $element = $(this.element) as JQuery;\n\n return selector ? $element.find(selector) : $element;\n }\n\n /**\n * Convenience method to attach a component without JSX.\n * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n *\n * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n */\n static component(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n const componentAttrs = { ...attrs };\n\n return m(this as any, componentAttrs, children);\n }\n\n /**\n * Saves a reference to the vnode attrs after running them through initAttrs,\n * and checking for common issues.\n */\n private setAttrs(attrs: Attrs = {} as Attrs): void {\n (this.constructor as typeof Component).initAttrs(attrs);\n\n if (attrs) {\n if ('children' in attrs) {\n throw new Error(\n `[${\n (this.constructor as typeof Component).name\n }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n );\n }\n\n if ('tag' in attrs) {\n throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n }\n }\n\n this.attrs = attrs;\n }\n\n /**\n * Initialize the component's attrs.\n *\n * This can be used to assign default values for missing, optional attrs.\n */\n static initAttrs(attrs: unknown): void {}\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t extractText(element)).join('');\n } else if (typeof vdom === 'object' && vdom !== null) {\n return vdom.children ? extractText(vdom.children) : String(vdom.text);\n } else {\n return String(vdom);\n }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n /**\n * Custom classes for the loading indicator's container.\n */\n className?: string;\n /**\n * Custom classes for the loading indicator's container.\n */\n containerClassName?: string;\n /**\n * Optional size for the loading indicator.\n */\n size?: 'large' | 'medium' | 'small';\n /**\n * Optional attributes to apply to the loading indicator's container.\n */\n containerAttrs?: Partial;\n /**\n * Display type of the spinner.\n *\n * @default 'block'\n */\n display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component {\n view() {\n const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n const completeClassName = classList('LoadingIndicator', className);\n const completeContainerClassName = classList(\n 'LoadingIndicator-container',\n display !== 'unset' && `LoadingIndicator-container--${display}`,\n size && `LoadingIndicator-container--${size}`,\n containerClassName\n );\n\n return (\n \n
\n
\n );\n }\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n /**\n * Class(es) of an optional icon to be rendered within the button.\n *\n * If provided, the button will gain a `has-icon` class.\n */\n icon?: string;\n /**\n * Disables button from user input.\n *\n * Default: `false`\n */\n disabled?: boolean;\n /**\n * Show a loading spinner within the button.\n *\n * If `true`, also disables the button.\n *\n * Default: `false`\n */\n loading?: boolean;\n /**\n * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n * the `` component.\n *\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n *\n * @deprecated\n */\n title?: string | Mithril.ChildArray;\n /**\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n */\n 'aria-label'?: string | Mithril.ChildArray;\n /**\n * Button type.\n *\n * Default: `\"button\"`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n */\n type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `;\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n const { 'aria-label': ariaLabel } = this.attrs;\n\n if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n fireDebugWarning(\n '[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read \"Button\". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',\n this.element\n );\n }\n }\n\n /**\n * Get the template for the button's content.\n */\n protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n const iconName = this.attrs.icon;\n\n return [\n iconName && icon(iconName, { className: 'Button-icon' }),\n children && {children},\n this.attrs.loading && ,\n ];\n }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters): void {\n if (!app.forum.attribute('debug')) return;\n\n console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the iconโ€™s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n attrs.className = classList('icon', fontClass, attrs.className);\n\n return ;\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Link from 'flarum/common/components/Link';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport type { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport type Post from 'flarum/common/models/Post';\nimport type Mithril from 'mithril';\nimport PostLikesModalState from '../states/PostLikesModalState';\nimport Button from '@flarum/core/src/common/components/Button';\nimport LoadingIndicator from '@flarum/core/src/common/components/LoadingIndicator';\n\nexport interface IPostLikesModalAttrs extends IInternalModalAttrs {\n post: Post;\n}\n\nexport default class PostLikesModal extends Modal {\n oninit(vnode: Mithril.VnodeDOM) {\n super.oninit(vnode);\n\n this.state = new PostLikesModalState({\n filter: {\n liked: this.attrs.post.id()!,\n },\n });\n\n this.state.refresh();\n }\n\n className() {\n return 'PostLikesModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-likes.forum.post_likes.title');\n }\n\n content() {\n return (\n <>\n
\n {this.state.isInitialLoading() ? (\n \n ) : (\n
    \n {this.state.getPages().map((page) =>\n page.items.map((user) => (\n
  • \n \n {avatar(user)} {username(user)}\n \n
  • \n ))\n )}\n
\n )}\n
\n {this.state.hasNext() ? (\n
\n
\n
\n \n
\n
\n
\n ) : null}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default class PostLikedNotification extends Notification {\n icon() {\n return 'far fa-thumbs-up';\n }\n\n href() {\n return app.route.post(this.attrs.notification.subject());\n }\n\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n\n return app.translator.trans('flarum-likes.forum.notifications.post_liked_text', { user, count: 1 });\n }\n\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostsUserPage'];","import app from 'flarum/forum/app';\nimport PostsUserPage from 'flarum/forum/components/PostsUserPage';\n\n/**\n * The `LikesUserPage` component shows posts which user the user liked.\n */\nexport default class LikesUserPage extends PostsUserPage {\n /**\n * Load a new page of the user's activity feed.\n *\n * @param offset The position to start getting results from.\n * @protected\n */\n loadResults(offset: number) {\n return app.store.find('posts', {\n filter: {\n type: 'comment',\n likedBy: this.user.id(),\n },\n page: { offset, limit: this.loadLimit },\n sort: '-createdAt',\n });\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport LikesUserPage from './components/LikesUserPage';\n\nexport default [\n new Extend.Routes() //\n .add('user.likes', '/u/:username/likes', LikesUserPage),\n\n new Extend.Model(Post) //\n .hasMany('likes')\n .attribute('likesCount')\n .attribute('canLike'),\n];\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addLikeAction from './addLikeAction';\nimport addLikesList from './addLikesList';\nimport PostLikedNotification from './components/PostLikedNotification';\nimport addLikesTabToUserProfile from './addLikesTabToUserProfile';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-likes', () => {\n app.notificationComponents.postLiked = PostLikedNotification;\n\n addLikeAction();\n addLikesList();\n addLikesTabToUserProfile();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('postLiked', {\n name: 'postLiked',\n icon: 'far fa-thumbs-up',\n label: app.translator.trans('flarum-likes.forum.settings.notify_post_liked_label'),\n });\n });\n});\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport CommentPost from 'flarum/forum/components/CommentPost';\n\nexport default function () {\n extend(CommentPost.prototype, 'actionItems', function (items) {\n const post = this.attrs.post;\n\n if (post.isHidden() || !post.canLike()) return;\n\n const likes = post.likes();\n\n let isLiked = app.session.user && likes && likes.some((user) => user === app.session.user);\n\n items.add(\n 'like',\n {\n isLiked = !isLiked;\n\n post.save({ isLiked });\n\n // We've saved the fact that we do or don't like the post, but in order\n // to provide instantaneous feedback to the user, we'll need to add or\n // remove the like from the relationship data manually.\n const data = post.data.relationships.likes.data;\n data.some((like, i) => {\n if (like.id === app.session.user.id()) {\n data.splice(i, 1);\n return true;\n }\n });\n\n if (isLiked) {\n data.unshift({ type: 'users', id: app.session.user.id() });\n }\n }}\n >\n {app.translator.trans(isLiked ? 'flarum-likes.forum.post.unlike_link' : 'flarum-likes.forum.post.like_link')}\n \n );\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Link from 'flarum/common/components/Link';\nimport punctuateSeries from 'flarum/common/helpers/punctuateSeries';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\n\nimport PostLikesModal from './components/PostLikesModal';\nimport Button from '@flarum/core/src/common/components/Button';\n\nexport default function () {\n extend(CommentPost.prototype, 'footerItems', function (items) {\n const post = this.attrs.post;\n const likes = post.likes();\n\n if (likes && likes.length) {\n const limit = 4;\n const overLimit = post.likesCount() > limit;\n\n // Construct a list of names of users who have liked this post. Make sure the\n // current user is first in the list, and cap a maximum of 4 items.\n const names = likes\n .sort((a) => (a === app.session.user ? -1 : 1))\n .slice(0, overLimit ? limit - 1 : limit)\n .map((user) => {\n return (\n \n {user === app.session.user ? app.translator.trans('flarum-likes.forum.post.you_text') : username(user)}\n \n );\n });\n\n // If there are more users that we've run out of room to display, add a \"x\n // others\" name to the end of the list. Clicking on it will display a modal\n // with a full list of names.\n if (overLimit) {\n const count = post.likesCount() - names.length;\n const label = app.translator.trans('flarum-likes.forum.post.others_link', { count });\n\n if (app.forum.attribute('canSearchUsers')) {\n names.push(\n {\n e.preventDefault();\n app.modal.show(PostLikesModal, { post });\n }}\n >\n {label}\n \n );\n } else {\n names.push({label});\n }\n }\n\n items.add(\n 'liked',\n
\n {icon('far fa-thumbs-up')}\n {app.translator.trans(`flarum-likes.forum.post.liked_by${likes[0] === app.session.user ? '_self' : ''}_text`, {\n count: names.length,\n users: punctuateSeries(names),\n })}\n
\n );\n }\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type Mithril from 'mithril';\n\nexport default function addLikesTabToUserProfile() {\n extend(UserPage.prototype, 'navItems', function (items: ItemList) {\n const user = this.user;\n items.add(\n 'likes',\n \n {app.translator.trans('flarum-likes.forum.user.likes_link')}\n ,\n 88\n );\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","_extends","assign","target","i","arguments","length","source","apply","this","_defineProperties","props","descriptor","configurable","writable","w","window","Proxy","_","properties","Reflect","app","set","PostLikesModalState","params","page","limit","Constructor","protoProps","pageSize","location","pages","initialLoading","loadingPrev","loadingNext","clear","m","redraw","loadPrev","getLocation","Promise","resolve","getPrevPageNumber","loadPage","then","parseResults","loadNext","getNextPageNumber","pg","results","pageNum","Number","links","payload","number","items","hasNext","next","hasPrev","prev","isEmpty","push","unshift","reqParams","requestParams","include","Array","isArray","join","offset","store","find","type","refreshParams","newParams","paramsChanged","refresh","getPages","isLoading","isInitialLoading","isLoadingPrev","isLoadingNext","hasItems","getAllItems","getParams","isNaN","Math","max","keys","some","map","flat","_objectWithoutPropertiesLoose","excluded","sourceKeys","indexOf","Component","element","attrs","state","oninit","vnode","setAttrs","oncreate","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","$","selector","$element","component","children","componentAttrs","initAttrs","Error","name","r","e","t","f","n","extractText","vdom","String","text","LoadingIndicator","view","display","size","containerClassName","className","completeClassName","classList","completeContainerClassName","translator","trans","role","containerAttrs","Button","title","ariaLabel","iconName","icon","disabled","loading","_class","onclick","buttonAttrs","hasIcon","getButtonContent","getAttribute","forum","attribute","console","warn","fireDebugWarning","fontClass","PostLikesModal","filter","liked","post","id","content","user","href","avatar","username","Modal","PostLikedNotification","notification","subject","fromUser","count","excerpt","truncate","contentPlain","Notification","LikesUserPage","loadResults","likedBy","loadLimit","sort","PostsUserPage","Extend","add","Post","hasMany","extend","CommentPost","isHidden","canLike","likes","isLiked","save","data","relationships","like","splice","overLimit","likesCount","names","slice","label","preventDefault","users","punctuateSeries","UserPage","slug","NotificationGrid"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js b/extensions/lock/js/dist/forum.js index 6dab48a64c..f20e92706a 100644 --- a/extensions/lock/js/dist/forum.js +++ b/extensions/lock/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>j});const n=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/app"];var c=o.n(e);const r=flarum.core.compat["forum/components/NotificationGrid"];var s=o.n(r);function a(o,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},a(o,t)}function i(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,a(o,t)}const u=flarum.core.compat["forum/components/Notification"];var l=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-lock"},n.href=function(){var o=this.attrs.notification;return c().route.discussion(o.subject(),o.content().postNumber)},n.content=function(){return c().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})},t}(o.n(u)());const f=flarum.core.compat["common/models/Discussion"];var d=o.n(f);const p=flarum.core.compat["common/components/Badge"];var k=o.n(p);const y=flarum.core.compat["forum/utils/DiscussionControls"];var b=o.n(y);const _=flarum.core.compat["forum/components/DiscussionPage"];var v=o.n(_);const h=flarum.core.compat["common/components/Button"];var g=o.n(h);const L=flarum.core.compat["common/extenders"];var x=o.n(L);const O=flarum.core.compat["forum/components/EventPost"];var P=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"},n.descriptionKey=function(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"},t}(o.n(O)());const j=[(new(x().PostTypes)).add("discussionLocked",P),new(x().Model)(d()).attribute("isLocked").attribute("canLock")];c().initializers.add("flarum-lock",(function(){c().notificationComponents.discussionLocked=l,(0,n.extend)(d().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",k().component({type:"locked",label:c().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,n.extend)(b(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",g().component({icon:"fas fa-lock",onclick:this.lockAction.bind(t)},c().translator.trans(t.isLocked()?"flarum-lock.forum.discussion_controls.unlock_button":"flarum-lock.forum.discussion_controls.lock_button")))})),b().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((function(){c().current.matches(v())&&c().current.get("stream").update(),m.redraw()}))},(0,n.extend)(s().prototype,"notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:c().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})(); +(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>j});const n=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/app"];var c=o.n(e);const r=flarum.core.compat["forum/components/NotificationGrid"];var s=o.n(r);function a(o,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},a(o,t)}function i(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,a(o,t)}const u=flarum.core.compat["forum/components/Notification"];var f=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-lock"},n.href=function(){var o=this.attrs.notification;return c().route.discussion(o.subject(),o.content().postNumber)},n.content=function(){return c().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})},t}(o.n(u)());const l=flarum.core.compat["common/models/Discussion"];var d=o.n(l);const p=flarum.core.compat["common/components/Badge"];var k=o.n(p);const y=flarum.core.compat["forum/utils/DiscussionControls"];var b=o.n(y);const _=flarum.core.compat["forum/components/DiscussionPage"];var v=o.n(_);const h=flarum.core.compat["common/components/Button"];var g=o.n(h);const L=flarum.core.compat["common/extenders"];var x=o.n(L);const O=flarum.core.compat["forum/components/EventPost"];var P=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"},n.descriptionKey=function(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"},t}(o.n(O)());const j=[(new(x().PostTypes)).add("discussionLocked",P),new(x().Model)(d()).attribute("isLocked").attribute("canLock")];c().initializers.add("flarum-lock",(function(){c().notificationComponents.discussionLocked=f,(0,n.extend)(d().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(k(),{type:"locked",label:c().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,n.extend)(b(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(g(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},c().translator.trans("flarum-lock.forum.discussion_controls."+(t.isLocked()?"unlock":"lock")+"_button")))})),b().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((function(){c().current.matches(v())&&c().current.get("stream").update(),m.redraw()}))},(0,n.extend)(s().prototype,"notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:c().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js.map b/extensions/lock/js/dist/forum.js.map index 5980498650..5b5288cd7c 100644 --- a/extensions/lock/js/dist/forum.js.map +++ b/extensions/lock/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,qC,aCAzC,SAASC,EAAgBhB,EAAGiB,GAKzC,OAJAD,EAAkBf,OAAOiB,eAAiBjB,OAAOiB,eAAeC,OAAS,SAAyBnB,EAAGi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eAAe,WAClCA,IAAAA,uBAAAA,iBAA8CN,GCL9CsB,EAAAA,EAAAA,QAAOF,IAAAA,UAAsB,UAAU,SAAUG,GAC3CnB,KAAKoB,YACPD,EAAOJ,IACL,SACAM,IAAAA,UAAgB,CACdC,KAAM,SACNC,MAAOrB,IAAAA,WAAAA,MAAqB,0CAC5BL,KAAM,gBAId,KCVAqB,EAAAA,EAAAA,QAAOM,IAAoB,sBAAsB,SAAUC,EAAOC,GAC5DA,EAAWC,WACbF,EAAMV,IACJ,OACAa,IAAAA,UACE,CACE/B,KAAM,cACNgC,QAAS7B,KAAK8B,WAAWzC,KAAKqC,IAEhCxB,IAAAA,WAAAA,MACEwB,EAAWN,WAAa,sDAAwD,sDAK1F,IAEAI,IAAAA,WAAgC,WAC9BxB,KAAK+B,KAAK,CAAEX,UAAWpB,KAAKoB,aAAcY,MAAK,WACzC9B,IAAAA,QAAAA,QAAoB+B,MACtB/B,IAAAA,QAAAA,IAAgB,UAAUgC,SAG5BC,EAAEC,QACJ,GACF,GFhBAlB,EAAAA,EAAAA,QAAOmB,IAAAA,UAA4B,qBAAqB,SAAUZ,GAChEA,EAAMV,IAAI,mBAAoB,CAC5BuB,KAAM,mBACNzC,KAAM,cACN0B,MAAOrB,IAAAA,WAAAA,MAAqB,8DAEhC,GACF,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n\n href() {\n const notification = this.attrs.notification;\n\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', { user: this.attrs.notification.fromUser() });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\n\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n\n descriptionKey() {\n return this.attrs.post.content().locked\n ? 'flarum-lock.forum.post_stream.discussion_locked_text'\n : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\n\nexport default [\n new Extend.PostTypes() //\n .add('discussionLocked', DiscussionLockedPost),\n\n new Extend.Model(Discussion) //\n .attribute('isLocked')\n .attribute('canLock'),\n];\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n\n addLockBadge();\n addLockControl();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label'),\n });\n });\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add(\n 'locked',\n Badge.component({\n type: 'locked',\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: 'fas fa-lock',\n })\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\n\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add(\n 'lock',\n Button.component(\n {\n icon: 'fas fa-lock',\n onclick: this.lockAction.bind(discussion),\n },\n app.translator.trans(\n discussion.isLocked() ? 'flarum-lock.forum.discussion_controls.unlock_button' : 'flarum-lock.forum.discussion_controls.lock_button'\n )\n )\n );\n }\n });\n\n DiscussionControls.lockAction = function () {\n this.save({ isLocked: !this.isLocked() }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n\n m.redraw();\n });\n };\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","DiscussionLockedNotification","icon","href","notification","this","attrs","app","subject","content","postNumber","user","fromUser","Notification","DiscussionLockedPost","post","locked","descriptionKey","EventPost","Extend","add","Discussion","attribute","extend","badges","isLocked","Badge","type","label","DiscussionControls","items","discussion","canLock","Button","onclick","lockAction","save","then","DiscussionPage","update","m","redraw","NotificationGrid","name"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,KAAKC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KAAKC,MAAMS,KAAKN,UAAUO,OAC7B,uDACA,wDACN,EAAC,EATsC,C,MAASE,ICElD,UACE,IAAIC,IAAAA,YACDC,IAAI,mBAAoBN,GAE3B,IAAIK,IAAAA,OAAaE,KACdC,UAAmB,YACnBA,UAAmB,YCAxBf,IAAAA,aAAAA,IAAqB,eAAe,WAClCA,IAAAA,uBAAAA,iBAA8CN,GCL9CsB,EAAAA,EAAAA,QAAOF,IAAAA,UAAsB,UAAU,SAAUG,GAC3CnB,KAAKoB,YACPD,EAAOJ,IAAI,SAAU,EAAC,IAAK,CAACM,KAAK,SAASC,MAAOpB,IAAAA,WAAAA,MAAqB,0CAA2CL,KAAK,gBAE1H,KCHAqB,EAAAA,EAAAA,QAAOK,IAAoB,sBAAsB,SAAUC,EAAOC,GAC5DA,EAAWC,WACbF,EAAMT,IACJ,OACA,EAAC,IAAM,CAAClB,KAAK,cAAc8B,QAAS3B,KAAK4B,WAAWvC,KAAKoC,IACtDvB,IAAAA,WAAAA,MAAqB,0CAAyCuB,EAAWL,WAAa,SAAW,QAAM,YAIhH,IAEAG,IAAAA,WAAgC,WAC9BvB,KAAK6B,KAAK,CAAET,UAAWpB,KAAKoB,aAAcU,MAAK,WACzC5B,IAAAA,QAAAA,QAAoB6B,MACtB7B,IAAAA,QAAAA,IAAgB,UAAU8B,SAG5BC,EAAEC,QACJ,GACF,GFVAhB,EAAAA,EAAAA,QAAOiB,IAAAA,UAA4B,qBAAqB,SAAUX,GAChEA,EAAMT,IAAI,mBAAoB,CAC5BqB,KAAM,mBACNvC,KAAM,cACNyB,MAAOpB,IAAAA,WAAAA,MAAqB,8DAEhC,GACF,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n\n href() {\n const notification = this.attrs.notification;\n\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', { user: this.attrs.notification.fromUser() });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\n\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n\n descriptionKey() {\n return this.attrs.post.content().locked\n ? 'flarum-lock.forum.post_stream.discussion_locked_text'\n : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\n\nexport default [\n new Extend.PostTypes() //\n .add('discussionLocked', DiscussionLockedPost),\n\n new Extend.Model(Discussion) //\n .attribute('isLocked')\n .attribute('canLock'),\n];\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n\n addLockBadge();\n addLockControl();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label'),\n });\n });\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\n\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add(\n 'lock',\n \n );\n }\n });\n\n DiscussionControls.lockAction = function () {\n this.save({ isLocked: !this.isLocked() }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n\n m.redraw();\n });\n };\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","DiscussionLockedNotification","icon","href","notification","this","attrs","app","subject","content","postNumber","user","fromUser","Notification","DiscussionLockedPost","post","locked","descriptionKey","EventPost","Extend","add","Discussion","attribute","extend","badges","isLocked","type","label","DiscussionControls","items","discussion","canLock","onclick","lockAction","save","then","DiscussionPage","update","m","redraw","NotificationGrid","name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/markdown/js/dist/admin.js b/extensions/markdown/js/dist/admin.js index 8515bd1b04..0bee6a2d1f 100644 --- a/extensions/markdown/js/dist/admin.js +++ b/extensions/markdown/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var r in e)t.o(e,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);const e=flarum.core.compat["admin/app"];var r=t.n(e);const i=flarum.core.compat["common/app"];var n=t.n(i);const a=flarum.core.compat["common/extend"],c=flarum.core.compat["common/components/TextEditor"];var l=t.n(c);const s=flarum.core.compat["common/utils/BasicEditorDriver"];var d=t.n(s);const u=flarum.core.compat["common/utils/styleSelectedText"];var f=t.n(u);function p(t,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},p(t,o)}function h(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,p(t,o)}const k=flarum.core.compat["common/Component"];var y=t.n(k),b=function(t){function o(){return t.apply(this,arguments)||this}return h(o,t),o.prototype.view=function(t){return m("div",{class:"MarkdownToolbar"},t.children)},o}(y());const x=flarum.core.compat["common/helpers/icon"];var v=t.n(x);const g=flarum.core.compat["common/components/Tooltip"];var _=t.n(g),w=function(t){function o(){return t.apply(this,arguments)||this}h(o,t);var e=o.prototype;return e.oncreate=function(o){t.prototype.oncreate.call(this,o)},e.view=function(){var t=m("button",{className:"Button Button--icon Button--link",type:"button","data-hotkey":this.attrs.hotkey,onkeydown:this.keydown.bind(this),onclick:this.attrs.onclick},v()(this.attrs.icon));return this.attrs.title?m(_(),{text:this.attrs.title},t):t},e.keydown=function(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.element.click())},o}(y());const O=flarum.core.compat["common/utils/ItemList"];var T=t.n(O),P=navigator.userAgent.match(/Macintosh/)?"โŒ˜":"ctrl",S={header:{prefix:"### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},image:{prefix:"![",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},unordered_list:{prefix:"- ",multiline:!0,surroundWithNewlines:!0},ordered_list:{prefix:"1. ",multiline:!0,orderedList:!0},spoiler:{prefix:">!",suffix:"!<",blockPrefix:">! ",multiline:!0,trimFirst:!0}},j=function(t,o){f()(o.el,S[t])};function I(t,o,e){return function(r){r.key===o&&(r.metaKey&&"โŒ˜"===P||r.ctrlKey&&"ctrl"===P)&&(r.preventDefault(),j(t,e))}}function F(t){var o=this,e="function"==typeof t?t():new(T());function r(t,o){return n().translator.trans("flarum-markdown.lib.composer."+t+"_tooltip")+(o?" <"+P+"-"+o+">":"")}var i=function(t){return function(){return j(t,o.attrs.composer.editor)}};return e.add("header",m(w,{title:r("header"),icon:"fas fa-heading",onclick:i("header")}),1e3),e.add("bold",m(w,{title:r("bold","b"),icon:"fas fa-bold",onclick:i("bold")}),900),e.add("italic",m(w,{title:r("italic","i"),icon:"fas fa-italic",onclick:i("italic")}),800),e.add("strikethrough",m(w,{title:r("strikethrough"),icon:"fas fa-strikethrough",onclick:i("strikethrough")}),700),e.add("quote",m(w,{title:r("quote"),icon:"fas fa-quote-left",onclick:i("quote")}),600),e.add("spoiler",m(w,{title:r("spoiler"),icon:"fas fa-exclamation-triangle",onclick:i("spoiler")}),500),e.add("code",m(w,{title:r("code"),icon:"fas fa-code",onclick:i("code")}),400),e.add("link",m(w,{title:r("link"),icon:"fas fa-link",onclick:i("link")}),300),e.add("image",m(w,{title:r("image"),icon:"fas fa-image",onclick:i("image")}),200),e.add("unordered_list",m(w,{title:r("unordered_list"),icon:"fas fa-list-ul",onclick:i("unordered_list")}),100),e.add("ordered_list",m(w,{title:r("ordered_list"),icon:"fas fa-list-ol",onclick:i("ordered_list")}),0),e}r().initializers.add("flarum-markdown",(function(t){(0,a.extend)(d().prototype,"keyHandlers",(function(t){t.add("bold",I("bold","b",this)),t.add("italic",I("italic","i",this))})),l().prototype.markdownToolbarItems?(0,a.override)(l().prototype,"markdownToolbarItems",F):l().prototype.markdownToolbarItems=F,(0,a.extend)(l().prototype,"toolbarItems",(function(t){t.add("markdown",m(b,{for:this.textareaId,setShortcutHandler:function(t){return shortcutHandler=t}},this.markdownToolbarItems().toArray()),100)}))}))})(),module.exports=o})(); +(()=>{var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var r in e)t.o(e,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);const e=flarum.core.compat["admin/app"];var r=t.n(e);const i=flarum.core.compat["common/app"];var n=t.n(i);const a=flarum.core.compat["common/extend"],c=flarum.core.compat["common/components/TextEditor"];var l=t.n(c);const s=flarum.core.compat["common/utils/BasicEditorDriver"];var d=t.n(s);const u=flarum.core.compat["common/utils/styleSelectedText"];var f=t.n(u);function p(t,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},p(t,o)}function h(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,p(t,o)}const k=flarum.core.compat["common/Component"];var y=t.n(k),b=function(t){function o(){return t.apply(this,arguments)||this}return h(o,t),o.prototype.view=function(t){return m("div",{className:"MarkdownToolbar"},t.children)},o}(y());const x=flarum.core.compat["common/helpers/icon"];var v=t.n(x);const g=flarum.core.compat["common/components/Tooltip"];var _=t.n(g),w=function(t){function o(){return t.apply(this,arguments)||this}h(o,t);var e=o.prototype;return e.oncreate=function(o){t.prototype.oncreate.call(this,o)},e.view=function(){var t=m("button",{className:"Button Button--icon Button--link",type:"button","data-hotkey":this.attrs.hotkey,onkeydown:this.keydown.bind(this),onclick:this.attrs.onclick},v()(this.attrs.icon));return this.attrs.title?m(_(),{text:this.attrs.title},t):t},e.keydown=function(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.element.click())},o}(y());const O=flarum.core.compat["common/utils/ItemList"];var T=t.n(O),P=navigator.userAgent.match(/Macintosh/)?"โŒ˜":"ctrl",S={header:{prefix:"### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},image:{prefix:"![",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},unordered_list:{prefix:"- ",multiline:!0,surroundWithNewlines:!0},ordered_list:{prefix:"1. ",multiline:!0,orderedList:!0},spoiler:{prefix:">!",suffix:"!<",blockPrefix:">! ",multiline:!0,trimFirst:!0}},j=function(t,o){f()(o.el,S[t])};function I(t,o,e){return function(r){r.key===o&&(r.metaKey&&"โŒ˜"===P||r.ctrlKey&&"ctrl"===P)&&(r.preventDefault(),j(t,e))}}function F(t){var o=this,e="function"==typeof t?t():new(T());function r(t,o){return n().translator.trans("flarum-markdown.lib.composer."+t+"_tooltip")+(o?" <"+P+"-"+o+">":"")}var i=function(t){return function(){return j(t,o.attrs.composer.editor)}};return e.add("header",m(w,{title:r("header"),icon:"fas fa-heading",onclick:i("header")}),1e3),e.add("bold",m(w,{title:r("bold","b"),icon:"fas fa-bold",onclick:i("bold")}),900),e.add("italic",m(w,{title:r("italic","i"),icon:"fas fa-italic",onclick:i("italic")}),800),e.add("strikethrough",m(w,{title:r("strikethrough"),icon:"fas fa-strikethrough",onclick:i("strikethrough")}),700),e.add("quote",m(w,{title:r("quote"),icon:"fas fa-quote-left",onclick:i("quote")}),600),e.add("spoiler",m(w,{title:r("spoiler"),icon:"fas fa-exclamation-triangle",onclick:i("spoiler")}),500),e.add("code",m(w,{title:r("code"),icon:"fas fa-code",onclick:i("code")}),400),e.add("link",m(w,{title:r("link"),icon:"fas fa-link",onclick:i("link")}),300),e.add("image",m(w,{title:r("image"),icon:"fas fa-image",onclick:i("image")}),200),e.add("unordered_list",m(w,{title:r("unordered_list"),icon:"fas fa-list-ul",onclick:i("unordered_list")}),100),e.add("ordered_list",m(w,{title:r("ordered_list"),icon:"fas fa-list-ol",onclick:i("ordered_list")}),0),e}r().initializers.add("flarum-markdown",(function(t){(0,a.extend)(d().prototype,"keyHandlers",(function(t){t.add("bold",I("bold","b",this)),t.add("italic",I("italic","i",this))})),l().prototype.markdownToolbarItems?(0,a.override)(l().prototype,"markdownToolbarItems",F):l().prototype.markdownToolbarItems=F,(0,a.extend)(l().prototype,"toolbarItems",(function(t){t.add("markdown",m(b,{for:this.textareaId,setShortcutHandler:function(t){return shortcutHandler=t}},this.markdownToolbarItems().toArray()),100)}))}))})(),module.exports=o})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/markdown/js/dist/admin.js.map b/extensions/markdown/js/dist/admin.js.map index 6105f5f4cd..6d75522d22 100644 --- a/extensions/markdown/js/dist/admin.js.map +++ b/extensions/markdown/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,c,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iBC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Y,MAAO6C,EAAQ,gBAAiB9C,KAAK,iBAAiBD,QAASkD,EAAe,kBAAqB,GAEtIL,CACT,CChFAI,IAAAA,aAAAA,IAAqB,mBDkFd,SAAoBA,IACzBK,EAAAA,EAAAA,QAAOC,IAAAA,UAA6B,eAAe,SAAUV,GAC3DA,EAAMQ,IAAI,OAAQd,EAAa,OAAQ,IAAK5C,OAC5CkD,EAAMQ,IAAI,SAAUd,EAAa,SAAU,IAAK5C,MAClD,IAEI6D,IAAAA,UAAAA,sBACFC,EAAAA,EAAAA,UAASD,IAAAA,UAAsB,uBAAwBb,GAEvDa,IAAAA,UAAAA,qBAA4Cb,GAG9CW,EAAAA,EAAAA,QAAOE,IAAAA,UAAsB,gBAAgB,SAAUX,GACrDA,EAAMQ,IACJ,WACA,EAACrE,EAAe,CAAC0E,IAAK/D,KAAKgE,WAAYC,mBAAoB,SAACC,GAAO,OAAMC,gBAAkBD,CAAO,GAC/FlE,KAAKgD,uBAAuBoB,WAE/B,IAEJ,GACF,G","sources":["webpack://@flarum/markdown/webpack/bootstrap","webpack://@flarum/markdown/webpack/runtime/compat get default export","webpack://@flarum/markdown/webpack/runtime/define property getters","webpack://@flarum/markdown/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/markdown/webpack/runtime/make namespace object","webpack://@flarum/markdown/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/BasicEditorDriver']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/styleSelectedText']\"","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/markdown/./src/common/components/MarkdownToolbar.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/markdown/./src/common/components/MarkdownButton.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/markdown/./src/common/index.js","webpack://@flarum/markdown/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/BasicEditorDriver'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/styleSelectedText'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\n\nexport default class MarkdownToolbar extends Component {\n view(vnode) {\n return
{vnode.children}
;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class MarkdownButton extends Component {\n oncreate(vnode) {\n super.oncreate(vnode);\n }\n\n view() {\n const button = (\n \n {icon(this.attrs.icon)}\n \n );\n\n if (this.attrs.title) {\n return {button};\n }\n\n return button;\n }\n\n keydown(event) {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.element.click();\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","/*!\n * Includes modified code from GitHub Markdown Toolbar Element\n * https://github.com/github/markdown-toolbar-element/\n *\n * Original Copyright GitHub, Inc.\n * Released under the MIT license\n * https://github.com/github/markdown-toolbar-element/blob/master/LICENSE\n */\n\nimport app from 'flarum/common/app';\nimport { extend, override } from 'flarum/common/extend';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport BasicEditorDriver from 'flarum/common/utils/BasicEditorDriver';\nimport styleSelectedText from 'flarum/common/utils/styleSelectedText';\n\nimport MarkdownToolbar from './components/MarkdownToolbar';\nimport MarkdownButton from './components/MarkdownButton';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nconst modifierKey = navigator.userAgent.match(/Macintosh/) ? 'โŒ˜' : 'ctrl';\n\nconst styles = {\n header: { prefix: '### ' },\n bold: { prefix: '**', suffix: '**', trimFirst: true },\n italic: { prefix: '_', suffix: '_', trimFirst: true },\n strikethrough: { prefix: '~~', suffix: '~~', trimFirst: true },\n quote: { prefix: '> ', multiline: true, surroundWithNewlines: true },\n code: { prefix: '`', suffix: '`', blockPrefix: '```', blockSuffix: '```' },\n link: { prefix: '[', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n image: { prefix: '![', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n unordered_list: { prefix: '- ', multiline: true, surroundWithNewlines: true },\n ordered_list: { prefix: '1. ', multiline: true, orderedList: true },\n spoiler: { prefix: '>!', suffix: '!<', blockPrefix: '>! ', multiline: true, trimFirst: true },\n};\n\nconst applyStyle = (id, editorDriver) => {\n // This is a nasty hack that breaks encapsulation of the editor.\n // In future releases, we'll need to tweak the editor driver interface\n // to support triggering events like this.\n styleSelectedText(editorDriver.el, styles[id]);\n};\n\nfunction makeShortcut(id, key, editorDriver) {\n return function (e) {\n if (e.key === key && ((e.metaKey && modifierKey === 'โŒ˜') || (e.ctrlKey && modifierKey === 'ctrl'))) {\n e.preventDefault();\n applyStyle(id, editorDriver);\n }\n };\n}\n\nfunction markdownToolbarItems(oldFunc) {\n const items = typeof oldFunc === 'function' ? oldFunc() : new ItemList();\n\n function tooltip(name, hotkey) {\n return app.translator.trans(`flarum-markdown.lib.composer.${name}_tooltip`) + (hotkey ? ` <${modifierKey}-${hotkey}>` : '');\n }\n\n const makeApplyStyle = (id) => {\n return () => applyStyle(id, this.attrs.composer.editor);\n };\n\n items.add('header', , 1000);\n items.add('bold', , 900);\n items.add('italic', , 800);\n items.add(\n 'strikethrough',\n ,\n 700\n );\n items.add('quote', , 600);\n items.add('spoiler', , 500);\n items.add('code', , 400);\n items.add('link', , 300);\n items.add('image', , 200);\n items.add(\n 'unordered_list',\n ,\n 100\n );\n items.add('ordered_list', , 0);\n\n return items;\n}\n\nexport function initialize(app) {\n extend(BasicEditorDriver.prototype, 'keyHandlers', function (items) {\n items.add('bold', makeShortcut('bold', 'b', this));\n items.add('italic', makeShortcut('italic', 'i', this));\n });\n\n if (TextEditor.prototype.markdownToolbarItems) {\n override(TextEditor.prototype, 'markdownToolbarItems', markdownToolbarItems);\n } else {\n TextEditor.prototype.markdownToolbarItems = markdownToolbarItems;\n }\n\n extend(TextEditor.prototype, 'toolbarItems', function (items) {\n items.add(\n 'markdown',\n (shortcutHandler = handler)}>\n {this.markdownToolbarItems().toArray()}\n ,\n 100\n );\n });\n}\n","import app from 'flarum/admin/app';\nimport { initialize } from '../common/index';\n\napp.initializers.add('flarum-markdown', initialize);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","MarkdownToolbar","view","vnode","class","children","Component","MarkdownButton","oncreate","button","className","type","this","attrs","hotkey","onkeydown","keydown","onclick","icon","title","text","event","preventDefault","element","click","modifierKey","navigator","userAgent","match","styles","header","prefix","bold","suffix","trimFirst","italic","strikethrough","quote","multiline","surroundWithNewlines","code","blockPrefix","blockSuffix","link","replaceNext","scanFor","image","unordered_list","ordered_list","orderedList","spoiler","applyStyle","id","editorDriver","styleSelectedText","el","makeShortcut","e","metaKey","ctrlKey","markdownToolbarItems","oldFunc","items","ItemList","tooltip","name","app","makeApplyStyle","composer","editor","add","extend","BasicEditorDriver","TextEditor","override","for","textareaId","setShortcutHandler","handler","shortcutHandler","toArray"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5B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ack/runtime/compat get default export","webpack://@flarum/markdown/webpack/runtime/define property getters","webpack://@flarum/markdown/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/markdown/webpack/runtime/make namespace object","webpack://@flarum/markdown/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/BasicEditorDriver']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/styleSelectedText']\"","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/markdown/./src/common/components/MarkdownToolbar.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/markdown/./src/common/components/MarkdownButton.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/markdown/./src/common/index.js","webpack://@flarum/markdown/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/BasicEditorDriver'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/styleSelectedText'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\n\nexport default class MarkdownToolbar extends Component {\n view(vnode) {\n return
{vnode.children}
;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class MarkdownButton extends Component {\n oncreate(vnode) {\n super.oncreate(vnode);\n }\n\n view() {\n const button = (\n \n {icon(this.attrs.icon)}\n \n );\n\n if (this.attrs.title) {\n return {button};\n }\n\n return button;\n }\n\n keydown(event) {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.element.click();\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","/*!\n * Includes modified code from GitHub Markdown Toolbar Element\n * https://github.com/github/markdown-toolbar-element/\n *\n * Original Copyright GitHub, Inc.\n * Released under the MIT license\n * https://github.com/github/markdown-toolbar-element/blob/master/LICENSE\n */\n\nimport app from 'flarum/common/app';\nimport { extend, override } from 'flarum/common/extend';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport BasicEditorDriver from 'flarum/common/utils/BasicEditorDriver';\nimport styleSelectedText from 'flarum/common/utils/styleSelectedText';\n\nimport MarkdownToolbar from './components/MarkdownToolbar';\nimport MarkdownButton from './components/MarkdownButton';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nconst modifierKey = navigator.userAgent.match(/Macintosh/) ? 'โŒ˜' : 'ctrl';\n\nconst styles = {\n header: { prefix: '### ' },\n bold: { prefix: '**', suffix: '**', trimFirst: true },\n italic: { prefix: '_', suffix: '_', trimFirst: true },\n strikethrough: { prefix: '~~', suffix: '~~', trimFirst: true },\n quote: { prefix: '> ', multiline: true, surroundWithNewlines: true },\n code: { prefix: '`', suffix: '`', blockPrefix: '```', blockSuffix: '```' },\n link: { prefix: '[', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n image: { prefix: '![', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n unordered_list: { prefix: '- ', multiline: true, surroundWithNewlines: true },\n ordered_list: { prefix: '1. ', multiline: true, orderedList: true },\n spoiler: { prefix: '>!', suffix: '!<', blockPrefix: '>! ', multiline: true, trimFirst: true },\n};\n\nconst applyStyle = (id, editorDriver) => {\n // This is a nasty hack that breaks encapsulation of the editor.\n // In future releases, we'll need to tweak the editor driver interface\n // to support triggering events like this.\n styleSelectedText(editorDriver.el, styles[id]);\n};\n\nfunction makeShortcut(id, key, editorDriver) {\n return function (e) {\n if (e.key === key && ((e.metaKey && modifierKey === 'โŒ˜') || (e.ctrlKey && modifierKey === 'ctrl'))) {\n e.preventDefault();\n applyStyle(id, editorDriver);\n }\n };\n}\n\nfunction markdownToolbarItems(oldFunc) {\n const items = typeof oldFunc === 'function' ? oldFunc() : new ItemList();\n\n function tooltip(name, hotkey) {\n return app.translator.trans(`flarum-markdown.lib.composer.${name}_tooltip`) + (hotkey ? ` <${modifierKey}-${hotkey}>` : '');\n }\n\n const makeApplyStyle = (id) => {\n return () => applyStyle(id, this.attrs.composer.editor);\n };\n\n items.add('header', , 1000);\n items.add('bold', , 900);\n items.add('italic', , 800);\n items.add(\n 'strikethrough',\n ,\n 700\n );\n items.add('quote', , 600);\n items.add('spoiler', , 500);\n items.add('code', , 400);\n items.add('link', , 300);\n items.add('image', , 200);\n items.add(\n 'unordered_list',\n ,\n 100\n );\n items.add('ordered_list', , 0);\n\n return items;\n}\n\nexport function initialize(app) {\n extend(BasicEditorDriver.prototype, 'keyHandlers', function (items) {\n items.add('bold', makeShortcut('bold', 'b', this));\n items.add('italic', makeShortcut('italic', 'i', this));\n });\n\n if (TextEditor.prototype.markdownToolbarItems) {\n override(TextEditor.prototype, 'markdownToolbarItems', markdownToolbarItems);\n } else {\n TextEditor.prototype.markdownToolbarItems = markdownToolbarItems;\n }\n\n extend(TextEditor.prototype, 'toolbarItems', function (items) {\n items.add(\n 'markdown',\n (shortcutHandler = handler)}>\n {this.markdownToolbarItems().toArray()}\n ,\n 100\n );\n });\n}\n","import app from 'flarum/admin/app';\nimport { initialize } from '../common/index';\n\napp.initializers.add('flarum-markdown', initialize);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","MarkdownToolbar","view","vnode","className","children","Component","MarkdownButton","oncreate","button","type","this","attrs","hotkey","onkeydown","keydown","onclick","icon","title","text","event","preventDefault","element","click","modifierKey","navigator","userAgent","match","styles","header","prefix","bold","suffix","trimFirst","italic","strikethrough","quote","multiline","surroundWithNewlines","code","blockPrefix","blockSuffix","link","replaceNext","scanFor","image","unordered_list","ordered_list","orderedList","spoiler","applyStyle","id","editorDriver","styleSelectedText","el","makeShortcut","e","metaKey","ctrlKey","markdownToolbarItems","oldFunc","items","ItemList","tooltip","name","app","makeApplyStyle","composer","editor","add","extend","BasicEditorDriver","TextEditor","override","for","textareaId","setShortcutHandler","handler","shortcutHandler","toArray"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/markdown/js/dist/forum.js b/extensions/markdown/js/dist/forum.js index c4c1943e7e..af881fffbc 100644 --- a/extensions/markdown/js/dist/forum.js +++ b/extensions/markdown/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var r in e)t.o(e,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);const e=flarum.core.compat["forum/app"];var r=t.n(e);const i=flarum.core.compat["common/app"];var n=t.n(i);const a=flarum.core.compat["common/extend"],c=flarum.core.compat["common/components/TextEditor"];var l=t.n(c);const s=flarum.core.compat["common/utils/BasicEditorDriver"];var d=t.n(s);const u=flarum.core.compat["common/utils/styleSelectedText"];var f=t.n(u);function p(t,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},p(t,o)}function h(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,p(t,o)}const k=flarum.core.compat["common/Component"];var y=t.n(k),b=function(t){function o(){return t.apply(this,arguments)||this}return h(o,t),o.prototype.view=function(t){return m("div",{class:"MarkdownToolbar"},t.children)},o}(y());const x=flarum.core.compat["common/helpers/icon"];var v=t.n(x);const g=flarum.core.compat["common/components/Tooltip"];var _=t.n(g),w=function(t){function o(){return t.apply(this,arguments)||this}h(o,t);var e=o.prototype;return e.oncreate=function(o){t.prototype.oncreate.call(this,o)},e.view=function(){var t=m("button",{className:"Button Button--icon Button--link",type:"button","data-hotkey":this.attrs.hotkey,onkeydown:this.keydown.bind(this),onclick:this.attrs.onclick},v()(this.attrs.icon));return this.attrs.title?m(_(),{text:this.attrs.title},t):t},e.keydown=function(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.element.click())},o}(y());const O=flarum.core.compat["common/utils/ItemList"];var T=t.n(O),P=navigator.userAgent.match(/Macintosh/)?"โŒ˜":"ctrl",S={header:{prefix:"### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},image:{prefix:"![",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},unordered_list:{prefix:"- ",multiline:!0,surroundWithNewlines:!0},ordered_list:{prefix:"1. ",multiline:!0,orderedList:!0},spoiler:{prefix:">!",suffix:"!<",blockPrefix:">! ",multiline:!0,trimFirst:!0}},j=function(t,o){f()(o.el,S[t])};function I(t,o,e){return function(r){r.key===o&&(r.metaKey&&"โŒ˜"===P||r.ctrlKey&&"ctrl"===P)&&(r.preventDefault(),j(t,e))}}function F(t){var o=this,e="function"==typeof t?t():new(T());function r(t,o){return n().translator.trans("flarum-markdown.lib.composer."+t+"_tooltip")+(o?" <"+P+"-"+o+">":"")}var i=function(t){return function(){return j(t,o.attrs.composer.editor)}};return e.add("header",m(w,{title:r("header"),icon:"fas fa-heading",onclick:i("header")}),1e3),e.add("bold",m(w,{title:r("bold","b"),icon:"fas fa-bold",onclick:i("bold")}),900),e.add("italic",m(w,{title:r("italic","i"),icon:"fas fa-italic",onclick:i("italic")}),800),e.add("strikethrough",m(w,{title:r("strikethrough"),icon:"fas fa-strikethrough",onclick:i("strikethrough")}),700),e.add("quote",m(w,{title:r("quote"),icon:"fas fa-quote-left",onclick:i("quote")}),600),e.add("spoiler",m(w,{title:r("spoiler"),icon:"fas fa-exclamation-triangle",onclick:i("spoiler")}),500),e.add("code",m(w,{title:r("code"),icon:"fas fa-code",onclick:i("code")}),400),e.add("link",m(w,{title:r("link"),icon:"fas fa-link",onclick:i("link")}),300),e.add("image",m(w,{title:r("image"),icon:"fas fa-image",onclick:i("image")}),200),e.add("unordered_list",m(w,{title:r("unordered_list"),icon:"fas fa-list-ul",onclick:i("unordered_list")}),100),e.add("ordered_list",m(w,{title:r("ordered_list"),icon:"fas fa-list-ol",onclick:i("ordered_list")}),0),e}r().initializers.add("flarum-markdown",(function(t){(0,a.extend)(d().prototype,"keyHandlers",(function(t){t.add("bold",I("bold","b",this)),t.add("italic",I("italic","i",this))})),l().prototype.markdownToolbarItems?(0,a.override)(l().prototype,"markdownToolbarItems",F):l().prototype.markdownToolbarItems=F,(0,a.extend)(l().prototype,"toolbarItems",(function(t){t.add("markdown",m(b,{for:this.textareaId,setShortcutHandler:function(t){return shortcutHandler=t}},this.markdownToolbarItems().toArray()),100)}))}))})(),module.exports=o})(); +(()=>{var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var r in e)t.o(e,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);const e=flarum.core.compat["forum/app"];var r=t.n(e);const i=flarum.core.compat["common/app"];var n=t.n(i);const a=flarum.core.compat["common/extend"],c=flarum.core.compat["common/components/TextEditor"];var l=t.n(c);const s=flarum.core.compat["common/utils/BasicEditorDriver"];var d=t.n(s);const u=flarum.core.compat["common/utils/styleSelectedText"];var f=t.n(u);function p(t,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},p(t,o)}function h(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,p(t,o)}const k=flarum.core.compat["common/Component"];var y=t.n(k),b=function(t){function o(){return t.apply(this,arguments)||this}return h(o,t),o.prototype.view=function(t){return m("div",{className:"MarkdownToolbar"},t.children)},o}(y());const x=flarum.core.compat["common/helpers/icon"];var v=t.n(x);const g=flarum.core.compat["common/components/Tooltip"];var _=t.n(g),w=function(t){function o(){return t.apply(this,arguments)||this}h(o,t);var e=o.prototype;return e.oncreate=function(o){t.prototype.oncreate.call(this,o)},e.view=function(){var t=m("button",{className:"Button Button--icon Button--link",type:"button","data-hotkey":this.attrs.hotkey,onkeydown:this.keydown.bind(this),onclick:this.attrs.onclick},v()(this.attrs.icon));return this.attrs.title?m(_(),{text:this.attrs.title},t):t},e.keydown=function(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.element.click())},o}(y());const O=flarum.core.compat["common/utils/ItemList"];var T=t.n(O),P=navigator.userAgent.match(/Macintosh/)?"โŒ˜":"ctrl",S={header:{prefix:"### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},image:{prefix:"![",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},unordered_list:{prefix:"- ",multiline:!0,surroundWithNewlines:!0},ordered_list:{prefix:"1. ",multiline:!0,orderedList:!0},spoiler:{prefix:">!",suffix:"!<",blockPrefix:">! ",multiline:!0,trimFirst:!0}},j=function(t,o){f()(o.el,S[t])};function I(t,o,e){return function(r){r.key===o&&(r.metaKey&&"โŒ˜"===P||r.ctrlKey&&"ctrl"===P)&&(r.preventDefault(),j(t,e))}}function F(t){var o=this,e="function"==typeof t?t():new(T());function r(t,o){return n().translator.trans("flarum-markdown.lib.composer."+t+"_tooltip")+(o?" <"+P+"-"+o+">":"")}var i=function(t){return function(){return j(t,o.attrs.composer.editor)}};return e.add("header",m(w,{title:r("header"),icon:"fas fa-heading",onclick:i("header")}),1e3),e.add("bold",m(w,{title:r("bold","b"),icon:"fas fa-bold",onclick:i("bold")}),900),e.add("italic",m(w,{title:r("italic","i"),icon:"fas fa-italic",onclick:i("italic")}),800),e.add("strikethrough",m(w,{title:r("strikethrough"),icon:"fas fa-strikethrough",onclick:i("strikethrough")}),700),e.add("quote",m(w,{title:r("quote"),icon:"fas fa-quote-left",onclick:i("quote")}),600),e.add("spoiler",m(w,{title:r("spoiler"),icon:"fas fa-exclamation-triangle",onclick:i("spoiler")}),500),e.add("code",m(w,{title:r("code"),icon:"fas fa-code",onclick:i("code")}),400),e.add("link",m(w,{title:r("link"),icon:"fas fa-link",onclick:i("link")}),300),e.add("image",m(w,{title:r("image"),icon:"fas fa-image",onclick:i("image")}),200),e.add("unordered_list",m(w,{title:r("unordered_list"),icon:"fas fa-list-ul",onclick:i("unordered_list")}),100),e.add("ordered_list",m(w,{title:r("ordered_list"),icon:"fas fa-list-ol",onclick:i("ordered_list")}),0),e}r().initializers.add("flarum-markdown",(function(t){(0,a.extend)(d().prototype,"keyHandlers",(function(t){t.add("bold",I("bold","b",this)),t.add("italic",I("italic","i",this))})),l().prototype.markdownToolbarItems?(0,a.override)(l().prototype,"markdownToolbarItems",F):l().prototype.markdownToolbarItems=F,(0,a.extend)(l().prototype,"toolbarItems",(function(t){t.add("markdown",m(b,{for:this.textareaId,setShortcutHandler:function(t){return shortcutHandler=t}},this.markdownToolbarItems().toArray()),100)}))}))})(),module.exports=o})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/markdown/js/dist/forum.js.map b/extensions/markdown/js/dist/forum.js.map index 838157c933..5ae674c6b2 100644 --- a/extensions/markdown/js/dist/forum.js.map +++ b/extensions/markdown/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,c,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,kC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,kC,aCAzC,SAASC,EAAgBhB,EAAGiB,GAKzC,OAJAD,EAAkBf,OAAO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A,EAAMQ,IAAI,OAAQd,EAAa,OAAQ,IAAK5C,OAC5CkD,EAAMQ,IAAI,SAAUd,EAAa,SAAU,IAAK5C,MAClD,IAEI6D,IAAAA,UAAAA,sBACFC,EAAAA,EAAAA,UAASD,IAAAA,UAAsB,uBAAwBb,GAEvDa,IAAAA,UAAAA,qBAA4Cb,GAG9CW,EAAAA,EAAAA,QAAOE,IAAAA,UAAsB,gBAAgB,SAAUX,GACrDA,EAAMQ,IACJ,WACA,EAACrE,EAAe,CAAC0E,IAAK/D,KAAKgE,WAAYC,mBAAoB,SAACC,GAAO,OAAMC,gBAAkBD,CAAO,GAC/FlE,KAAKgD,uBAAuBoB,WAE/B,IAEJ,GACF,G","sources":["webpack://@flarum/markdown/webpack/bootstrap","webpack://@flarum/markdown/webpack/runtime/compat get default export","webpack://@flarum/markdown/webpack/runtime/define property getters","webpack://@flarum/markdown/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/markdown/webpack/runtime/make namespace object","webpack://@flarum/markdown/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/BasicEditorDriver']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/styleSelectedText']\"","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/markdown/./src/common/components/MarkdownToolbar.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/markdown/./src/common/components/MarkdownButton.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/markdown/./src/common/index.js","webpack://@flarum/markdown/./src/forum/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/BasicEditorDriver'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/styleSelectedText'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\n\nexport default class MarkdownToolbar extends Component {\n view(vnode) {\n return
{vnode.children}
;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class MarkdownButton extends Component {\n oncreate(vnode) {\n super.oncreate(vnode);\n }\n\n view() {\n const button = (\n \n {icon(this.attrs.icon)}\n \n );\n\n if (this.attrs.title) {\n return {button};\n }\n\n return button;\n }\n\n keydown(event) {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.element.click();\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","/*!\n * Includes modified code from GitHub Markdown Toolbar Element\n * https://github.com/github/markdown-toolbar-element/\n *\n * Original Copyright GitHub, Inc.\n * Released under the MIT license\n * https://github.com/github/markdown-toolbar-element/blob/master/LICENSE\n */\n\nimport app from 'flarum/common/app';\nimport { extend, override } from 'flarum/common/extend';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport BasicEditorDriver from 'flarum/common/utils/BasicEditorDriver';\nimport styleSelectedText from 'flarum/common/utils/styleSelectedText';\n\nimport MarkdownToolbar from './components/MarkdownToolbar';\nimport MarkdownButton from './components/MarkdownButton';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nconst modifierKey = navigator.userAgent.match(/Macintosh/) ? 'โŒ˜' : 'ctrl';\n\nconst styles = {\n header: { prefix: '### ' },\n bold: { prefix: '**', suffix: '**', trimFirst: true },\n italic: { prefix: '_', suffix: '_', trimFirst: true },\n strikethrough: { prefix: '~~', suffix: '~~', trimFirst: true },\n quote: { prefix: '> ', multiline: true, surroundWithNewlines: true },\n code: { prefix: '`', suffix: '`', blockPrefix: '```', blockSuffix: '```' },\n link: { prefix: '[', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n image: { prefix: '![', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n unordered_list: { prefix: '- ', multiline: true, surroundWithNewlines: true },\n ordered_list: { prefix: '1. ', multiline: true, orderedList: true },\n spoiler: { prefix: '>!', suffix: '!<', blockPrefix: '>! ', multiline: true, trimFirst: true },\n};\n\nconst applyStyle = (id, editorDriver) => {\n // This is a nasty hack that breaks encapsulation of the editor.\n // In future releases, we'll need to tweak the editor driver interface\n // to support triggering events like this.\n styleSelectedText(editorDriver.el, styles[id]);\n};\n\nfunction makeShortcut(id, key, editorDriver) {\n return function (e) {\n if (e.key === key && ((e.metaKey && modifierKey === 'โŒ˜') || (e.ctrlKey && modifierKey === 'ctrl'))) {\n e.preventDefault();\n applyStyle(id, editorDriver);\n }\n };\n}\n\nfunction markdownToolbarItems(oldFunc) {\n const items = typeof oldFunc === 'function' ? oldFunc() : new ItemList();\n\n function tooltip(name, hotkey) {\n return app.translator.trans(`flarum-markdown.lib.composer.${name}_tooltip`) + (hotkey ? ` <${modifierKey}-${hotkey}>` : '');\n }\n\n const makeApplyStyle = (id) => {\n return () => applyStyle(id, this.attrs.composer.editor);\n };\n\n items.add('header', , 1000);\n items.add('bold', , 900);\n items.add('italic', , 800);\n items.add(\n 'strikethrough',\n ,\n 700\n );\n items.add('quote', , 600);\n items.add('spoiler', , 500);\n items.add('code', , 400);\n items.add('link', , 300);\n items.add('image', , 200);\n items.add(\n 'unordered_list',\n ,\n 100\n );\n items.add('ordered_list', , 0);\n\n return items;\n}\n\nexport function initialize(app) {\n extend(BasicEditorDriver.prototype, 'keyHandlers', function (items) {\n items.add('bold', makeShortcut('bold', 'b', this));\n items.add('italic', makeShortcut('italic', 'i', this));\n });\n\n if (TextEditor.prototype.markdownToolbarItems) {\n override(TextEditor.prototype, 'markdownToolbarItems', markdownToolbarItems);\n } else {\n TextEditor.prototype.markdownToolbarItems = markdownToolbarItems;\n }\n\n extend(TextEditor.prototype, 'toolbarItems', function (items) {\n items.add(\n 'markdown',\n (shortcutHandler = handler)}>\n {this.markdownToolbarItems().toArray()}\n ,\n 100\n );\n });\n}\n","import app from 'flarum/forum/app';\nimport { initialize } from '../common/index';\n\napp.initializers.add('flarum-markdown', initialize);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","MarkdownToolbar","view","vnode","class","children","Component","MarkdownButton","oncreate","button","className","type","this","attrs","hotkey","onkeydown","keydown","onclick","icon","title","text","event","preventDefault","element","click","modifierKey","navigator","userAgent","match","styles","header","prefix","bold","suffix","trimFirst","italic","strikethrough","quote","multiline","surroundWithNewlines","code","blockPrefix","blockSuffix","link","replaceNext","scanFor","image","unordered_list","ordered_list","orderedList","spoiler","applyStyle","id","editorDriver","styleSelectedText","el","makeShortcut","e","metaKey","ctrlKey","markdownToolbarItems","oldFunc","items","ItemList","tooltip","name","app","makeApplyStyle","composer","editor","add","extend","BasicEditorDriver","TextEditor","override","for","textareaId","setShortcutHandler","handler","shortcutHandler","toArray"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,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,KAClHL,EAAMQ,IAAI,OAAQ,EAAC9D,EAAc,CAACW,MAAO6C,EAAQ,QAAS9C,KAAK,cAAcD,QAASkD,EAAe,UAAa,KAClHL,EAAMQ,IAAI,QAAS,EAAC9D,EAAc,CAACW,MAAO6C,EAAQ,SAAU9C,KAAK,eAAeD,QAASkD,EAAe,WAAc,KACtHL,EAAMQ,IACJ,iBACA,EAAC9D,EAAc,CAACW,MAAO6C,EAAQ,kBAAmB9C,KAAK,iBAAiBD,QAASkD,EAAe,oBAChG,KAEFL,EAAMQ,IAAI,eAAgB,EAAC9D,EAAc,CAACW,MAAO6C,EAAQ,gBAAiB9C,KAAK,iBAAiBD,QAASkD,EAAe,kBAAqB,GAEtIL,CACT,CChFAI,IAAAA,aAAAA,IAAqB,mBDkFd,SAAoBA,IACzBK,EAAAA,EAAAA,QAAOC,IAAAA,UAA6B,eAAe,SAAUV,GAC3DA,EAAMQ,IAAI,OAAQd,EAAa,OAAQ,IAAK5C,OAC5CkD,EAAMQ,IAAI,SAAUd,EAAa,SAAU,IAAK5C,MAClD,IAEI6D,IAAAA,UAAAA,sBACFC,EAAAA,EAAAA,UAASD,IAAAA,UAAsB,uBAAwBb,GAEvDa,IAAAA,UAAAA,qBAA4Cb,GAG9CW,EAAAA,EAAAA,QAAOE,IAAAA,UAAsB,gBAAgB,SAAUX,GACrDA,EAAMQ,IACJ,WACA,EAACpE,EAAe,CAACyE,IAAK/D,KAAKgE,WAAYC,mBAAoB,SAACC,GAAO,OAAMC,gBAAkBD,CAAO,GAC/FlE,KAAKgD,uBAAuBoB,WAE/B,IAEJ,GACF,G","sources":["webpack://@flarum/markdown/webpack/bootstrap","webpack://@flarum/markdown/webpack/runtime/compat get default export","webpack://@flarum/markdown/webpack/runtime/define property getters","webpack://@flarum/markdown/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/markdown/webpack/runtime/make namespace object","webpack://@flarum/markdown/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/BasicEditorDriver']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/styleSelectedText']\"","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/markdown/./src/common/components/MarkdownToolbar.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/markdown/./src/common/components/MarkdownButton.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/markdown/./src/common/index.js","webpack://@flarum/markdown/./src/forum/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/BasicEditorDriver'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/styleSelectedText'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\n\nexport default class MarkdownToolbar extends Component {\n view(vnode) {\n return
{vnode.children}
;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class MarkdownButton extends Component {\n oncreate(vnode) {\n super.oncreate(vnode);\n }\n\n view() {\n const button = (\n \n {icon(this.attrs.icon)}\n \n );\n\n if (this.attrs.title) {\n return {button};\n }\n\n return button;\n }\n\n keydown(event) {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.element.click();\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","/*!\n * Includes modified code from GitHub Markdown Toolbar Element\n * https://github.com/github/markdown-toolbar-element/\n *\n * Original Copyright GitHub, Inc.\n * Released under the MIT license\n * https://github.com/github/markdown-toolbar-element/blob/master/LICENSE\n */\n\nimport app from 'flarum/common/app';\nimport { extend, override } from 'flarum/common/extend';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport BasicEditorDriver from 'flarum/common/utils/BasicEditorDriver';\nimport styleSelectedText from 'flarum/common/utils/styleSelectedText';\n\nimport MarkdownToolbar from './components/MarkdownToolbar';\nimport MarkdownButton from './components/MarkdownButton';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nconst modifierKey = navigator.userAgent.match(/Macintosh/) ? 'โŒ˜' : 'ctrl';\n\nconst styles = {\n header: { prefix: '### ' },\n bold: { prefix: '**', suffix: '**', trimFirst: true },\n italic: { prefix: '_', suffix: '_', trimFirst: true },\n strikethrough: { prefix: '~~', suffix: '~~', trimFirst: true },\n quote: { prefix: '> ', multiline: true, surroundWithNewlines: true },\n code: { prefix: '`', suffix: '`', blockPrefix: '```', blockSuffix: '```' },\n link: { prefix: '[', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n image: { prefix: '![', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n unordered_list: { prefix: '- ', multiline: true, surroundWithNewlines: true },\n ordered_list: { prefix: '1. ', multiline: true, orderedList: true },\n spoiler: { prefix: '>!', suffix: '!<', blockPrefix: '>! ', multiline: true, trimFirst: true },\n};\n\nconst applyStyle = (id, editorDriver) => {\n // This is a nasty hack that breaks encapsulation of the editor.\n // In future releases, we'll need to tweak the editor driver interface\n // to support triggering events like this.\n styleSelectedText(editorDriver.el, styles[id]);\n};\n\nfunction makeShortcut(id, key, editorDriver) {\n return function (e) {\n if (e.key === key && ((e.metaKey && modifierKey === 'โŒ˜') || (e.ctrlKey && modifierKey === 'ctrl'))) {\n e.preventDefault();\n applyStyle(id, editorDriver);\n }\n };\n}\n\nfunction markdownToolbarItems(oldFunc) {\n const items = typeof oldFunc === 'function' ? oldFunc() : new ItemList();\n\n function tooltip(name, hotkey) {\n return app.translator.trans(`flarum-markdown.lib.composer.${name}_tooltip`) + (hotkey ? ` <${modifierKey}-${hotkey}>` : '');\n }\n\n const makeApplyStyle = (id) => {\n return () => applyStyle(id, this.attrs.composer.editor);\n };\n\n items.add('header', , 1000);\n items.add('bold', , 900);\n items.add('italic', , 800);\n items.add(\n 'strikethrough',\n ,\n 700\n );\n items.add('quote', , 600);\n items.add('spoiler', , 500);\n items.add('code', , 400);\n items.add('link', , 300);\n items.add('image', , 200);\n items.add(\n 'unordered_list',\n ,\n 100\n );\n items.add('ordered_list', , 0);\n\n return items;\n}\n\nexport function initialize(app) {\n extend(BasicEditorDriver.prototype, 'keyHandlers', function (items) {\n items.add('bold', makeShortcut('bold', 'b', this));\n items.add('italic', makeShortcut('italic', 'i', this));\n });\n\n if (TextEditor.prototype.markdownToolbarItems) {\n override(TextEditor.prototype, 'markdownToolbarItems', markdownToolbarItems);\n } else {\n TextEditor.prototype.markdownToolbarItems = markdownToolbarItems;\n }\n\n extend(TextEditor.prototype, 'toolbarItems', function (items) {\n items.add(\n 'markdown',\n (shortcutHandler = handler)}>\n {this.markdownToolbarItems().toArray()}\n ,\n 100\n );\n });\n}\n","import app from 'flarum/forum/app';\nimport { initialize } from '../common/index';\n\napp.initializers.add('flarum-markdown', initialize);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","MarkdownToolbar","view","vnode","className","children","Component","MarkdownButton","oncreate","button","type","this","attrs","hotkey","onkeydown","keydown","onclick","icon","title","text","event","preventDefault","element","click","modifierKey","navigator","userAgent","match","styles","header","prefix","bold","suffix","trimFirst","italic","strikethrough","quote","multiline","surroundWithNewlines","code","blockPrefix","blockSuffix","link","replaceNext","scanFor","image","unordered_list","ordered_list","orderedList","spoiler","applyStyle","id","editorDriver","styleSelectedText","el","makeShortcut","e","metaKey","ctrlKey","markdownToolbarItems","oldFunc","items","ItemList","tooltip","name","app","makeApplyStyle","composer","editor","add","extend","BasicEditorDriver","TextEditor","override","for","textareaId","setShortcutHandler","handler","shortcutHandler","toArray"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/mentions/js/dist/forum.js b/extensions/mentions/js/dist/forum.js index 758f673c64..b694a9e93d 100644 --- a/extensions/mentions/js/dist/forum.js +++ b/extensions/mentions/js/dist/forum.js @@ -1,3 +1,3 @@ /*! For license information please see forum.js.LICENSE.txt */ -(()=>{var t={440:(t,u,e)=>{var n=e(75).default;function r(){"use strict";t.exports=r=function(){return u},t.exports.__esModule=!0,t.exports.default=t.exports;var u={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,u,e){t[u]=e.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",D=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,u,e){return Object.defineProperty(t,u,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[u]}try{l({},"")}catch(t){l=function(t,u,e){return t[u]=e}}function f(t,u,e,n){var r=u&&u.prototype instanceof d?u:d,o=Object.create(r.prototype),s=new M(n||[]);return i(o,"_invoke",{value:g(t,e,s)}),o}function m(t,u,e){try{return{type:"normal",arg:t.call(u,e)}}catch(t){return{type:"throw",arg:t}}}u.wrap=f;var p={};function d(){}function F(){}function h(){}var C={};l(C,a,(function(){return this}));var A=Object.getPrototypeOf,v=A&&A(A(P([])));v&&v!==e&&o.call(v,a)&&(C=v);var E=h.prototype=d.prototype=Object.create(C);function y(t){["next","throw","return"].forEach((function(u){l(t,u,(function(t){return this._invoke(u,t)}))}))}function B(t,u){function e(r,i,s,a){var D=m(t[r],t,i);if("throw"!==D.type){var c=D.arg,l=c.value;return l&&"object"==n(l)&&o.call(l,"__await")?u.resolve(l.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):u.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(D.arg)}var r;i(this,"_invoke",{value:function(t,n){function o(){return new u((function(u,r){e(t,n,u,r)}))}return r=r?r.then(o,o):o()}})}function g(t,u,e){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return{value:void 0,done:!0}}for(e.method=r,e.arg=o;;){var i=e.delegate;if(i){var s=b(i,e);if(s){if(s===p)continue;return s}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var a=m(t,u,e);if("normal"===a.type){if(n=e.done?"completed":"suspendedYield",a.arg===p)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(n="completed",e.method="throw",e.arg=a.arg)}}}function b(t,u){var e=t.iterator[u.method];if(void 0===e){if(u.delegate=null,"throw"===u.method){if(t.iterator.return&&(u.method="return",u.arg=void 0,b(t,u),"throw"===u.method))return p;u.method="throw",u.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=m(e,t.iterator,u.arg);if("throw"===n.type)return u.method="throw",u.arg=n.arg,u.delegate=null,p;var r=n.arg;return r?r.done?(u[t.resultName]=r.value,u.next=t.nextLoc,"return"!==u.method&&(u.method="next",u.arg=void 0),u.delegate=null,p):r:(u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,p)}function w(t){var u={tryLoc:t[0]};1 in t&&(u.catchLoc=t[1]),2 in t&&(u.finallyLoc=t[2],u.afterLoc=t[3]),this.tryEntries.push(u)}function x(t){var u=t.completion||{};u.type="normal",delete u.arg,t.completion=u}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function P(t){if(t){var u=t[a];if(u)return u.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function u(){for(;++e=0;--n){var r=this.tryEntries[n],i=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var s=o.call(r,"catchLoc"),a=o.call(r,"finallyLoc");if(s&&a){if(this.prev=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--u){var e=this.tryEntries[u];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),p}},catch:function(t){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;x(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,u,e){return this.delegate={iterator:P(t),resultName:u,nextLoc:e},"next"===this.method&&(this.arg=void 0),p}},u}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function u(e){return t.exports=u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,u(e)}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,u,e)=>{var n=e(440)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},u={};function e(n){var r=u[n];if(void 0!==r)return r.exports;var o=u[n]={exports:{}};return t[n](o,o.exports,e),o.exports}e.n=t=>{var u=t&&t.__esModule?()=>t.default:()=>t;return e.d(u,{a:u}),u},e.d=(t,u)=>{for(var n in u)e.o(u,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:u[n]})},e.o=(t,u)=>Object.prototype.hasOwnProperty.call(t,u),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";e.r(n),e.d(n,{extend:()=>su,filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});var t={};e.r(t),e.d(t,{default:()=>J,insertMention:()=>q});var u={};e.r(u),e.d(u,{filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});const r=flarum.core.compat["common/extend"],o=flarum.core.compat["forum/app"];var i=e.n(o);const s=flarum.core.compat["forum/components/NotificationGrid"];var a=e.n(s);const D=flarum.core.compat["common/utils/string"],c=flarum.core.compat["common/helpers/textContrastClass"];var l=e.n(c);const f=flarum.core.compat["forum/components/Post"];var p=e.n(f);const d=flarum.core.compat["forum/components/CommentPost"];var F=e.n(d);const h=flarum.core.compat["forum/components/PostPreview"];var C=e.n(h);const A=flarum.core.compat["common/components/LoadingIndicator"];var v=e.n(A);const E=flarum.core.compat["common/components/Link"];var y=e.n(E);const B=flarum.core.compat["common/helpers/punctuateSeries"];var g=e.n(B);const b=flarum.core.compat["common/helpers/username"];var w=e.n(b);const x=flarum.core.compat["common/helpers/icon"];var M=e.n(x);const P=flarum.core.compat["common/components/Button"];var _=e.n(P);function T(t,u){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,u){return t.__proto__=u,t},T(t,u)}function S(t,u){t.prototype=Object.create(u.prototype),t.prototype.constructor=t,T(t,u)}const k=flarum.core.compat["common/components/Modal"];var L=e.n(k);function j(){return j=Object.assign?Object.assign.bind():function(t){for(var u=1;u "+r+e.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1),n(u)}))}function J(t,u){return i().composer.bodyMatches(W())&&i().composer.body.attrs.post.discussion()===t.discussion()?q(t,i().composer,u):U().replyAction.call(t.discussion()).then((function(e){return q(t,e,u)}))}const z=flarum.core.compat["common/Fragment"];var Y=e.n(z),Q=function(t){function u(u){var e;return(e=t.call(this)||this).post=u,e}S(u,t);var e=u.prototype;return e.view=function(){var t=this;return m("button",{class:"Button PostQuoteButton",onclick:function(){J(t.post,t.content)}},M()("fas fa-quote-left",{className:"Button-icon"}),i().translator.trans("flarum-mentions.forum.post.quote_button"))},e.show=function(t,u){var e=this.$().show(),n=e.offsetParent().offset();e.css("left",t-n.left).css("top",u-n.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)},e.showStart=function(t,u){var e=this.$();this.show(t,$(window).scrollTop()+u-e.outerHeight()-5)},e.showEnd=function(t,u){var e=this.$();this.show(t-e.outerWidth(),$(window).scrollTop()+u+5)},e.hide=function(){this.$().hide(),$(document).off("mouseup",this.hideHandler)},u}(Y());function X(t){var u=window.getSelection();if(!u.isCollapsed){var e=u.getRangeAt(0),n=e.commonAncestorContainer;if(t[0]===n||$.contains(t[0],n)){var r=$("
").append(e.cloneContents());return r.find("img.emoji").replaceWith((function(){return this.alt})),r.find("img").replaceWith((function(){return"![]("+this.src+")"})),r.find("a").replaceWith((function(){return"["+this.innerText+"]("+this.href+")"})),r.text()}}return""}const K=flarum.core.compat["common/components/TextEditor"];var V=e.n(K);const Z=flarum.core.compat["common/components/TextEditorButton"];var tt=e.n(Z);const ut=flarum.core.compat["common/utils/KeyboardNavigatable"];var et=e.n(ut),nt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),r=0;r=n.length&&(r=0),this.index=r;var o=n.removeClass("active").eq(r).addClass("active");if(u){var i,s=e.scrollTop(),a=e.offset().top,D=a+e.outerHeight(),c=o.offset().top,l=c+o.outerHeight();cD&&(i=s-D+l+parseInt(e.css("padding-bottom"),10)),void 0!==i&&e.stop(!0).animate({scrollTop:i},100)}}},u}(Y()),rt=function(){function t(){this.instances=void 0,this.mentionables=void 0,this.extendable=void 0}var u=t.prototype;return u.makeMentionables=function(){var t,u=this;return null!=(t=this.instances)?t:this.instances=this.mentionables.map((function(t){return new t(u)}))},u.getMentionable=function(t){var u;return null!=(u=this.makeMentionables().find((function(u){return u.type()===t})))?u:null},u.extend=function(t){if(!this.extendable)throw new Error("This mention format does not allow extending.");this.mentionables.push(t)},t}();function ot(t,u,e,n,r,o,i){try{var s=t[o](i),a=s.value}catch(t){return void e(t)}s.done?u(a):Promise.resolve(a).then(n,r)}function it(t){return function(){var u=this,e=arguments;return new Promise((function(n,r){var o=t.apply(u,e);function i(t){ot(o,n,r,i,s,"next",t)}function s(t){ot(o,n,r,i,s,"throw",t)}i(void 0)}))}}var st=e(507),at=e.n(st);const Dt=flarum.core.compat["common/helpers/avatar"];var ct=e.n(Dt);const lt=flarum.core.compat["common/helpers/highlight"];var ft=e.n(lt),mt=function(t){this.format=void 0,this.format=t};const pt=flarum.core.compat["common/utils/extractText"];var dt=e.n(pt),Ft=function(){return dt()(i().translator.trans("core.lib.username.deleted_text"))};function ht(t,u){return void 0===u&&(u=!0),t?((u?t.displayName():t.username())||Ft()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):Ft().replace(/"#[a-z]{0,3}[0-9]+/,"_")}var Ct=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"user"},e.initialResults=function(){return Array.from(i().store.all("users"))},e.replacement=function(t){if(i().forum.attribute("allowUsernameMentionFormat")){var u=ht(t,!1);return this.format.format(u)}var e=ht(t);return this.format.format(e,"",t.id())},e.suggestion=function(t,u){var e,n=w()(t);return u&&(n.children=[ft()(null!=(e=n.text)?e:"",u)],delete n.text),m("[",null,ct()(t),n)},e.matches=function(t,u){return!!u&&[t.username(),t.displayName()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(){var t=it(at().mark((function t(u){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i().store.find("users",{filter:{q:u},page:{limit:5}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(u){return t.apply(this,arguments)}}(),e.enabled=function(){return!0},u}(mt);const At=flarum.core.compat["forum/components/ReplyComposer"];var vt=e.n(At),Et=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"post"},e.initialResults=function(){if(!i().composer.bodyMatches(vt())&&!i().composer.bodyMatches(W()))return[];var t=i().composer.body.attrs,u=t.post;return(u&&u.discussion()||t.discussion).posts().filter((function(t){return t&&"comment"===t.contentType()&&(!u||t.number()t.length)&&(u=t.length);for(var e=0,n=new Array(u);e=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.formats);!(u=e()).done;){var n=u.value.getMentionable(t);if(n)return n}return null},u.extend=function(t){this.formats.push(new t)},t}();function St(t,u){if(null==t)return{};var e,n,r={},o=Object.keys(t);for(n=0;n=0||(r[e]=t[e]);return r}const kt=flarum.core.compat["common/Component"];var $t=e.n(kt);const Lt=flarum.core.compat["common/utils/classList"];var jt=e.n(Lt),Nt=["mentionable"],Ot=function(t){function u(){return t.apply(this,arguments)||this}return S(u,t),u.prototype.view=function(t){var u=this.attrs,e=u.mentionable,n=St(u,Nt),r=jt()("MentionsDropdownItem","PostPreview","MentionsDropdown-"+e.type());return m("button",Object.assign({className:r},n),m("span",{className:"PostPreview-content"},t.children))},u}($t());const It=flarum.core.compat["common/utils/throttleDebounce"];var Rt=["onclick"];function Gt(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return Ut(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ut(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ut(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hu(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e');e.append(o);var i=function(){return $('.PostStream-item[data-id="'+r+'"]')},s=function(){var t=i(),s=!1;if(t.length){var a=t.offset().top,D=window.pageYOffset;a>D&&a+t.height()');this.$().append(o);var s=this.$(),a=this.$(".Post-mentionedBy"),D=function(){!o.hasClass("in")&&o.is(":visible")||(m.render(o[0],m("[",null,r.map((function(u){return m("li",{"data-number":u.number()},C().component({post:u,onclick:t.bind(e)}))})),r.length4,a=o.slice(0,s?3:4).map((function(u){var n=u.user();return m(y(),{href:i().route.post(u),onclick:t.bind(e),"data-number":u.number()},i().session.user===n?i().translator.trans("flarum-mentions.forum.post.you_text"):w()(n))}));if(s){var D=o.length-a.length;a.push(i().translator.trans("flarum-mentions.forum.post.others_text",{count:D}))}u.add("replies",m("div",{className:"Post-mentionedBy"},m("span",{className:"Post-mentionedBy-summary"},M()("fas fa-reply"),i().translator.trans("flarum-mentions.forum.post.mentioned_by"+(o[0].user()===i().session.user?"_self":"")+"_text",{count:a.length,users:g()(a)}))))}}))}(),(0,r.extend)(F().prototype,"actionItems",(function(t){var u=this.attrs.post;u.isHidden()||i().session.user&&!u.discussion().canReply()||t.add("reply",m(_(),{className:"Button Button--link",onclick:function(){return J(u)}},i().translator.trans("flarum-mentions.forum.post.reply_link")))})),(0,r.extend)(F().prototype,"oncreate",(function(){var t=this.attrs.post;if(!(t.isHidden()||i().session.user&&!t.discussion().canReply())){var u=this.$(".Post-body"),e=$('
'),n=new Q(t),r=function(t){setTimeout((function(){var r=X(u);if(r){n.content=r,m.render(e[0],n.render());var o=window.getSelection().getRangeAt(0).getClientRects(),i=o[0];if(t.clientY
'),u=new nt;(0,r.extend)(V().prototype,"oncreate",(function(){var e=this.$(".TextEditor-editor").wrap('
');this.navigator=new(et()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(e),e.after(t)})),(0,r.extend)(V().prototype,"buildEditorParams",(function(e){var n,r,o,s=this,a=new Ht({onmouseenter:function(){u.setIndex($(this).parent().index())},onclick:function(t){s.attrs.composer.editor.replaceBeforeCursor(r-1,t+" "),u.hide()}});e.inputListeners.push((function(){var e=s.attrs.composer.editor.getSelectionRange(),D=e[0];if(!(e[1]-D>0)){var c=s.attrs.composer.editor.getLastNChars(30);r=0;for(var l=null,f=c.length-1;f>=0;f--){var p=c.substr(f,1);if((l=i().mentionFormats.get(p))&&(0===f||/\s/.test(c.substr(f-1,1)))){n=f+1,r=D-c.length+f+1,a.init(l.makeMentionables());break}}if(u.hide(),u.active=!1,r){var d,F=c.substring(n).toLowerCase();if(!(o=l.queryFromTyped(F)))return;a.typed=o;var h=function(){var e=a.buildSuggestions();if(e.length){u.items=e,m.render(t[0],u.render()),u.show();var n=s.attrs.composer.editor.getCaretCoordinates(r),o=u.$().outerWidth(),i=u.$().outerHeight(),D=u.$().offsetParent(),c=n.left,l=n.top+15;l+i>D.height()&&(l=n.top-i-15),c+o>D.width()&&(c=D.width()-o),l=Math.max(-(D.offset().top-$(document).scrollTop()),l),c=Math.max(-D.offset().left,c),u.show(c,l)}else u.active=!1,u.hide()};u.active=!0,h(),u.setIndex(0),u.$().scrollTop(0),null==(d=a.search())||d.then(h)}}}))})),(0,r.extend)(V().prototype,"toolbarItems",(function(t){var u=this;t.add("mention",m(tt(),{onclick:function(){return u.attrs.composer.editor.insertAtCursor(" @")},icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.composer.mention_tooltip")))}))}(),i().notificationComponents.postMentioned=Jt,i().notificationComponents.userMentioned=zt,i().notificationComponents.groupMentioned=Yt,(0,r.extend)(a().prototype,"notificationTypes",(function(t){t.add("postMentioned",{name:"postMentioned",icon:"fas fa-reply",label:i().translator.trans("flarum-mentions.forum.settings.notify_post_mentioned_label")}),t.add("userMentioned",{name:"userMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_user_mentioned_label")}),t.add("groupMentioned",{name:"groupMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_group_mentioned_label")})})),(0,r.extend)(Xt().prototype,"navItems",(function(t){var u=this.user;t.add("mentions",Vt().component({href:i().route("user.mentions",{username:u.slug()}),name:"mentions",icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.user.mentions_link")),80)})),D.getPlainContent.removeSelectors.push("a.PostMention"),(0,r.extend)(p().prototype,"oncreate",(function(){this.$(".GroupMention--colored, .TagMention--colored").each((function(){this.classList.add(l()(getComputedStyle(this).getPropertyValue("--color")))}))}))})),Object.assign(Au.compat,Cu)})(),module.exports=n})(); +(()=>{var t={440:(t,u,e)=>{var n=e(75).default;function r(){"use strict";t.exports=r=function(){return u},t.exports.__esModule=!0,t.exports.default=t.exports;var u={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,u,e){t[u]=e.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",D=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,u,e){return Object.defineProperty(t,u,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[u]}try{l({},"")}catch(t){l=function(t,u,e){return t[u]=e}}function f(t,u,e,n){var r=u&&u.prototype instanceof d?u:d,o=Object.create(r.prototype),s=new M(n||[]);return i(o,"_invoke",{value:g(t,e,s)}),o}function m(t,u,e){try{return{type:"normal",arg:t.call(u,e)}}catch(t){return{type:"throw",arg:t}}}u.wrap=f;var p={};function d(){}function F(){}function h(){}var C={};l(C,a,(function(){return this}));var A=Object.getPrototypeOf,v=A&&A(A(P([])));v&&v!==e&&o.call(v,a)&&(C=v);var E=h.prototype=d.prototype=Object.create(C);function y(t){["next","throw","return"].forEach((function(u){l(t,u,(function(t){return this._invoke(u,t)}))}))}function B(t,u){function e(r,i,s,a){var D=m(t[r],t,i);if("throw"!==D.type){var c=D.arg,l=c.value;return l&&"object"==n(l)&&o.call(l,"__await")?u.resolve(l.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):u.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(D.arg)}var r;i(this,"_invoke",{value:function(t,n){function o(){return new u((function(u,r){e(t,n,u,r)}))}return r=r?r.then(o,o):o()}})}function g(t,u,e){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return{value:void 0,done:!0}}for(e.method=r,e.arg=o;;){var i=e.delegate;if(i){var s=b(i,e);if(s){if(s===p)continue;return s}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var a=m(t,u,e);if("normal"===a.type){if(n=e.done?"completed":"suspendedYield",a.arg===p)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(n="completed",e.method="throw",e.arg=a.arg)}}}function b(t,u){var e=t.iterator[u.method];if(void 0===e){if(u.delegate=null,"throw"===u.method){if(t.iterator.return&&(u.method="return",u.arg=void 0,b(t,u),"throw"===u.method))return p;u.method="throw",u.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=m(e,t.iterator,u.arg);if("throw"===n.type)return u.method="throw",u.arg=n.arg,u.delegate=null,p;var r=n.arg;return r?r.done?(u[t.resultName]=r.value,u.next=t.nextLoc,"return"!==u.method&&(u.method="next",u.arg=void 0),u.delegate=null,p):r:(u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,p)}function w(t){var u={tryLoc:t[0]};1 in t&&(u.catchLoc=t[1]),2 in t&&(u.finallyLoc=t[2],u.afterLoc=t[3]),this.tryEntries.push(u)}function x(t){var u=t.completion||{};u.type="normal",delete u.arg,t.completion=u}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function P(t){if(t){var u=t[a];if(u)return u.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function u(){for(;++e=0;--n){var r=this.tryEntries[n],i=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var s=o.call(r,"catchLoc"),a=o.call(r,"finallyLoc");if(s&&a){if(this.prev=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--u){var e=this.tryEntries[u];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),p}},catch:function(t){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;x(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,u,e){return this.delegate={iterator:P(t),resultName:u,nextLoc:e},"next"===this.method&&(this.arg=void 0),p}},u}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function u(e){return t.exports=u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,u(e)}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,u,e)=>{var n=e(440)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},u={};function e(n){var r=u[n];if(void 0!==r)return r.exports;var o=u[n]={exports:{}};return t[n](o,o.exports,e),o.exports}e.n=t=>{var u=t&&t.__esModule?()=>t.default:()=>t;return e.d(u,{a:u}),u},e.d=(t,u)=>{for(var n in u)e.o(u,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:u[n]})},e.o=(t,u)=>Object.prototype.hasOwnProperty.call(t,u),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";e.r(n),e.d(n,{extend:()=>su,filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});var t={};e.r(t),e.d(t,{default:()=>J,insertMention:()=>q});var u={};e.r(u),e.d(u,{filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});const r=flarum.core.compat["common/extend"],o=flarum.core.compat["forum/app"];var i=e.n(o);const s=flarum.core.compat["forum/components/NotificationGrid"];var a=e.n(s);const D=flarum.core.compat["common/utils/string"],c=flarum.core.compat["common/helpers/textContrastClass"];var l=e.n(c);const f=flarum.core.compat["forum/components/Post"];var p=e.n(f);const d=flarum.core.compat["forum/components/CommentPost"];var F=e.n(d);const h=flarum.core.compat["forum/components/PostPreview"];var C=e.n(h);const A=flarum.core.compat["common/components/LoadingIndicator"];var v=e.n(A);const E=flarum.core.compat["common/components/Link"];var y=e.n(E);const B=flarum.core.compat["common/helpers/punctuateSeries"];var g=e.n(B);const b=flarum.core.compat["common/helpers/username"];var w=e.n(b);const x=flarum.core.compat["common/helpers/icon"];var M=e.n(x);const P=flarum.core.compat["common/components/Button"];var _=e.n(P);function T(t,u){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,u){return t.__proto__=u,t},T(t,u)}function S(t,u){t.prototype=Object.create(u.prototype),t.prototype.constructor=t,T(t,u)}const k=flarum.core.compat["common/components/Modal"];var L=e.n(k);function j(){return j=Object.assign?Object.assign.bind():function(t){for(var u=1;u "+r+e.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1),n(u)}))}function J(t,u){return i().composer.bodyMatches(W())&&i().composer.body.attrs.post.discussion()===t.discussion()?q(t,i().composer,u):U().replyAction.call(t.discussion()).then((function(e){return q(t,e,u)}))}const z=flarum.core.compat["common/Fragment"];var Y=e.n(z),Q=function(t){function u(u){var e;return(e=t.call(this)||this).post=u,e}S(u,t);var e=u.prototype;return e.view=function(){var t=this;return m("button",{className:"Button PostQuoteButton",onclick:function(){J(t.post,t.content)}},M()("fas fa-quote-left",{className:"Button-icon"}),i().translator.trans("flarum-mentions.forum.post.quote_button"))},e.show=function(t,u){var e=this.$().show(),n=e.offsetParent().offset();e.css("left",t-n.left).css("top",u-n.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)},e.showStart=function(t,u){var e=this.$();this.show(t,$(window).scrollTop()+u-e.outerHeight()-5)},e.showEnd=function(t,u){var e=this.$();this.show(t-e.outerWidth(),$(window).scrollTop()+u+5)},e.hide=function(){this.$().hide(),$(document).off("mouseup",this.hideHandler)},u}(Y());function X(t){var u=window.getSelection();if(!u.isCollapsed){var e=u.getRangeAt(0),n=e.commonAncestorContainer;if(t[0]===n||$.contains(t[0],n)){var r=$("
").append(e.cloneContents());return r.find("img.emoji").replaceWith((function(){return this.alt})),r.find("img").replaceWith((function(){return"![]("+this.src+")"})),r.find("a").replaceWith((function(){return"["+this.innerText+"]("+this.href+")"})),r.text()}}return""}const K=flarum.core.compat["common/components/TextEditor"];var V=e.n(K);const Z=flarum.core.compat["common/components/TextEditorButton"];var tt=e.n(Z);const ut=flarum.core.compat["common/utils/KeyboardNavigatable"];var et=e.n(ut),nt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),r=0;r=n.length&&(r=0),this.index=r;var o=n.removeClass("active").eq(r).addClass("active");if(u){var i,s=e.scrollTop(),a=e.offset().top,D=a+e.outerHeight(),c=o.offset().top,l=c+o.outerHeight();cD&&(i=s-D+l+parseInt(e.css("padding-bottom"),10)),void 0!==i&&e.stop(!0).animate({scrollTop:i},100)}}},u}(Y()),rt=function(){function t(){this.instances=void 0,this.mentionables=void 0,this.extendable=void 0}var u=t.prototype;return u.makeMentionables=function(){var t,u=this;return null!=(t=this.instances)?t:this.instances=this.mentionables.map((function(t){return new t(u)}))},u.getMentionable=function(t){var u;return null!=(u=this.makeMentionables().find((function(u){return u.type()===t})))?u:null},u.extend=function(t){if(!this.extendable)throw new Error("This mention format does not allow extending.");this.mentionables.push(t)},t}();function ot(t,u,e,n,r,o,i){try{var s=t[o](i),a=s.value}catch(t){return void e(t)}s.done?u(a):Promise.resolve(a).then(n,r)}function it(t){return function(){var u=this,e=arguments;return new Promise((function(n,r){var o=t.apply(u,e);function i(t){ot(o,n,r,i,s,"next",t)}function s(t){ot(o,n,r,i,s,"throw",t)}i(void 0)}))}}var st=e(507),at=e.n(st);const Dt=flarum.core.compat["common/helpers/avatar"];var ct=e.n(Dt);const lt=flarum.core.compat["common/helpers/highlight"];var ft=e.n(lt),mt=function(t){this.format=void 0,this.format=t};const pt=flarum.core.compat["common/utils/extractText"];var dt=e.n(pt),Ft=function(){return dt()(i().translator.trans("core.lib.username.deleted_text"))};function ht(t,u){return void 0===u&&(u=!0),t?((u?t.displayName():t.username())||Ft()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):Ft().replace(/"#[a-z]{0,3}[0-9]+/,"_")}var Ct=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"user"},e.initialResults=function(){return Array.from(i().store.all("users"))},e.replacement=function(t){if(i().forum.attribute("allowUsernameMentionFormat")){var u=ht(t,!1);return this.format.format(u)}var e=ht(t);return this.format.format(e,"",t.id())},e.suggestion=function(t,u){var e,n=w()(t);return u&&(n.children=[ft()(null!=(e=n.text)?e:"",u)],delete n.text),m("[",null,ct()(t),n)},e.matches=function(t,u){return!!u&&[t.username(),t.displayName()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(){var t=it(at().mark((function t(u){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i().store.find("users",{filter:{q:u},page:{limit:5}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(u){return t.apply(this,arguments)}}(),e.enabled=function(){return!0},u}(mt);const At=flarum.core.compat["forum/components/ReplyComposer"];var vt=e.n(At),Et=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"post"},e.initialResults=function(){if(!i().composer.bodyMatches(vt())&&!i().composer.bodyMatches(W()))return[];var t=i().composer.body.attrs,u=t.post;return(u&&u.discussion()||t.discussion).posts().filter((function(t){return t&&"comment"===t.contentType()&&(!u||t.number()t.length)&&(u=t.length);for(var e=0,n=new Array(u);e=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.formats);!(u=e()).done;){var n=u.value.getMentionable(t);if(n)return n}return null},u.extend=function(t){this.formats.push(new t)},t}();function St(t,u){if(null==t)return{};var e,n,r={},o=Object.keys(t);for(n=0;n=0||(r[e]=t[e]);return r}const kt=flarum.core.compat["common/Component"];var $t=e.n(kt);const Lt=flarum.core.compat["common/utils/classList"];var jt=e.n(Lt),Nt=["mentionable"],Ot=function(t){function u(){return t.apply(this,arguments)||this}return S(u,t),u.prototype.view=function(t){var u=this.attrs,e=u.mentionable,n=St(u,Nt),r=jt()("MentionsDropdownItem","PostPreview","MentionsDropdown-"+e.type());return m("button",Object.assign({className:r},n),m("span",{className:"PostPreview-content"},t.children))},u}($t());const It=flarum.core.compat["common/utils/throttleDebounce"];var Rt=["onclick"];function Gt(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return Ut(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ut(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ut(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hu(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e');e.append(o);var i=function(){return $('.PostStream-item[data-id="'+r+'"]')},s=function(){var t=i(),s=!1;if(t.length){var a=t.offset().top,D=window.pageYOffset;a>D&&a+t.height()');this.$().append(o);var s=this.$(),a=this.$(".Post-mentionedBy"),D=function(){!o.hasClass("in")&&o.is(":visible")||(m.render(o[0],m("[",null,r.map((function(u){return m("li",{"data-number":u.number()},m(C(),{post:u,onclick:t.bind(e)}))})),r.length4,a=o.slice(0,s?3:4).map((function(u){var n=u.user();return m(y(),{href:i().route.post(u),onclick:t.bind(e),"data-number":u.number()},i().session.user===n?i().translator.trans("flarum-mentions.forum.post.you_text"):w()(n))}));if(s){var D=o.length-a.length;a.push(i().translator.trans("flarum-mentions.forum.post.others_text",{count:D}))}u.add("replies",m("div",{className:"Post-mentionedBy"},m("span",{className:"Post-mentionedBy-summary"},M()("fas fa-reply"),i().translator.trans("flarum-mentions.forum.post.mentioned_by"+(o[0].user()===i().session.user?"_self":"")+"_text",{count:a.length,users:g()(a)}))))}}))}(),(0,r.extend)(F().prototype,"actionItems",(function(t){var u=this.attrs.post;u.isHidden()||i().session.user&&!u.discussion().canReply()||t.add("reply",m(_(),{className:"Button Button--link",onclick:function(){return J(u)}},i().translator.trans("flarum-mentions.forum.post.reply_link")))})),(0,r.extend)(F().prototype,"oncreate",(function(){var t=this.attrs.post;if(!(t.isHidden()||i().session.user&&!t.discussion().canReply())){var u=this.$(".Post-body"),e=$('
'),n=new Q(t),r=function(t){setTimeout((function(){var r=X(u);if(r){n.content=r,m.render(e[0],n.render());var o=window.getSelection().getRangeAt(0).getClientRects(),i=o[0];if(t.clientY
'),u=new nt;(0,r.extend)(V().prototype,"oncreate",(function(){var e=this.$(".TextEditor-editor").wrap('
');this.navigator=new(et()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(e),e.after(t)})),(0,r.extend)(V().prototype,"buildEditorParams",(function(e){var n,r,o,s=this,a=new Ht({onmouseenter:function(){u.setIndex($(this).parent().index())},onclick:function(t){s.attrs.composer.editor.replaceBeforeCursor(r-1,t+" "),u.hide()}});e.inputListeners.push((function(){var e=s.attrs.composer.editor.getSelectionRange(),D=e[0];if(!(e[1]-D>0)){var c=s.attrs.composer.editor.getLastNChars(30);r=0;for(var l=null,f=c.length-1;f>=0;f--){var p=c.substr(f,1);if((l=i().mentionFormats.get(p))&&(0===f||/\s/.test(c.substr(f-1,1)))){n=f+1,r=D-c.length+f+1,a.init(l.makeMentionables());break}}if(u.hide(),u.active=!1,r){var d,F=c.substring(n).toLowerCase();if(!(o=l.queryFromTyped(F)))return;a.typed=o;var h=function(){var e=a.buildSuggestions();if(e.length){u.items=e,m.render(t[0],u.render()),u.show();var n=s.attrs.composer.editor.getCaretCoordinates(r),o=u.$().outerWidth(),i=u.$().outerHeight(),D=u.$().offsetParent(),c=n.left,l=n.top+15;l+i>D.height()&&(l=n.top-i-15),c+o>D.width()&&(c=D.width()-o),l=Math.max(-(D.offset().top-$(document).scrollTop()),l),c=Math.max(-D.offset().left,c),u.show(c,l)}else u.active=!1,u.hide()};u.active=!0,h(),u.setIndex(0),u.$().scrollTop(0),null==(d=a.search())||d.then(h)}}}))})),(0,r.extend)(V().prototype,"toolbarItems",(function(t){var u=this;t.add("mention",m(tt(),{onclick:function(){return u.attrs.composer.editor.insertAtCursor(" @")},icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.composer.mention_tooltip")))}))}(),i().notificationComponents.postMentioned=Jt,i().notificationComponents.userMentioned=zt,i().notificationComponents.groupMentioned=Yt,(0,r.extend)(a().prototype,"notificationTypes",(function(t){t.add("postMentioned",{name:"postMentioned",icon:"fas fa-reply",label:i().translator.trans("flarum-mentions.forum.settings.notify_post_mentioned_label")}),t.add("userMentioned",{name:"userMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_user_mentioned_label")}),t.add("groupMentioned",{name:"groupMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_group_mentioned_label")})})),(0,r.extend)(Xt().prototype,"navItems",(function(t){var u=this.user;t.add("mentions",m(Vt(),{href:i().route("user.mentions",{username:u.slug()}),name:"mentions",icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.user.mentions_link")),80)})),D.getPlainContent.removeSelectors.push("a.PostMention"),(0,r.extend)(p().prototype,"oncreate",(function(){this.$(".GroupMention--colored, .TagMention--colored").each((function(){this.classList.add(l()(getComputedStyle(this).getPropertyValue("--color")))}))}))})),Object.assign(Au.compat,Cu)})(),module.exports=n})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/mentions/js/dist/forum.js.map b/extensions/mentions/js/dist/forum.js.map index 803ccb8f69..076a0b6d9f 100644 --- a/extensions/mentions/js/dist/forum.js.map +++ b/extensions/mentions/js/dist/forum.js.map @@ -1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,IAAAA,UAAgB,YAAY,WACjC3X,KAAKiM,EAAE,gDAAgDuN,MAAK,WAC1DxZ,KAAKuV,UAAUmC,IAAIiH,IAAkBC,iBAAiB5e,MAAM6e,iBAAiB,YAC/E,GACF,GACF,IAQAxhB,OAAOqK,OAAOR,GAAAA,OAAQ4X","sources":["webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/mentions/webpack/bootstrap","webpack://@flarum/mentions/webpack/runtime/compat get default export","webpack://@flarum/mentions/webpack/runtime/define property getters","webpack://@flarum/mentions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/mentions/webpack/runtime/make namespace object","webpack://@flarum/mentions/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/helpers/textContrastClass']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/PostPreview']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/helpers/punctuateSeries']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/mentions/external root \"flarum.core.compat['common/states/PaginatedListState']\"","webpack://@flarum/mentions/./src/forum/state/MentionedByModalState.ts","webpack://@flarum/mentions/./src/forum/components/MentionedByModal.tsx","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/EditPostComposer']\"","webpack://@flarum/mentions/./src/forum/utils/reply.js","webpack://@flarum/mentions/external root \"flarum.core.compat['common/Fragment']\"","webpack://@flarum/mentions/./src/forum/fragments/PostQuoteButton.js","webpack://@flarum/mentions/./src/forum/utils/selectedText.js","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/TextEditorButton']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/utils/KeyboardNavigatable']\"","webpack://@flarum/mentions/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormat.ts","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/mentions/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModel.ts","webpack://@flarum/mentions/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/mentions/./src/forum/utils/getCleanDisplayName.js","webpack://@flarum/mentions/./src/forum/mentionables/UserMention.tsx","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@flarum/mentions/./src/forum/mentionables/PostMention.tsx","webpack://@flarum/mentions/external root \"flarum.core.compat['common/models/Group']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/mentions/./src/forum/mentionables/GroupMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/AtMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/TagMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/HashMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormats.ts","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/mentions/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/mentions/./src/forum/components/MentionsDropdownItem.tsx","webpack://@flarum/mentions/external root \"flarum.core.compat['common/utils/throttleDebounce']\"","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModels.tsx","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/mentions/./src/forum/components/PostMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/UserMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/GroupMentionedNotification.js","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/UserPage']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/models/User']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/mentions/external root \"flarum.core.compat['forum/components/PostsUserPage']\"","webpack://@flarum/mentions/./src/forum/components/MentionsUserPage.js","webpack://@flarum/mentions/./src/forum/extend.ts","webpack://@flarum/mentions/./src/forum/utils/textFormatter.js","webpack://@flarum/mentions/./src/forum/compat.js","webpack://@flarum/mentions/./src/forum/utils/getMentionText.js","webpack://@flarum/mentions/./src/forum/extenders/Mentionables.ts","webpack://@flarum/mentions/external assign \"flarum.core\"","webpack://@flarum/mentions/./src/forum/index.js","webpack://@flarum/mentions/./src/forum/addPostMentionPreviews.js","webpack://@flarum/mentions/./src/forum/addMentionedByList.js","webpack://@flarum/mentions/./src/forum/addPostReplyAction.js","webpack://@flarum/mentions/./src/forum/addPostQuoteButton.js","webpack://@flarum/mentions/./src/forum/addComposerAutocomplete.js"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/textContrastClass'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostPreview'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/punctuateSeries'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/states/PaginatedListState'];","import PaginatedListState, { PaginatedListParams } from 'flarum/common/states/PaginatedListState';\nimport Post from 'flarum/common/models/Post';\n\nexport interface MentionedByModalListParams extends PaginatedListParams {\n filter: {\n mentionedPost: string;\n };\n sort?: string;\n page?: {\n offset?: number;\n limit: number;\n };\n}\n\nexport default class MentionedByModalState

extends PaginatedListState {\n constructor(params: P, page: number = 1) {\n const limit = 10;\n\n params.page = { ...(params.page || {}), limit };\n\n super(params, page, limit);\n }\n\n get type(): string {\n return 'posts';\n }\n}\n","import app from 'flarum/forum/app';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport type Mithril from 'mithril';\nimport type Post from 'flarum/common/models/Post';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModalState from '../state/MentionedByModalState';\n\nexport interface IMentionedByModalAttrs extends IInternalModalAttrs {\n post: Post;\n}\n\nexport default class MentionedByModal extends Modal<\n CustomAttrs,\n MentionedByModalState\n> {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.state = new MentionedByModalState({\n filter: {\n mentionedPost: this.attrs.post.id()!,\n },\n sort: 'number',\n });\n\n this.state.refresh();\n }\n\n className(): string {\n return 'MentionedByModal';\n }\n\n title(): Mithril.Children {\n return app.translator.trans('flarum-mentions.forum.mentioned_by.title');\n }\n\n content(): Mithril.Children {\n return (\n <>\n

\n {this.state.isInitialLoading() ? (\n \n ) : (\n <>\n
    \n {this.state.getPages().map((page) =>\n page.items.map((reply) => (\n
  • \n app.modal.close()} />\n
  • \n ))\n )}\n
\n \n )}\n
\n {this.state.hasNext() && (\n
\n
\n
\n \n
\n
\n
\n )}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EditPostComposer'];","import app from 'flarum/forum/app';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport EditPostComposer from 'flarum/forum/components/EditPostComposer';\n\nexport function insertMention(post, composer, quote) {\n return new Promise((resolve) => {\n const mention = app.mentionFormats.mentionable('post').replacement(post) + ' ';\n\n // If the composer is empty, then assume we're starting a new reply.\n // In which case we don't want the user to have to confirm if they\n // close the composer straight away.\n if (!composer.fields.content()) {\n composer.body.attrs.originalContent = mention;\n }\n\n const cursorPosition = composer.editor.getSelectionRange()[0];\n const preceding = composer.fields.content().slice(0, cursorPosition);\n const precedingNewlines = preceding.length == 0 ? 0 : 3 - preceding.match(/(\\n{0,2})$/)[0].length;\n\n composer.editor.insertAtCursor(\n Array(precedingNewlines).join('\\n') + // Insert up to two newlines, depending on preceding whitespace\n (quote ? '> ' + mention + quote.trim().replace(/\\n/g, '\\n> ') + '\\n\\n' : mention),\n false\n );\n return resolve(composer);\n });\n}\n\nexport default function reply(post, quote) {\n if (app.composer.bodyMatches(EditPostComposer) && app.composer.body.attrs.post.discussion() === post.discussion()) {\n // If we're already editing a post in the discussion of post we're quoting,\n // insert the mention directly.\n return insertMention(post, app.composer, quote);\n } else {\n // The default \"Reply\" action behavior will only open a new composer if\n // necessary, but it will always be a ReplyComposer, hence the exceptional\n // case above.\n return DiscussionControls.replyAction.call(post.discussion()).then((composer) => insertMention(post, composer, quote));\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Fragment'];","import app from 'flarum/forum/app';\nimport Fragment from 'flarum/common/Fragment';\nimport icon from 'flarum/common/helpers/icon';\n\nimport reply from '../utils/reply';\n\nexport default class PostQuoteButton extends Fragment {\n constructor(post) {\n super();\n\n this.post = post;\n }\n\n view() {\n return (\n {\n reply(this.post, this.content);\n }}\n >\n {icon('fas fa-quote-left', { className: 'Button-icon' })}\n {app.translator.trans('flarum-mentions.forum.post.quote_button')}\n \n );\n }\n\n show(left, top) {\n const $this = this.$().show();\n const parentOffset = $this.offsetParent().offset();\n\n $this.css('left', left - parentOffset.left).css('top', top - parentOffset.top);\n\n this.hideHandler = this.hide.bind(this);\n $(document).on('mouseup', this.hideHandler);\n }\n\n showStart(left, top) {\n const $this = this.$();\n\n this.show(left, $(window).scrollTop() + top - $this.outerHeight() - 5);\n }\n\n showEnd(right, bottom) {\n const $this = this.$();\n\n this.show(right - $this.outerWidth(), $(window).scrollTop() + bottom + 5);\n }\n\n hide() {\n this.$().hide();\n $(document).off('mouseup', this.hideHandler);\n }\n}\n","/**\n * Finds the selected text in the provided composer body.\n */\nexport default function selectedText(body) {\n const selection = window.getSelection();\n\n if (!selection.isCollapsed) {\n const range = selection.getRangeAt(0);\n const parent = range.commonAncestorContainer;\n\n if (body[0] === parent || $.contains(body[0], parent)) {\n const clone = $('
\n );\n }\n\n version(v: string): string {\n return 'v' + v.replace('v', '');\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport Alert from 'flarum/common/components/Alert';\nimport RequestError from 'flarum/common/utils/RequestError';\n\nimport { UpdatedPackage, UpdateState } from '../states/ControlSectionState';\nimport errorHandler from '../utils/errorHandler';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionItem from './ExtensionItem';\nimport { AsyncBackendResponse } from '../shims';\nimport jumpToQueue from '../utils/jumpToQueue';\n\nexport interface MajorUpdaterAttrs extends ComponentAttrs {\n coreUpdate: UpdatedPackage;\n updateState: UpdateState;\n}\n\nexport type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';\n\nexport default class MajorUpdater extends Component {\n updateState!: UpdateState;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.updateState = this.attrs.updateState;\n }\n\n view(): Mithril.Children {\n // @todo move Form-group--danger class to core for reuse\n return (\n
\n \"flarum\n \n

{app.translator.trans('flarum-package-manager.admin.major_updater.description')}

\n
\n \n \n {app.translator.trans('flarum-package-manager.admin.major_updater.dry_run')}\n \n \n \n {app.translator.trans('flarum-package-manager.admin.major_updater.update')}\n \n
\n {this.updateState.incompatibleExtensions.length ? (\n
\n {this.updateState.incompatibleExtensions.map((extension: string) => (\n \n ))}\n
\n ) : null}\n {this.updateState.status === 'failure' ? (\n app.modal.show(WhyNotModal, { package: 'flarum/core' })}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.why')}\n ,\n ]}\n >\n

\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.desc')}\n

\n \n ) : null}\n
\n );\n }\n\n update(dryRun: boolean) {\n app.packageManager.control.setLoading(dryRun ? 'major-update-dry-run' : 'major-update');\n app.modal.show(LoadingModal);\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/major-update`,\n body: {\n data: { dryRun },\n },\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .catch((e: RequestError) => {\n app.modal.close();\n this.updateState.status = 'failure';\n this.updateState.incompatibleExtensions = e.response?.errors?.pop()?.incompatible_extensions as string[];\n })\n .finally(() => {\n app.packageManager.control.setLoading(null);\n m.redraw();\n });\n }\n}\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","/**\n * Returns if the passed value is an object.\n *\n * In this context, \"object\" refers to **any non-primitive value**, including\n * arrays, function, maps, dates, and more.\n *\n * @example\n * isObject({}); // true\n * @example\n * isObject([]); // true\n * @example\n * isObject(function () {}); // true\n * @example\n * isObject(Object(1)); // true\n * @example\n * isObject(null); // false\n * @example\n * isObject(1); // false\n * @example\n * isObject(\"hello world\"); // false\n *\n * @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91\n */\nexport default function isObject(obj: unknown): obj is object {\n const type = typeof obj;\n return type === 'function' || (type === 'object' && !!obj);\n}\n","import isObject from './isObject';\n\nexport interface IItemObject {\n content: T;\n itemName: string;\n priority: number;\n}\n\nclass Item {\n content: T;\n priority: number;\n\n constructor(content: T, priority: number) {\n this.content = content;\n this.priority = priority;\n }\n}\n\n/**\n * The `ItemList` class collects items and then arranges them into an array\n * by priority.\n */\nexport default class ItemList {\n /**\n * The items in the list.\n */\n protected _items: Record> = {};\n\n // TODO: [Flarum 2.0] Remove `.items` getter.\n /**\n * A **read-only copy** of items in the list.\n *\n * We don't allow adding new items to the ItemList via setting new properties,\n * nor do we allow modifying existing items directly.\n *\n * @deprecated Use {@link ItemList.toObject} instead.\n */\n get items(): DeepReadonly>> {\n return new Proxy(this._items, {\n set() {\n console.warn('Modifying `ItemList.items` is not allowed.');\n return false;\n },\n });\n }\n\n /**\n * Check whether the list is empty.\n */\n isEmpty(): boolean {\n return Object.keys(this._items).length === 0;\n }\n\n /**\n * Check whether an item is present in the list.\n */\n has(key: string): boolean {\n return Object.keys(this._items).includes(key);\n }\n\n /**\n * Get the content of an item.\n */\n get(key: string): T {\n return this._items[key].content;\n }\n\n /**\n * Get the priority of an item.\n */\n getPriority(key: string): number {\n return this._items[key].priority;\n }\n\n /**\n * Add an item to the list.\n *\n * @param key A unique key for the item.\n * @param content The item's content.\n * @param priority The priority of the item. Items with a higher priority\n * will be positioned before items with a lower priority.\n */\n add(key: string, content: T, priority: number = 0): this {\n this._items[key] = new Item(content, priority);\n\n return this;\n }\n\n // TODO: [Flarum 2.0] Remove deprecated `.replace()` method.\n /**\n * Replace an item and/or priority in the list, only if it is already present.\n *\n * If `content` or `priority` are `null`, these values will not be replaced.\n *\n * If the provided `key` is not present, nothing will happen.\n *\n * @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}\n * methods to replace items and their priorities. This method will be removed in Flarum 2.0.\n *\n * @param key The key of the item in the list\n * @param content The item's new content\n * @param priority The item's new priority\n *\n * @example Replace priority and not content.\n * items.replace('myItem', null, 10);\n *\n * @example Replace content and not priority.\n * items.replace('myItem',

My new value.

);\n *\n * @example Replace content and priority.\n * items.replace('myItem',

My new value.

, 10);\n */\n replace(key: string, content: T | null = null, priority: number | null = null): this {\n if (!this.has(key)) return this;\n\n if (content !== null) {\n this._items[key].content = content;\n }\n\n if (priority !== null) {\n this._items[key].priority = priority;\n }\n\n return this;\n }\n\n /**\n * Replaces an item's content, if the provided item key exists.\n *\n * If the provided `key` is not present, an error will be thrown.\n *\n * @param key The key of the item in the list\n * @param content The item's new content\n *\n * @example Replace item content.\n * items.setContent('myItem',

My new value.

);\n *\n * @example Replace item content and priority.\n * items\n * .setContent('myItem',

My new value.

)\n * .setPriority('myItem', 10);\n *\n * @throws If the provided `key` is not present in the ItemList.\n */\n setContent(key: string, content: T): this {\n if (!this.has(key)) {\n throw new Error(`[ItemList] Cannot set content of Item. Key \\`${key}\\` is not present.`);\n }\n\n // Saves on bundle size to call the deprecated method internally\n return this.replace(key, content);\n }\n\n /**\n * Replaces an item's priority, if the provided item key exists.\n *\n * If the provided `key` is not present, an error will be thrown.\n *\n * @param key The key of the item in the list\n * @param priority The item's new priority\n *\n * @example Replace item priority.\n * items.setPriority('myItem', 10);\n *\n * @example Replace item priority and content.\n * items\n * .setPriority('myItem', 10)\n * .setContent('myItem',

My new value.

);\n *\n * @throws If the provided `key` is not present in the ItemList.\n */\n setPriority(key: string, priority: number): this {\n if (!this.has(key)) {\n throw new Error(`[ItemList] Cannot set priority of Item. Key \\`${key}\\` is not present.`);\n }\n\n this._items[key].priority = priority;\n\n return this;\n }\n\n /**\n * Remove an item from the list.\n *\n * If the provided `key` is not present, nothing will happen.\n */\n remove(key: string): this {\n delete this._items[key];\n\n return this;\n }\n\n /**\n * Merge another list's items into this one.\n *\n * The list passed to this function will overwrite items which already exist\n * with the same key.\n */\n merge(otherList: ItemList): ItemList {\n Object.keys(otherList._items).forEach((key) => {\n const val = otherList._items[key];\n\n if (val instanceof Item) {\n this._items[key] = val;\n }\n });\n\n return this;\n }\n\n /**\n * Convert the list into an array of item content arranged by priority.\n *\n * This **does not** preserve the original types of primitives and proxies\n * all content values to make `itemName` accessible on them.\n *\n * **NOTE:** If your ItemList holds primitive types (such as numbers, booleans\n * or strings), these will be converted to their object counterparts if you do\n * not provide `true` to this function.\n *\n * **NOTE:** Modifying any objects in the final array may also update the\n * content of the original ItemList.\n *\n * @param keepPrimitives Converts item content to objects and sets the\n * `itemName` property on them.\n *\n * @see https://github.com/flarum/core/issues/3030\n */\n toArray(keepPrimitives?: false): (T & { itemName: string })[];\n /**\n * Convert the list into an array of item content arranged by priority.\n *\n * Content values that are already objects will be proxied and have\n * `itemName` accessible on them. Primitive values will not have the\n * `itemName` property accessible.\n *\n * **NOTE:** Modifying any objects in the final array may also update the\n * content of the original ItemList.\n *\n * @param keepPrimitives Converts item content to objects and sets the\n * `itemName` property on them.\n */\n toArray(keepPrimitives: true): (T extends object ? T & Readonly<{ itemName: string }> : T)[];\n\n toArray(keepPrimitives: boolean = false): T[] | (T & Readonly<{ itemName: string }>)[] {\n const items: Item[] = Object.keys(this._items).map((key, i) => {\n const item = this._items[key];\n\n if (!keepPrimitives || isObject(item.content)) {\n // Convert content to object, then proxy it\n return {\n ...item,\n content: this.createItemContentProxy(isObject(item.content) ? item.content : Object(item.content), key),\n };\n } else {\n // ...otherwise just return a clone of the item.\n return { ...item };\n }\n });\n\n return items.sort((a, b) => b.priority - a.priority).map((item) => item.content);\n }\n\n /**\n * A read-only map of all keys to their respective items in no particular order.\n *\n * We don't allow adding new items to the ItemList via setting new properties,\n * nor do we allow modifying existing items directly. You should use the\n * {@link ItemList.add}, {@link ItemList.setContent} and\n * {@link ItemList.setPriority} methods instead.\n *\n * To match the old behaviour of the `ItemList.items` property, call\n * `Object.values(ItemList.toObject())`.\n *\n * @example\n * const items = new ItemList();\n * items.add('b', 'My cool value', 20);\n * items.add('a', 'My value', 10);\n * items.toObject();\n * // {\n * // a: { content: 'My value', priority: 10, itemName: 'a' },\n * // b: { content: 'My cool value', priority: 20, itemName: 'b' },\n * // }\n */\n toObject(): DeepReadonly>> {\n return Object.keys(this._items).reduce((map, key) => {\n const obj = {\n content: this.get(key),\n itemName: key,\n priority: this.getPriority(key),\n };\n\n map[key] = obj;\n\n return map;\n }, {} as Record>);\n }\n\n /**\n * Proxies an item's content, adding the `itemName` readonly property to it.\n *\n * @example\n * createItemContentProxy({ foo: 'bar' }, 'myItem');\n * // { foo: 'bar', itemName: 'myItem' }\n *\n * @param content The item's content (objects only)\n * @param key The item's key\n * @return Proxied content\n *\n * @internal\n */\n private createItemContentProxy(content: C, key: string): Readonly {\n return new Proxy(content, {\n get(target, property, receiver) {\n if (property === 'itemName') return key;\n\n return Reflect.get(target, property, receiver);\n },\n set(target, property, value, receiver) {\n if (key !== null && property === 'itemName') {\n throw new Error('`itemName` property is read-only');\n }\n\n return Reflect.set(target, property, value, receiver);\n },\n }) as C & { itemName: string };\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport MajorUpdater from './MajorUpdater';\nimport ExtensionItem from './ExtensionItem';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport Alert from 'flarum/common/components/Alert';\nimport ItemList from '@flarum/core/src/common/utils/ItemList';\n\nexport interface IUpdaterAttrs extends ComponentAttrs {}\n\nexport type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;\n\nexport default class Updater extends Component {\n view() {\n const core = app.packageManager.control.coreUpdate;\n\n return [\n
\n \n

{app.translator.trans('flarum-package-manager.admin.updater.updater_help')}

\n {this.lastUpdateCheckView()}\n
{this.controlItems().toArray()}
\n {this.availableUpdatesView()}\n
,\n core && core.package['latest-major'] ? (\n \n ) : null,\n ];\n }\n\n lastUpdateCheckView() {\n return (\n (app.packageManager.control.lastUpdateCheck?.checkedAt && (\n

\n \n {app.translator.trans('flarum-package-manager.admin.updater.last_update_checked_at')}\n \n {humanTime(app.packageManager.control.lastUpdateCheck.checkedAt)}\n

\n )) ||\n null\n );\n }\n\n availableUpdatesView() {\n const state = app.packageManager.control;\n\n if (app.packageManager.control.isLoading()) {\n return (\n
\n \n
\n );\n }\n\n if (!(state.extensionUpdates.length || state.coreUpdate)) {\n return (\n
\n \n {app.translator.trans('flarum-package-manager.admin.updater.up_to_date')}\n \n
\n );\n }\n\n return (\n
\n
\n {state.coreUpdate ? (\n state.updateCoreMinor()}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {state.extensionUpdates.map((extension: Extension) => (\n state.updateExtension(extension)}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n
\n
\n );\n }\n\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'updateCheck',\n app.packageManager.control.checkForUpdates()}\n loading={app.packageManager.control.isLoading('check')}\n disabled={app.packageManager.control.isLoadingOtherThan('check')}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.check_for_updates')}\n ,\n 100\n );\n\n items.add(\n 'globalUpdate',\n app.packageManager.control.updateGlobally()}\n loading={app.packageManager.control.isLoading('global-update')}\n disabled={app.packageManager.control.isLoadingOtherThan('global-update')}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.run_global_update')}\n \n );\n\n return items;\n }\n}\n","import app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Alert from 'flarum/common/components/Alert';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Mithril from 'mithril';\n\nexport default class ControlSection extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n

{app.translator.trans('flarum-package-manager.admin.sections.control.title')}

\n
\n
\n
\n {app.data['flarum-package-manager.writable_dirs'] ? (\n <>\n \n \n \n ) : (\n
\n \n {app.translator.trans('flarum-package-manager.admin.file_permissions')}\n \n
\n )}\n
\n
\n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport ExtensionPage, { ExtensionPageAttrs } from 'flarum/admin/components/ExtensionPage';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nimport QueueSection from './QueueSection';\nimport ControlSection from './ControlSection';\n\nexport default class SettingsPage extends ExtensionPage {\n sections(vnode: Mithril.VnodeDOM): ItemList {\n const items = super.sections(vnode);\n\n items.setPriority('content', 10);\n\n items.add('control', , 8);\n\n if (parseInt(app.data.settings['flarum-package-manager.queue_jobs'])) {\n items.add('queue', , 5);\n }\n\n items.setPriority('permissions', 0);\n\n return items;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const BYTE_UNITS = [\n\t'B',\n\t'kB',\n\t'MB',\n\t'GB',\n\t'TB',\n\t'PB',\n\t'EB',\n\t'ZB',\n\t'YB',\n];\n\nconst BIBYTE_UNITS = [\n\t'B',\n\t'kiB',\n\t'MiB',\n\t'GiB',\n\t'TiB',\n\t'PiB',\n\t'EiB',\n\t'ZiB',\n\t'YiB',\n];\n\nconst BIT_UNITS = [\n\t'b',\n\t'kbit',\n\t'Mbit',\n\t'Gbit',\n\t'Tbit',\n\t'Pbit',\n\t'Ebit',\n\t'Zbit',\n\t'Ybit',\n];\n\nconst BIBIT_UNITS = [\n\t'b',\n\t'kibit',\n\t'Mibit',\n\t'Gibit',\n\t'Tibit',\n\t'Pibit',\n\t'Eibit',\n\t'Zibit',\n\t'Yibit',\n];\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number, locale, options) => {\n\tlet result = number;\n\tif (typeof locale === 'string' || Array.isArray(locale)) {\n\t\tresult = number.toLocaleString(locale, options);\n\t} else if (locale === true || options !== undefined) {\n\t\tresult = number.toLocaleString(undefined, options);\n\t}\n\n\treturn result;\n};\n\nexport default function prettyBytes(number, options) {\n\tif (!Number.isFinite(number)) {\n\t\tthrow new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);\n\t}\n\n\toptions = {\n\t\tbits: false,\n\t\tbinary: false,\n\t\t...options,\n\t};\n\n\tconst UNITS = options.bits\n\t\t? (options.binary ? BIBIT_UNITS : BIT_UNITS)\n\t\t: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);\n\n\tif (options.signed && number === 0) {\n\t\treturn ` 0 ${UNITS[0]}`;\n\t}\n\n\tconst isNegative = number < 0;\n\tconst prefix = isNegative ? '-' : (options.signed ? '+' : '');\n\n\tif (isNegative) {\n\t\tnumber = -number;\n\t}\n\n\tlet localeOptions;\n\n\tif (options.minimumFractionDigits !== undefined) {\n\t\tlocaleOptions = {minimumFractionDigits: options.minimumFractionDigits};\n\t}\n\n\tif (options.maximumFractionDigits !== undefined) {\n\t\tlocaleOptions = {maximumFractionDigits: options.maximumFractionDigits, ...localeOptions};\n\t}\n\n\tif (number < 1) {\n\t\tconst numberString = toLocaleString(number, options.locale, localeOptions);\n\t\treturn prefix + numberString + ' ' + UNITS[0];\n\t}\n\n\tconst exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);\n\tnumber /= (options.binary ? 1024 : 1000) ** exponent;\n\n\tif (!localeOptions) {\n\t\tnumber = number.toPrecision(3);\n\t}\n\n\tconst numberString = toLocaleString(Number(number), options.locale, localeOptions);\n\n\tconst unit = UNITS[exponent];\n\n\treturn prefix + numberString + ' ' + unit;\n}\n","import Model from 'flarum/common/Model';\nimport prettyBytes from 'pretty-bytes';\n\nexport type TaskOperations =\n | 'extension_install'\n | 'extension_remove'\n | 'extension_update'\n | 'update_global'\n | 'update_minor'\n | 'update_major'\n | 'update_check'\n | 'why_not';\n\nexport default class Task extends Model {\n status() {\n return Model.attribute<'pending' | 'running' | 'failure' | 'success'>('status').call(this);\n }\n\n operation() {\n return Model.attribute('operation').call(this);\n }\n\n command() {\n return Model.attribute('command').call(this);\n }\n\n package() {\n return Model.attribute('package').call(this);\n }\n\n output() {\n return Model.attribute('output').call(this);\n }\n\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n startedAt() {\n return Model.attribute('startedAt', Model.transformDate).call(this);\n }\n\n finishedAt() {\n return Model.attribute('finishedAt', Model.transformDate).call(this);\n }\n\n peakMemoryUsed() {\n return prettyBytes(Model.attribute('peakMemoryUsed').call(this) * 1024);\n }\n}\n","import app from 'flarum/admin/app';\nimport Task from '../models/Task';\nimport { ApiQueryParamsPlural } from 'flarum/common/Store';\n\nexport default class QueueState {\n private tasks: Task[] | null = null;\n private limit = 20;\n private offset = 0;\n private total = 0;\n\n load(params?: ApiQueryParamsPlural) {\n this.tasks = null;\n params = {\n page: {\n limit: this.limit,\n offset: this.offset,\n ...params?.page,\n },\n ...params,\n };\n\n return app.store.find('package-manager-tasks', params || {}).then((data) => {\n this.tasks = data;\n this.total = data.payload.meta?.total;\n\n m.redraw();\n\n return data;\n });\n }\n\n getItems() {\n return this.tasks;\n }\n\n getTotalPages(): number {\n return Math.ceil(this.total / this.limit);\n }\n\n pageNumber(): number {\n return Math.ceil(this.offset / this.limit);\n }\n\n hasPrev(): boolean {\n return this.pageNumber() !== 0;\n }\n\n hasNext(): boolean {\n return this.offset + this.limit < this.total;\n }\n\n prev(): void {\n if (this.hasPrev()) {\n this.offset -= this.limit;\n this.load();\n }\n }\n\n next(): void {\n if (this.hasNext()) {\n this.offset += this.limit;\n this.load();\n }\n }\n}\n","import app from 'flarum/admin/app';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport { UpdaterLoadingTypes } from '../components/Updater';\nimport { InstallerLoadingTypes } from '../components/Installer';\nimport { MajorUpdaterLoadingTypes } from '../components/MajorUpdater';\nimport { AsyncBackendResponse } from '../shims';\nimport errorHandler from '../utils/errorHandler';\nimport jumpToQueue from '../utils/jumpToQueue';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport type UpdatedPackage = {\n name: string;\n version: string;\n latest: string;\n 'latest-minor': string | null;\n 'latest-major': string | null;\n 'latest-status': string;\n description: string;\n};\n\nexport type ComposerUpdates = {\n installed: UpdatedPackage[];\n};\n\nexport type LastUpdateCheck = {\n checkedAt: Date | null;\n updates: ComposerUpdates;\n};\n\ntype UpdateType = 'major' | 'minor' | 'global';\ntype UpdateStatus = 'success' | 'failure' | null;\nexport type UpdateState = {\n ranAt: Date | null;\n status: UpdateStatus;\n limitedPackages: string[];\n incompatibleExtensions: string[];\n};\n\nexport type LastUpdateRun = {\n [key in UpdateType]: UpdateState;\n} & {\n limitedPackages: () => string[];\n};\n\nexport type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;\n\nexport type CoreUpdate = {\n package: UpdatedPackage;\n extension: Extension;\n};\n\nexport default class ControlSectionState {\n loading: LoadingTypes = null;\n\n public packageUpdates: Record = {};\n public lastUpdateCheck!: LastUpdateCheck;\n public extensionUpdates!: Extension[];\n public coreUpdate: CoreUpdate | null = null;\n get lastUpdateRun(): LastUpdateRun {\n const lastUpdateRun = JSON.parse(app.data.settings['flarum-package-manager.last_update_run']) as LastUpdateRun;\n\n lastUpdateRun.limitedPackages = () => [\n ...lastUpdateRun.major.limitedPackages,\n ...lastUpdateRun.minor.limitedPackages,\n ...lastUpdateRun.global.limitedPackages,\n ];\n\n return lastUpdateRun;\n }\n\n constructor() {\n this.lastUpdateCheck = JSON.parse(app.data.settings['flarum-package-manager.last_update_check']) as LastUpdateCheck;\n this.extensionUpdates = this.formatExtensionUpdates(this.lastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(this.lastUpdateCheck);\n }\n\n isLoading(name: LoadingTypes = null): boolean {\n return (name && this.loading === name) || (!name && this.loading !== null);\n }\n\n isLoadingOtherThan(name: LoadingTypes): boolean {\n return this.loading !== null && this.loading !== name;\n }\n\n setLoading(name: LoadingTypes): void {\n this.loading = name;\n }\n\n checkForUpdates() {\n this.setLoading('check');\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/check-for-updates`,\n })\n .then((response) => {\n if ((response as AsyncBackendResponse).processing) {\n jumpToQueue();\n } else {\n this.lastUpdateCheck = response as LastUpdateCheck;\n this.extensionUpdates = this.formatExtensionUpdates(response as LastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(response as LastUpdateCheck);\n m.redraw();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n m.redraw();\n });\n }\n\n updateCoreMinor() {\n if (confirm(extractText(app.translator.trans('flarum-package-manager.admin.minor_update_confirmation.content')))) {\n app.modal.show(LoadingModal);\n this.setLoading('minor-update');\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/minor-update`,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n }\n\n updateExtension(extension: Extension) {\n app.modal.show(LoadingModal);\n this.setLoading('extension-update');\n\n app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${extension.id}`,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show(\n { type: 'success' },\n app.translator.trans('flarum-package-manager.admin.extensions.successful_update', {\n extension: extension.extra['flarum-extension'].title,\n })\n );\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n\n updateGlobally() {\n app.modal.show(LoadingModal);\n this.setLoading('global-update');\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/global-update`,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.updater.global_update_successful'));\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n\n formatExtensionUpdates(lastUpdateCheck: LastUpdateCheck): Extension[] {\n this.packageUpdates = {};\n\n lastUpdateCheck?.updates?.installed?.filter((composerPackage: UpdatedPackage) => {\n const id = composerPackage.name.replace('/', '-').replace(/(flarum-ext-)|(flarum-)/, '');\n\n const extension = app.data.extensions[id];\n const safeToUpdate = ['semver-safe-update', 'update-possible'].includes(composerPackage['latest-status']);\n\n if (extension && safeToUpdate) {\n this.packageUpdates[extension.id] = composerPackage;\n }\n\n return extension && safeToUpdate;\n });\n\n return (Object.values(app.data.extensions) as Extension[]).filter((extension: Extension) => this.packageUpdates[extension.id]);\n }\n\n formatCoreUpdate(lastUpdateCheck: LastUpdateCheck): CoreUpdate | null {\n const core = lastUpdateCheck?.updates?.installed?.filter((composerPackage: UpdatedPackage) => composerPackage.name === 'flarum/core').pop();\n\n if (!core) return null;\n\n return {\n package: core,\n extension: {\n id: 'flarum-core',\n name: 'flarum/core',\n version: app.data.settings.version,\n icon: {\n // @ts-ignore\n backgroundImage: `url(${app.data.resources[0]['attributes']['baseUrl']}/assets/extensions/flarum-package-manager/flarum.svg`,\n },\n extra: {\n 'flarum-extension': {\n title: extractText(app.translator.trans('flarum-package-manager.admin.updater.flarum')),\n },\n },\n },\n };\n }\n}\n","import QueueState from './QueueState';\nimport ControlSectionState from './ControlSectionState';\n\nexport default class PackageManagerState {\n public queue: QueueState = new QueueState();\n public control: ControlSectionState = new ControlSectionState();\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport isExtensionEnabled from 'flarum/admin/utils/isExtensionEnabled';\nimport Alert from 'flarum/common/components/Alert';\n\nimport SettingsPage from './components/SettingsPage';\nimport Task from './models/Task';\nimport jumpToQueue from './utils/jumpToQueue';\nimport extractText from 'flarum/common/utils/extractText';\nimport { AsyncBackendResponse } from './shims';\nimport PackageManagerState from './states/PackageManagerState';\n\napp.initializers.add('flarum-package-manager', (app) => {\n app.store.models['package-manager-tasks'] = Task;\n\n app.packageManager = new PackageManagerState();\n\n app.extensionData\n .for('flarum-package-manager')\n .registerSetting(() => (\n
\n \n {app.translator.trans('flarum-package-manager.admin.settings.access_warning')}\n \n
\n ))\n .registerSetting({\n setting: 'flarum-package-manager.queue_jobs',\n label: app.translator.trans('flarum-package-manager.admin.settings.queue_jobs'),\n help: m.trust(\n extractText(\n app.translator.trans('flarum-package-manager.admin.settings.queue_jobs_help', {\n basic_impl_link: 'https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting',\n adv_impl_link: 'https://discuss.flarum.org/d/21873-redis-sessions-cache-queues',\n php_version: `${app.data.phpVersion}`,\n folder_perms_link: 'https://docs.flarum.org/install#folder-ownership',\n })\n )\n ),\n default: false,\n type: 'boolean',\n disabled: app.data['flarum-package-manager.using_sync_queue'],\n })\n .registerPage(SettingsPage);\n\n extend(ExtensionPage.prototype, 'topItems', function (items) {\n if (this.extension.id === 'flarum-package-manager' || isExtensionEnabled(this.extension.id)) {\n return;\n }\n\n items.add(\n 'remove',\n {\n app.modal.show(LoadingModal);\n\n app\n .request({\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${this.extension.id}`,\n method: 'DELETE',\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.extensions.successful_remove'));\n window.location = app.forum.attribute('adminUrl');\n }\n })\n .finally(() => {\n app.modal.close();\n });\n }}\n >\n Remove\n \n );\n });\n});\n"],"names":["module","exports","t","s","n","i","e","r","o","u","h","a","d","years","months","days","hours","minutes","seconds","milliseconds","weeks","c","p","f","$l","m","l","$","Math","ceil","floor","y","abs","g","negative","format","this","$d","$ms","parseFromMilliseconds","Object","keys","forEach","calMilliseconds","match","slice","map","Number","prototype","reduce","toISOString","toJSON","Y","YY","YYYY","M","MM","D","DD","H","HH","mm","ss","SSS","replace","String","as","get","add","subtract","locale","clone","humanize","fromNow","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","$utils","duration","isDuration","bind","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call","getter","__esModule","definition","key","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","length","indexOf","Label","view","vnode","attrs","className","type","classList","children","Component","TaskOutputModal","title","app","task","operation","content","command","output","Modal","Pagination","disabled","list","hasPrev","onclick","prev","icon","current","pageNumber","total","getTotalPages","hasNext","next","QueueSection","oninit","id","queueTable","columns","items","ItemList","label","extractText","operationIcon","extension","style","name","extra","running","failure","pending","success","status","startedAt","text","dayjs","finishedAt","start","end","extend","durationTime","diff","humanDuration","peakMemoryUsed","tasks","toArray","item","index","update_check","update_major","update_minor","update_global","extension_install","extension_remove","extension_update","why_not","error","response","errors","includes","code","guessed_cause","jumpToQueue","route","set","setTimeout","document","getElementById","scrollIntoView","block","window","Installer","packageName","Stream","htmlFor","extiverse","href","placeholder","bidi","onsubmit","loading","data","package","LoadingModal","method","url","body","then","processing","extensionId","location","reload","errorHandler","redraw","WhyNotModal","whyNot","oncreate","requestWhyNot","reason","ExtensionItem","updates","onClickUpdate","whyNotWarning","isCore","isDanger","latestVersion","version","v","MajorUpdater","updateState","alt","src","coreUpdate","update","incompatibleExtensions","dismissible","controls","dryRun","pop","incompatible_extensions","_extends","assign","arguments","apply","_defineProperties","props","descriptor","configurable","writable","_createClass","Constructor","protoProps","staticProps","isObject","Item","priority","_items","isEmpty","has","getPriority","setContent","Error","setPriority","remove","merge","otherList","val","keepPrimitives","createItemContentProxy","sort","b","toObject","itemName","Proxy","property","receiver","Reflect","console","warn","Updater","lastUpdateCheckView","controlItems","availableUpdatesView","checkedAt","humanTime","state","extensionUpdates","updateCoreMinor","lastUpdateRun","limitedPackages","packageUpdates","updateExtension","ControlSection","SettingsPage","sections","parseInt","ExtensionPage","BYTE_UNITS","BIBYTE_UNITS","BIT_UNITS","BIBIT_UNITS","toLocaleString","number","options","result","Array","isArray","Task","Model","createdAt","isFinite","TypeError","UNITS","bits","binary","signed","localeOptions","isNegative","prefix","minimumFractionDigits","maximumFractionDigits","exponent","min","log","log10","toPrecision","prettyBytes","QueueState","limit","offset","load","params","page","payload","meta","getItems","ControlSectionState","lastUpdateCheck","JSON","parse","formatExtensionUpdates","formatCoreUpdate","isLoading","isLoadingOtherThan","setLoading","checkForUpdates","confirm","updateGlobally","installed","filter","composerPackage","safeToUpdate","values","backgroundImage","major","minor","global","PackageManagerState","queue","control","store","models","packageManager","extensionData","registerSetting","translator","trans","setting","help","trust","basic_impl_link","adv_impl_link","php_version","phpVersion","folder_perms_link","default","registerPage","isExtensionEnabled","modal","show","request","forum","attribute","alerts","close"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/pusher/js/dist/forum.js b/extensions/pusher/js/dist/forum.js index c92ba25c1f..30b4f1db2e 100644 --- a/extensions/pusher/js/dist/forum.js +++ b/extensions/pusher/js/dist/forum.js @@ -1,3 +1,3 @@ /*! For license information please see forum.js.LICENSE.txt */ -(()=>{var t={440:(t,e,r)=>{var n=r(75).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new S(n||[]);return u(i,"_invoke",{value:E(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var d={};function v(){}function m(){}function y(){}var g={};f(g,s,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==r&&i.call(x,s)&&(g=x);var b=y.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,u,a,s){var c=h(t[o],t,u);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var o;u(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=j(u,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function j(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var o=this.tryEntries[n],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(a&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,e,r)=>{var n=r(440)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";function t(t,e,r,n,o,i,u){try{var a=t[i](u),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,o)}r.r(n);var e=r(507),o=r.n(e);const i=flarum.core.compat["forum/app"];var u=r.n(i);const a=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/components/DiscussionList"];var c=r.n(s);const l=flarum.core.compat["forum/components/DiscussionPage"];var f=r.n(l);const p=flarum.core.compat["forum/components/IndexPage"];var h=r.n(p);const d=flarum.core.compat["common/components/Button"];var v=r.n(d);u().initializers.add("flarum-pusher",(function(){var e;u().pusher=(e=o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,import("//cdn.jsdelivr.net/npm/pusher-js@7.0.3/dist/web/pusher.min.js");case 2:return e=new Pusher(u().forum.attribute("pusherKey"),{authEndpoint:u().forum.attribute("apiUrl")+"/pusher/auth",cluster:u().forum.attribute("pusherCluster"),auth:{headers:{"X-CSRF-Token":u().session.csrfToken}}}),t.abrupt("return",{channels:{main:e.subscribe("public"),user:u().session.user?e.subscribe("private-user"+u().session.user.id()):null},pusher:e});case 4:case"end":return t.stop()}}),t)})),function(){var r=this,n=arguments;return new Promise((function(o,i){var u=e.apply(r,n);function a(e){t(u,o,i,a,s,"next",e)}function s(e){t(u,o,i,a,s,"throw",e)}a(void 0)}))})(),u().pushedUpdates=[],(0,a.extend)(c().prototype,"oncreate",(function(){u().pusher.then((function(t){t.pusher.bind("newPost",(function(t){var e=u().discussions.getParams();if(!e.q&&!e.sort&&!e.filter){if(e.tags){var r=u().store.getBy("tags","slug",e.tags),n=null==r?void 0:r.id();if(!n||!t.tagIds.includes(n))return}var o=String(t.discussionId);u().current.get("discussion")&&o===u().current.get("discussion").id()||-1!==u().pushedUpdates.indexOf(o)||(u().pushedUpdates.push(o),u().current.matches(h())&&u().setTitleCount(u().pushedUpdates.length),m.redraw())}}))}))})),(0,a.extend)(c().prototype,"onremove",(function(){u().pusher.then((function(t){t.pusher.unbind("newPost")}))})),(0,a.extend)(c().prototype,"view",(function(t){var e=this;if(u().pushedUpdates){var r=u().pushedUpdates.length;r&&"object"==typeof t&&t&&"children"in t&&t.children instanceof Array&&t.children.unshift(v().component({className:"Button Button--block DiscussionList-update",onclick:function(){e.attrs.state.refresh().then((function(){e.loadingUpdated=!1,u().pushedUpdates=[],u().setTitleCount(0),m.redraw()})),e.loadingUpdated=!0},loading:this.loadingUpdated},u().translator.trans("flarum-pusher.forum.discussion_list.show_updates_text",{count:r})))}})),(0,a.extend)(f().prototype,"oncreate",(function(){var t=this;u().pusher.then((function(e){e.pusher.bind("newPost",(function(e){var r,n=String(e.discussionId),o=null==(r=t.discussion)?void 0:r.id();if(t.discussion&&o===n&&t.stream){var i,a=null!=(i=t.discussion.commentCount())?i:0;u().store.find("discussions",o).then((function(){var e,r,n;null==(e=t.stream)||e.update().then(m.redraw),document.hasFocus()||(u().setTitleCount(Math.max(0,(null!=(r=null==(n=t.discussion)?void 0:n.commentCount())?r:0)-a)),window.addEventListener("focus",(function(){return u().setTitleCount(0)}),{once:!0}))}))}}))}))})),(0,a.extend)(f().prototype,"onremove",(function(){u().pusher.then((function(t){t.pusher.unbind("newPost")}))})),(0,a.extend)(h().prototype,"actionItems",(function(t){t.remove("refresh")})),u().pusher.then((function(t){var e=t.channels;e.user&&e.user.bind("notification",(function(){var t,e;u().session.user&&u().session.user.pushAttributes({unreadNotificationCount:null!=(t=u().session.user.unreadNotificationCount())?t:1,newNotificationCount:null!=(e=u().session.user.newNotificationCount())?e:1}),u().notifications.clear(),m.redraw()}))}))}))})(),module.exports=n})(); +(()=>{var t={440:(t,e,r)=>{var n=r(75).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new S(n||[]);return u(i,"_invoke",{value:E(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var d={};function v(){}function m(){}function y(){}var g={};f(g,s,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==r&&i.call(x,s)&&(g=x);var b=y.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,u,a,s){var c=h(t[o],t,u);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var o;u(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=j(u,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function j(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var o=this.tryEntries[n],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(a&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,e,r)=>{var n=r(440)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";function t(t,e,r,n,o,i,u){try{var a=t[i](u),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,o)}r.r(n);var e=r(507),o=r.n(e);const i=flarum.core.compat["forum/app"];var u=r.n(i);const a=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/components/DiscussionList"];var c=r.n(s);const l=flarum.core.compat["forum/components/DiscussionPage"];var f=r.n(l);const p=flarum.core.compat["forum/components/IndexPage"];var h=r.n(p);const d=flarum.core.compat["common/components/Button"];var v=r.n(d);u().initializers.add("flarum-pusher",(function(){var e;u().pusher=(e=o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,import("//cdn.jsdelivr.net/npm/pusher-js@7.0.3/dist/web/pusher.min.js");case 2:return e=new Pusher(u().forum.attribute("pusherKey"),{authEndpoint:u().forum.attribute("apiUrl")+"/pusher/auth",cluster:u().forum.attribute("pusherCluster"),auth:{headers:{"X-CSRF-Token":u().session.csrfToken}}}),t.abrupt("return",{channels:{main:e.subscribe("public"),user:u().session.user?e.subscribe("private-user"+u().session.user.id()):null},pusher:e});case 4:case"end":return t.stop()}}),t)})),function(){var r=this,n=arguments;return new Promise((function(o,i){var u=e.apply(r,n);function a(e){t(u,o,i,a,s,"next",e)}function s(e){t(u,o,i,a,s,"throw",e)}a(void 0)}))})(),u().pushedUpdates=[],(0,a.extend)(c().prototype,"oncreate",(function(){u().pusher.then((function(t){t.pusher.bind("newPost",(function(t){var e=u().discussions.getParams();if(!e.q&&!e.sort&&!e.filter){if(e.tags){var r=u().store.getBy("tags","slug",e.tags),n=null==r?void 0:r.id();if(!n||!t.tagIds.includes(n))return}var o=String(t.discussionId);u().current.get("discussion")&&o===u().current.get("discussion").id()||-1!==u().pushedUpdates.indexOf(o)||(u().pushedUpdates.push(o),u().current.matches(h())&&u().setTitleCount(u().pushedUpdates.length),m.redraw())}}))}))})),(0,a.extend)(c().prototype,"onremove",(function(){u().pusher.then((function(t){t.pusher.unbind("newPost")}))})),(0,a.extend)(c().prototype,"view",(function(t){var e=this;if(u().pushedUpdates){var r=u().pushedUpdates.length;r&&"object"==typeof t&&t&&"children"in t&&t.children instanceof Array&&t.children.unshift(m(v(),{className:"Button Button--block DiscussionList-update",onclick:function(){e.attrs.state.refresh().then((function(){e.loadingUpdated=!1,u().pushedUpdates=[],u().setTitleCount(0),m.redraw()})),e.loadingUpdated=!0},loading:this.loadingUpdated},u().translator.trans("flarum-pusher.forum.discussion_list.show_updates_text",{count:r})))}})),(0,a.extend)(f().prototype,"oncreate",(function(){var t=this;u().pusher.then((function(e){e.pusher.bind("newPost",(function(e){var r,n=String(e.discussionId),o=null==(r=t.discussion)?void 0:r.id();if(t.discussion&&o===n&&t.stream){var i,a=null!=(i=t.discussion.commentCount())?i:0;u().store.find("discussions",o).then((function(){var e,r,n;null==(e=t.stream)||e.update().then(m.redraw),document.hasFocus()||(u().setTitleCount(Math.max(0,(null!=(r=null==(n=t.discussion)?void 0:n.commentCount())?r:0)-a)),window.addEventListener("focus",(function(){return u().setTitleCount(0)}),{once:!0}))}))}}))}))})),(0,a.extend)(f().prototype,"onremove",(function(){u().pusher.then((function(t){t.pusher.unbind("newPost")}))})),(0,a.extend)(h().prototype,"actionItems",(function(t){t.remove("refresh")})),u().pusher.then((function(t){var e=t.channels;e.user&&e.user.bind("notification",(function(){var t,e;u().session.user&&u().session.user.pushAttributes({unreadNotificationCount:null!=(t=u().session.user.unreadNotificationCount())?t:1,newNotificationCount:null!=(e=u().session.user.newNotificationCount())?e:1}),u().notifications.clear(),m.redraw()}))}))}))})(),module.exports=n})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/pusher/js/dist/forum.js.map b/extensions/pusher/js/dist/forum.js.map index 3646c95e02..e9f0da3b98 100644 --- a/extensions/pusher/js/dist/forum.js.map +++ b/extensions/pusher/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";2BAAA,IAAIA,EAAUC,EAAAA,IAAAA,QACd,SAASC,IACP,aACAC,EAAOC,QAAUF,EAAsB,WACrC,OAAOE,CACT,EAAGD,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,QACxE,IAAIA,EAAU,CAAC,EACbE,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eACZC,EAAiBJ,OAAOI,gBAA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jC,EAAG,EAAKF,WAAWG,gBAAc,EAAI,EAEnDrD,IAAAA,MAAAA,KAAe,cAAegC,GAAcrI,MAAK,WAAM,MAG3B,IAFf,OAAX,IAAKwJ,SAAL,EAAaG,SAAS3J,KAAKuI,EAAEC,QAExBoB,SAASC,aACZxD,IAAAA,cAAkByD,KAAKC,IAAI,GAAmC,OAAhC,EAAgB,OAAhB,EAAC,EAAKR,iBAAU,EAAf,EAAiBG,gBAAc,EAAI,GAAKD,IAEvEO,OAAOC,iBAAiB,SAAS,kBAAM5D,IAAAA,cAAkB,EAAE,GAAE,CAAE6D,MAAM,IAEzE,GACF,CACF,GACF,GACF,KAEA7C,EAAAA,EAAAA,QAAOiC,IAAAA,UAA0B,YAAY,WAC3CjD,IAAAA,OAAAA,MAAgB,SAACkB,GACfA,EAAQN,OAAOwB,OAAO,UACxB,GACF,KAEApB,EAAAA,EAAAA,QAAOiB,IAAAA,UAAqB,eAAe,SAAC6B,GAC1CA,EAAMC,OAAO,UACf,IAEA/D,IAAAA,OAAAA,MAAgB,SAACkB,GACf,IAAMV,EAAWU,EAAQV,SAErBA,EAASG,MACXH,EAASG,KAAKQ,KAAK,gBAAgB,WACX,QAAlBnB,IAAAA,QAAAA,MACFA,IAAAA,QAAAA,KAAAA,eAAgC,CAC9BgE,wBAAmE,OAA5C,EAAEhE,IAAAA,QAAAA,KAAAA,2BAA0C,EAAI,EACvEiE,qBAA6D,OAAzC,EAAEjE,IAAAA,QAAAA,KAAAA,wBAAuC,EAAI,IAGrEA,IAAAA,cAAAA,QACAkC,EAAEC,QACJ,GAEJ,GACF","sources":["webpack://@flarum/pusher/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/pusher/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/pusher/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/pusher/webpack/bootstrap","webpack://@flarum/pusher/webpack/runtime/compat get default export","webpack://@flarum/pusher/webpack/runtime/define property getters","webpack://@flarum/pusher/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/pusher/webpack/runtime/make namespace object","webpack://@flarum/pusher/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/pusher/./src/forum/index.ts"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","import * as PusherTypes from 'pusher-js';\nimport app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type { Children } from 'mithril';\nimport type Tag from 'flarum/tags/common/models/Tag';\n\nexport type PusherBinding = {\n channels: {\n main: PusherTypes.Channel;\n user: PusherTypes.Channel | null;\n };\n pusher: PusherTypes.default;\n};\n\napp.initializers.add('flarum-pusher', () => {\n app.pusher = (async () => {\n // @ts-expect-error\n await import('//cdn.jsdelivr.net/npm/pusher-js@7.0.3/dist/web/pusher.min.js' /* webpackIgnore: true, webpackPrefetch: true */);\n\n // @ts-expect-error Imported dynamically\n const socket: PusherTypes.default = new Pusher(app.forum.attribute('pusherKey'), {\n authEndpoint: `${app.forum.attribute('apiUrl')}/pusher/auth`,\n cluster: app.forum.attribute('pusherCluster'),\n auth: {\n headers: {\n 'X-CSRF-Token': app.session.csrfToken,\n },\n },\n });\n\n return {\n channels: {\n main: socket.subscribe('public'),\n user: app.session.user ? socket.subscribe(`private-user${app.session.user.id()}`) : null,\n },\n pusher: socket,\n };\n })();\n\n app.pushedUpdates = [];\n\n extend(DiscussionList.prototype, 'oncreate', function () {\n app.pusher.then((binding: PusherBinding) => {\n const pusher = binding.pusher;\n\n pusher.bind('newPost', (data: { tagIds: string[]; discussionId: number }) => {\n const params = app.discussions.getParams();\n\n if (!params.q && !params.sort && !params.filter) {\n if (params.tags) {\n const tag = app.store.getBy('tags', 'slug', params.tags);\n const tagId = tag?.id();\n\n if (!tagId || !data.tagIds.includes(tagId)) return;\n }\n\n const id = String(data.discussionId);\n\n if ((!app.current.get('discussion') || id !== app.current.get('discussion').id()) && app.pushedUpdates.indexOf(id) === -1) {\n app.pushedUpdates.push(id);\n\n if (app.current.matches(IndexPage)) {\n app.setTitleCount(app.pushedUpdates.length);\n }\n\n m.redraw();\n }\n }\n });\n });\n });\n\n extend(DiscussionList.prototype, 'onremove', function () {\n app.pusher.then((binding: PusherBinding) => {\n binding.pusher.unbind('newPost');\n });\n });\n\n extend(DiscussionList.prototype, 'view', function (this: DiscussionList, vdom: Children) {\n if (app.pushedUpdates) {\n const count = app.pushedUpdates.length;\n\n if (count && typeof vdom === 'object' && vdom && 'children' in vdom && vdom.children instanceof Array) {\n vdom.children.unshift(\n Button.component(\n {\n className: 'Button Button--block DiscussionList-update',\n onclick: () => {\n this.attrs.state.refresh().then(() => {\n this.loadingUpdated = false;\n app.pushedUpdates = [];\n app.setTitleCount(0);\n m.redraw();\n });\n this.loadingUpdated = true;\n },\n loading: this.loadingUpdated,\n },\n app.translator.trans('flarum-pusher.forum.discussion_list.show_updates_text', { count })\n )\n );\n }\n }\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function (this: DiscussionPage) {\n app.pusher.then((binding: PusherBinding) => {\n const pusher = binding.pusher;\n\n pusher.bind('newPost', (data: { discussionId: number }) => {\n const id = String(data.discussionId);\n const discussionId = this.discussion?.id();\n\n if (this.discussion && discussionId === id && this.stream) {\n const oldCount = this.discussion.commentCount() ?? 0;\n\n app.store.find('discussions', discussionId).then(() => {\n this.stream?.update().then(m.redraw);\n\n if (!document.hasFocus()) {\n app.setTitleCount(Math.max(0, (this.discussion?.commentCount() ?? 0) - oldCount));\n\n window.addEventListener('focus', () => app.setTitleCount(0), { once: true });\n }\n });\n }\n });\n });\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n app.pusher.then((binding: PusherBinding) => {\n binding.pusher.unbind('newPost');\n });\n });\n\n extend(IndexPage.prototype, 'actionItems', (items: ItemList) => {\n items.remove('refresh');\n });\n\n app.pusher.then((binding: PusherBinding) => {\n const channels = binding.channels;\n\n if (channels.user) {\n channels.user.bind('notification', () => {\n if (app.session.user) {\n app.session.user.pushAttributes({\n unreadNotificationCount: app.session.user.unreadNotificationCount() ?? 0 + 1,\n newNotificationCount: app.session.user.newNotificationCount() ?? 0 + 1,\n });\n }\n app.notifications.clear();\n m.redraw();\n });\n }\n });\n});\n"],"names":["_typeof","require","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","d","a","definition","o","get","prop","r","asyncGeneratorStep","gen","_next","_throw","flarum","core","compat","app","import","socket","Pusher","authEndpoint","cluster","auth","headers","channels","main","subscribe","user","pusher","args","arguments","apply","extend","DiscussionList","binding","bind","data","params","q","sort","filter","tags","tag","tagId","id","tagIds","includes","String","discussionId","IndexPage","m","redraw","unbind","vdom","count","children","Array","unshift","Button","className","onclick","attrs","refresh","loadingUpdated","loading","DiscussionPage","discussion","stream","oldCount","commentCount","update","document","hasFocus","Math","max","window","addEventListener","once","items","remove","unreadNotificationCount","newNotificationCount"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";2BAAA,IAAIA,EAAUC,EAAAA,IAAAA,QAC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@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/pusher/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/pusher/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/pusher/webpack/bootstrap","webpack://@flarum/pusher/webpack/runtime/compat get default export","webpack://@flarum/pusher/webpack/runtime/define property getters","webpack://@flarum/pusher/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/pusher/webpack/runtime/make namespace object","webpack://@flarum/pusher/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/pusher/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/pusher/./src/forum/index.tsx"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","import * as PusherTypes from 'pusher-js';\nimport app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type { Children } from 'mithril';\nimport type Tag from 'flarum/tags/common/models/Tag';\n\nexport type PusherBinding = {\n channels: {\n main: PusherTypes.Channel;\n user: PusherTypes.Channel | null;\n };\n pusher: PusherTypes.default;\n};\n\napp.initializers.add('flarum-pusher', () => {\n app.pusher = (async () => {\n // @ts-expect-error\n await import('//cdn.jsdelivr.net/npm/pusher-js@7.0.3/dist/web/pusher.min.js' /* webpackIgnore: true, webpackPrefetch: true */);\n\n // @ts-expect-error Imported dynamically\n const socket: PusherTypes.default = new Pusher(app.forum.attribute('pusherKey'), {\n authEndpoint: `${app.forum.attribute('apiUrl')}/pusher/auth`,\n cluster: app.forum.attribute('pusherCluster'),\n auth: {\n headers: {\n 'X-CSRF-Token': app.session.csrfToken,\n },\n },\n });\n\n return {\n channels: {\n main: socket.subscribe('public'),\n user: app.session.user ? socket.subscribe(`private-user${app.session.user.id()}`) : null,\n },\n pusher: socket,\n };\n })();\n\n app.pushedUpdates = [];\n\n extend(DiscussionList.prototype, 'oncreate', function () {\n app.pusher.then((binding: PusherBinding) => {\n const pusher = binding.pusher;\n\n pusher.bind('newPost', (data: { tagIds: string[]; discussionId: number }) => {\n const params = app.discussions.getParams();\n\n if (!params.q && !params.sort && !params.filter) {\n if (params.tags) {\n const tag = app.store.getBy('tags', 'slug', params.tags);\n const tagId = tag?.id();\n\n if (!tagId || !data.tagIds.includes(tagId)) return;\n }\n\n const id = String(data.discussionId);\n\n if ((!app.current.get('discussion') || id !== app.current.get('discussion').id()) && app.pushedUpdates.indexOf(id) === -1) {\n app.pushedUpdates.push(id);\n\n if (app.current.matches(IndexPage)) {\n app.setTitleCount(app.pushedUpdates.length);\n }\n\n m.redraw();\n }\n }\n });\n });\n });\n\n extend(DiscussionList.prototype, 'onremove', function () {\n app.pusher.then((binding: PusherBinding) => {\n binding.pusher.unbind('newPost');\n });\n });\n\n extend(DiscussionList.prototype, 'view', function (this: DiscussionList, vdom: Children) {\n if (app.pushedUpdates) {\n const count = app.pushedUpdates.length;\n\n if (count && typeof vdom === 'object' && vdom && 'children' in vdom && vdom.children instanceof Array) {\n vdom.children.unshift(\n {\n this.attrs.state.refresh().then(() => {\n this.loadingUpdated = false;\n app.pushedUpdates = [];\n app.setTitleCount(0);\n m.redraw();\n });\n this.loadingUpdated = true;\n }}\n loading={this.loadingUpdated}\n >\n {app.translator.trans('flarum-pusher.forum.discussion_list.show_updates_text', { count })}\n \n );\n }\n }\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function (this: DiscussionPage) {\n app.pusher.then((binding: PusherBinding) => {\n const pusher = binding.pusher;\n\n pusher.bind('newPost', (data: { discussionId: number }) => {\n const id = String(data.discussionId);\n const discussionId = this.discussion?.id();\n\n if (this.discussion && discussionId === id && this.stream) {\n const oldCount = this.discussion.commentCount() ?? 0;\n\n app.store.find('discussions', discussionId).then(() => {\n this.stream?.update().then(m.redraw);\n\n if (!document.hasFocus()) {\n app.setTitleCount(Math.max(0, (this.discussion?.commentCount() ?? 0) - oldCount));\n\n window.addEventListener('focus', () => app.setTitleCount(0), { once: true });\n }\n });\n }\n });\n });\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n app.pusher.then((binding: PusherBinding) => {\n binding.pusher.unbind('newPost');\n });\n });\n\n extend(IndexPage.prototype, 'actionItems', (items: ItemList) => {\n items.remove('refresh');\n });\n\n app.pusher.then((binding: PusherBinding) => {\n const channels = binding.channels;\n\n if (channels.user) {\n channels.user.bind('notification', () => {\n if (app.session.user) {\n app.session.user.pushAttributes({\n unreadNotificationCount: app.session.user.unreadNotificationCount() ?? 0 + 1,\n newNotificationCount: app.session.user.newNotificationCount() ?? 0 + 1,\n });\n }\n app.notifications.clear();\n m.redraw();\n });\n }\n });\n});\n"],"names":["_typeof","require","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","d","a","definition","o","get","prop","r","asyncGeneratorStep","gen","_next","_throw","flarum","core","compat","app","import","socket","Pusher","authEndpoint","cluster","auth","headers","channels","main","subscribe","user","pusher","args","arguments","apply","extend","DiscussionList","binding","bind","data","params","q","sort","filter","tags","tag","tagId","id","tagIds","includes","String","discussionId","IndexPage","m","redraw","unbind","vdom","count","children","Array","unshift","className","onclick","attrs","refresh","loadingUpdated","loading","DiscussionPage","discussion","stream","oldCount","commentCount","update","document","hasFocus","Math","max","window","addEventListener","once","items","remove","unreadNotificationCount","newNotificationCount"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/statistics/js/dist/admin.js b/extensions/statistics/js/dist/admin.js index 64c33bc9ab..32b84f6764 100644 --- a/extensions/statistics/js/dist/admin.js +++ b/extensions/statistics/js/dist/admin.js @@ -1,3 +1,3 @@ /*! For license information please see admin.js.LICENSE.txt */ -(()=>{var t={757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,i="millisecond",n="second",a="minute",r="hour",s="day",o="week",l="month",u="quarter",c="year",h="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},m=function(t,e,i){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(i)+t},g={s:m,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),n=Math.floor(i/60),a=i%60;return(e<=0?"+":"-")+m(n,2,"0")+":"+m(a,2,"0")},m:function t(e,i){if(e.date()1)return t(s[0])}else{var o=e.name;b[o]=e,a=o}return!n&&a&&(y=a),a||!n&&y},k=function(t,e){if(x(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new M(i)},D=g;D.l=w,D.i=x,D.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var M=function(){function v(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=v.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(D.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(f);if(n){var a=n[2]-1||0,r=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)):new Date(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return D},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var i=k(t);return this.startOf(e)<=i&&i<=this.endOf(e)},m.isAfter=function(t,e){return k(t)=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function a(t){return t.titleHeight+t.margins.top+t.paddings.top}function r(t){return t.margins.left+t.paddings.left}function s(t){return t.margins.top+t.margins.bottom+t.paddings.top+t.paddings.bottom+t.titleHeight+t.legendHeight}function o(t){return t.margins.left+t.margins.right+t.paddings.left+t.paddings.right}function l(t){return parseFloat(t.toFixed(2))}function u(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];i||(i=n?t[0]:t[t.length-1]);var a=new Array(Math.abs(e)).fill(i);return n?a.concat(t):t.concat(a)}function c(t,e){return(t+"").length*e}function h(t,e){return{x:Math.sin(t*kt)*e,y:Math.cos(t*kt)*e}}function d(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(Number.isNaN(t)||void 0===t||!Number.isFinite(t)||e&&t<0)}function f(t){var e=void 0,i=void 0,n=void 0;if(t instanceof Date)return new Date(t.getTime());if("object"!==(void 0===t?"undefined":lt(t))||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)i=t[n],e[n]=f(i);return e}function p(t,e){var i=void 0,n=void 0;return t<=e?(i=e-t,n=t):(i=t-e,n=e),[i,n]}function v(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-t.length;return i>0?t=u(t,i):e=u(e,i),[t,e]}function m(t,e){if(t)return t.length>e?t.slice(0,e-3)+"...":t}function g(t){var e=void 0;if("number"==typeof t)e=t;else if("string"==typeof t&&(e=Number(t),Number.isNaN(e)))return t;var i=Math.floor(Math.log10(Math.abs(e)));if(i<=2)return e;var n=Math.floor(i/3),a=Math.pow(10,i-3*n)*+(e/Math.pow(10,i)).toFixed(1);return Math.round(100*a)/100+" "+["","K","M","B","T"][n]}function y(t,e){for(var i=[],n=0;n255?255:t<0?0:t}function x(t,e){var i=Pt(t),n=!1;"#"==i[0]&&(i=i.slice(1),n=!0);var a=parseInt(i,16),r=b((a>>16)+e),s=b((a>>8&255)+e);return(n?"#":"")+(b((255&a)+e)|s<<8|r<<16).toString(16)}function w(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function k(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg",t);for(var n in e){var a=e[n];if("inside"===n)w(a).appendChild(i);else if("around"===n){var r=w(a);r.parentNode.insertBefore(i,r),i.appendChild(r)}else"styles"===n?"object"===(void 0===a?"undefined":lt(a))&&Object.keys(a).map((function(t){i.style[t]=a[t]})):("className"===n&&(n="class"),"innerHTML"===n?i.textContent=a:i.setAttribute(n,a))}return i}function D(t,e){return k("linearGradient",{inside:t,id:e,x1:0,x2:0,y1:0,y2:1})}function M(t,e,i,n){return k("stop",{inside:t,style:"stop-color: "+i,offset:e,"stop-opacity":n})}function P(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i={className:t,transform:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""};return e&&(i.inside=e),k("g",i)}function S(t){return k("path",{className:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d:t,styles:{stroke:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"none",fill:arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none","stroke-width":arguments.length>4&&void 0!==arguments[4]?arguments[4]:2}})}function L(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n="path-fill-gradient-"+e+"-"+(i?"lighter":"default"),a=D(t,n),r=[1,.6,.2];return i&&(r=[.4,.2,0]),M(a,"0%",e,r[0]),M(a,"50%",e,r[1]),M(a,"100%",e,r[2]),n}function O(t,e,i,n,a){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s={className:t,x:e,y:i,width:n,height:n,rx:a,fill:arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none"};return Object.keys(r).map((function(t){s[t]=r[t]})),k("rect",s)}function T(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=a.fontSize||Tt;return k("text",{className:t,x:e,y:i,dy:(void 0!==a.dy?a.dy:r/2)+"px","font-size":r+"px",fill:a.fill||Ct,"text-anchor":a.textAnchor||"start",innerHTML:n})}function A(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a.stroke||(a.stroke=At);var r=k("line",{className:"line-vertical "+a.className,x1:0,x2:0,y1:i,y2:n,styles:{stroke:a.stroke}}),s=k("text",{x:0,y:i>n?i+Lt:i-Lt-Tt,dy:Tt+"px","font-size":Tt+"px","text-anchor":"middle",innerHTML:e+""}),o=k("g",{transform:"translate("+t+", 0)"});return o.appendChild(r),o.appendChild(s),o}function C(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a.stroke||(a.stroke=At),a.lineType||(a.lineType=""),a.shortenNumbers&&(e=g(e));var r=k("line",{className:"line-horizontal "+a.className+("dashed"===a.lineType?"dashed":""),x1:i,x2:n,y1:0,y2:0,styles:{stroke:a.stroke}}),s=k("text",{x:i4&&void 0!==arguments[4]?arguments[4]:0,r=p(i,(arguments.length>5&&void 0!==arguments[5]?arguments[5]:{}).zeroLine),s=pt(r,2),o=s[0],l=s[1];return l-=a,"rect"!==t.nodeName?[[t.childNodes[0],{width:n,height:o},Et,jt],_(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,l],Yt)]:[[t,{width:n,height:o,x:e,y:l},Et,jt]]}function $(t,e){return[t,{d:e},Et,jt]}function Y(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"linear",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=t.cloneNode(!0),o=t.cloneNode(!0);for(var l in e){var u=void 0;u="transform"===l?document.createElementNS("http://www.w3.org/2000/svg","animateTransform"):document.createElementNS("http://www.w3.org/2000/svg","animate");var c=r[l]||t.getAttribute(l),h=e[l],d={attributeName:l,from:c,to:h,begin:"0s",dur:i/1e3+"s",values:c+";"+h,keySplines:zt[n],keyTimes:"0;1",calcMode:"spline",fill:"freeze"};for(var f in a&&(d.type=a),d)u.setAttribute(f,d[f]);s.appendChild(u),a?o.setAttribute(l,"translate("+h+")"):o.setAttribute(l,h)}return[s,o]}function W(t,e){t.style.transform=e,t.style.webkitTransform=e,t.style.msTransform=e,t.style.mozTransform=e,t.style.oTransform=e}function j(t,e){var i=[],n=[];e.map((function(t){var e,a,r=t[0],s=r.parentNode;t[0]=r;var o=Y.apply(void 0,vt(t)),l=pt(o,2);e=l[0],a=l[1],i.push(a),n.push([e,s]),s&&s.replaceChild(e,r)}));var a=t.cloneNode(!0);return n.map((function(t,n){t[1]&&(t[1].replaceChild(i[n],t[0]),e[n][0]=i[n])})),a}function z(t,e,i){if(0!==i.length){var n=j(e,i);e.parentNode==t&&(t.removeChild(e),t.appendChild(n)),setTimeout((function(){n.parentNode==t&&(t.removeChild(n),t.appendChild(e))}),Wt)}}function H(e){var i=e.cloneNode(!0);i.classList.add("chart-container"),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");var n=t.create("style",{innerHTML:Ht});i.insertBefore(n,i.firstChild);var a=t.create("div");return a.appendChild(i),a.innerHTML}function F(t){var e=new Date(t);return e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),e}function I(t){var e=t.getDate(),i=t.getMonth()+1;return[t.getFullYear(),(i>9?"":"0")+i,(e>9?"":"0")+e].join("-")}function R(t){return new Date(t.getTime())}function U(t,e){var i=q(t);return Math.ceil(function(t,e){var i=Vt*Ut;return(F(e)-F(t))/i}(i,e)/Rt)}function V(t,e){return t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}function B(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Bt[t];return e?i.slice(0,3):i}function G(t,e){return new Date(e,t+1,0)}function q(t){var e=R(t),i=e.getDay();return 0!==i&&J(e,-1*i),e}function J(t,e){t.setDate(t.getDate()+e)}function X(t,e,i){var n=Object.keys(Jt).filter((function(e){return t.includes(e)})),a=Jt[n[0]];return Object.assign(a,{constants:e,getData:i}),new qt(a)}function Z(t){if(0===t)return[0,0];if(isNaN(t))return{mantissa:-6755399441055744,exponent:972};var e=t>0?1:-1;if(!isFinite(t))return{mantissa:4503599627370496*e,exponent:972};t=Math.abs(t);var i=Math.floor(Math.log10(t));return[e*(t/Math.pow(10,i)),i]}function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Math.ceil(t),n=Math.floor(e),a=i-n,r=a,s=1;a>5&&(a%2!=0&&(a=++i-n),r=a/2,s=2),a<=2&&(s=a/(r=4)),0===a&&(r=5,s=1);for(var o=[],l=0;l<=r;l++)o.push(n+s*l);return o}function Q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Z(t),n=pt(i,2),a=n[0],r=n[1],s=e?e/Math.pow(10,r):0,o=K(a=a.toFixed(6),s);return o.map((function(t){return t*Math.pow(10,r)}))}function tt(t){function e(t,e){for(var i=Q(t),n=i[1]-i[0],a=0,r=1;a1&&void 0!==arguments[1]&&arguments[1],n=Math.max.apply(Math,vt(t)),a=Math.min.apply(Math,vt(t)),r=[];if(n>=0&&a>=0)Z(n)[1],r=i?Q(n,a):Q(n);else if(n>0&&a<0){var s=Math.abs(a);n>=s?(Z(n)[1],r=e(n,s)):(Z(s)[1],r=e(s,n).reverse().map((function(t){return-1*t})))}else if(n<=0&&a<=0){var o=Math.abs(a),l=Math.abs(n);Z(o)[1],r=(r=i?Q(o,l):Q(o)).reverse().map((function(t){return-1*t}))}return r}function et(t){var e=it(t);return t.indexOf(0)>=0?t.indexOf(0):t[0]>0?-1*t[0]/e:-1*t[t.length-1]/e+(t.length-1)}function it(t){return t[1]-t[0]}function nt(t){return t[t.length-1]-t[0]}function at(t,e){return l(e.zeroLine-t*e.scaleMultiplier)}function rt(t,e){return e.filter((function(e){return ei?n.slice(0,i):u(n,i-n.length,0),t.values=n}else t.values=a;t.chartType||(gt.includes(e),t.chartType=e)})),t.yRegions&&t.yRegions.map((function(t){if(t.end\n\t\t\t\t
    \n\t\t\t\t
    '}),this.hideTip(),this.title=this.container.querySelector(".title"),this.dataPointList=this.container.querySelector(".data-point-list"),this.parent.addEventListener("mouseleave",(function(){e.hideTip()}))}},{key:"fill",value:function(){var e,i=this;this.index&&this.container.setAttribute("data-point-index",this.index),e=this.titleValueFirst?""+this.titleValue+""+this.titleName:this.titleName+""+this.titleValue+"",this.title.innerHTML=e,this.dataPointList.innerHTML="",this.listValues.map((function(e,n){var a=i.colors[n]||"black",r=0===e.formatted||e.formatted?e.formatted:e.value,s=t.create("li",{styles:{"border-top":"3px solid "+a},innerHTML:''+(0===r||r?r:"")+"\n\t\t\t\t\t"+(e.title?e.title:"")});i.dataPointList.appendChild(s)}))}},{key:"calcPosition",value:function(){var t=this.container.offsetWidth;this.top=this.y-this.container.offsetHeight-5,this.left=this.x-t/2;var e=this.parent.offsetWidth-t,i=this.container.querySelector(".svg-pointer");if(this.left<0)i.style.left="calc(50% - "+-1*this.left+"px)",this.left=0;else if(this.left>e){var n="calc(50% + "+(this.left-e)+"px)";i.style.left=n,this.left=e}else i.style.left="50%"}},{key:"setValues",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;this.titleName=i.name,this.titleValue=i.value,this.listValues=n,this.x=t,this.y=e,this.titleValueFirst=i.valueFirst||0,this.index=a,this.refresh()}},{key:"hideTip",value:function(){this.container.style.top="0px",this.container.style.left="0px",this.container.style.opacity="0"}},{key:"showTip",value:function(){this.container.style.top=this.top+"px",this.container.style.left=this.left+"px",this.container.style.opacity="1"}}]),e}(),Mt={"light-blue":"#7cd6fd",blue:"#5e64ff",violet:"#743ee2",red:"#ff5858",orange:"#ffa00a",yellow:"#feef72",green:"#28a745","light-green":"#98d85b",purple:"#b554ff",magenta:"#ffa3ef",black:"#36114C",grey:"#bdd3e6","light-grey":"#f0f4f7","dark-grey":"#b8c2cc"},Pt=function(t){return/rgb[a]{0,1}\([\d, ]+\)/gim.test(t)?/\D+(\d*)\D+(\d*)\D+(\d*)/gim.exec(t).map((function(t,e){return 0!==e?Number(t).toString(16):"#"})).reduce((function(t,e){return""+t+e})):Mt[t]||t},St=6,Lt=4,Ot=15,Tt=10,At="#dadada",Ct="#555b51",_t={bar:function(t){var e=void 0;"rect"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var i=t.cloneNode();return i.style.fill="#000000",i.style.opacity="0.4",e&&i.setAttribute("transform",e),i},dot:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var i=t.cloneNode(),n=t.getAttribute("r"),a=t.getAttribute("fill");return i.setAttribute("r",parseInt(n)+4),i.setAttribute("fill",a),i.style.opacity="0.6",e&&i.setAttribute("transform",e),i},heat_square:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var i=t.cloneNode(),n=t.getAttribute("r"),a=t.getAttribute("fill");return i.setAttribute("r",parseInt(n)+4),i.setAttribute("fill",a),i.style.opacity="0.6",e&&i.setAttribute("transform",e),i}},Nt={bar:function(t,e){var i=void 0;"rect"!==t.nodeName&&(i=t.getAttribute("transform"),t=t.childNodes[0]);var n=["x","y","width","height"];Object.values(t.attributes).filter((function(t){return n.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),i&&e.setAttribute("transform",i)},dot:function(t,e){var i=void 0;"circle"!==t.nodeName&&(i=t.getAttribute("transform"),t=t.childNodes[0]);var n=["cx","cy"];Object.values(t.attributes).filter((function(t){return n.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),i&&e.setAttribute("transform",i)},heat_square:function(t,e){var i=void 0;"circle"!==t.nodeName&&(i=t.getAttribute("transform"),t=t.childNodes[0]);var n=["cx","cy"];Object.values(t.attributes).filter((function(t){return n.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),i&&e.setAttribute("transform",i)}},Et=350,$t=350,Yt=Et,Wt=250,jt="easein",zt={ease:"0.25 0.1 0.25 1",linear:"0 0 1 1",easein:"0.1 0.8 0.2 1",easeout:"0 0 0.58 1",easeinout:"0.42 0 0.58 1"},Ht=".chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Cantarell','Fira Sans','Droid Sans','Helvetica Neue',sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ul{padding-left:0;display:flex}.graph-svg-tip ol{padding-left:0;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:' ';border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}",Ft=function(){function e(t,i){if(ut(this,e),i=f(i),this.parent="string"==typeof t?document.querySelector(t):t,!(this.parent instanceof HTMLElement))throw new Error("No `parent` element to render on was provided.");this.rawChartArgs=i,this.title=i.title||"",this.type=i.type||"",this.realData=this.prepareData(i.data),this.data=this.prepareFirstData(this.realData),this.colors=this.validateColors(i.colors,this.type),this.config={showTooltip:1,showLegend:1,isNavigable:i.isNavigable||0,animate:void 0!==i.animate?i.animate:1,truncateLegends:i.truncateLegends||1},this.measures=JSON.parse(JSON.stringify(mt));var n=this.measures;this.setMeasures(i),this.title.length||(n.titleHeight=0),this.config.showLegend||(n.legendHeight=0),this.argHeight=i.height||n.baseHeight,this.state={},this.options={},this.initTimeout=700,this.config.isNavigable&&(this.overlays=[]),this.configure(i)}return ct(e,[{key:"prepareData",value:function(t){return t}},{key:"prepareFirstData",value:function(t){return t}},{key:"validateColors",value:function(t,e){var i=[];return(t=(t||[]).concat(wt[e])).forEach((function(t){var e=Pt(t);!function(t){return/(^\s*)(#)((?:[A-Fa-f0-9]{3}){1,2})$/i.test(t)||/(^\s*)(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/i.test(t)}(e)?console.warn('"'+t+'" is not a valid color.'):i.push(e)})),i}},{key:"setMeasures",value:function(){}},{key:"configure",value:function(){var t=this,e=this.argHeight;this.baseHeight=e,this.height=e-s(this.measures),this.boundDrawFn=function(){return t.draw(!0)},ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.boundDrawFn),this.resizeObserver.observe(this.parent)),window.addEventListener("resize",this.boundDrawFn),window.addEventListener("orientationchange",this.boundDrawFn)}},{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),window.removeEventListener("resize",this.boundDrawFn),window.removeEventListener("orientationchange",this.boundDrawFn)}},{key:"setup",value:function(){this.makeContainer(),this.updateWidth(),this.makeTooltip(),this.draw(!1,!0)}},{key:"makeContainer",value:function(){this.parent.innerHTML="";var e={inside:this.parent,className:"chart-container"};this.independentWidth&&(e.styles={width:this.independentWidth+"px"}),this.container=t.create("div",e)}},{key:"makeTooltip",value:function(){this.tip=new Dt({parent:this.container,colors:this.colors}),this.bindTooltip()}},{key:"bindTooltip",value:function(){}},{key:"draw",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&i(this.parent)||(this.updateWidth(),this.calc(e),this.makeChartArea(),this.setupComponents(),this.components.forEach((function(e){return e.setup(t.drawArea)})),this.render(this.components,!1),n&&(this.data=this.realData,setTimeout((function(){t.update(t.data)}),this.initTimeout)),this.renderLegend(),this.setupNavigation(n))}},{key:"calc",value:function(){}},{key:"updateWidth",value:function(){this.baseWidth=function(t){var e=window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.clientWidth-i}(this.parent),this.width=this.baseWidth-o(this.measures)}},{key:"makeChartArea",value:function(){this.svg&&this.container.removeChild(this.svg);var t=this.measures;this.svg=function(t,e,i,n){return k("svg",{className:e,inside:t,width:i,height:n})}(this.container,"frappe-chart chart",this.baseWidth,this.baseHeight),this.svgDefs=function(t){return k("defs",{inside:t})}(this.svg),this.title.length&&(this.titleEL=T("title",t.margins.left,t.margins.top,this.title,{fontSize:t.titleFontSize,fill:"#666666",dy:t.titleFontSize}));var e=a(t);this.drawArea=P(this.type+"-chart chart-draw-area","translate("+r(t)+", "+e+")"),this.config.showLegend&&(e+=this.height+t.paddings.bottom,this.legendArea=P("chart-legend","translate("+r(t)+", "+e+")")),this.title.length&&this.svg.appendChild(this.titleEL),this.svg.appendChild(this.drawArea),this.config.showLegend&&this.svg.appendChild(this.legendArea),this.updateTipOffset(r(t),a(t))}},{key:"updateTipOffset",value:function(t,e){this.tip.offset={x:t,y:e}}},{key:"setupComponents",value:function(){this.components=new Map}},{key:"update",value:function(t){t||console.error("No data to update."),this.data=this.prepareData(t),this.calc(),this.render(this.components,this.config.animate),this.renderLegend()}},{key:"render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.components,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.config.isNavigable&&this.overlays.map((function(t){return t.parentNode.removeChild(t)}));var n=[];e.forEach((function(t){n=n.concat(t.update(i))})),n.length>0?(z(this.container,this.svg,n),setTimeout((function(){e.forEach((function(t){return t.make()})),t.updateNav()}),400)):(e.forEach((function(t){return t.make()})),this.updateNav())}},{key:"updateNav",value:function(){this.config.isNavigable&&(this.makeOverlay(),this.bindUnits())}},{key:"renderLegend",value:function(){}},{key:"setupNavigation",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.config.isNavigable&&e&&(this.bindOverlay(),this.keyActions={13:this.onEnterKey.bind(this),37:this.onLeftArrow.bind(this),38:this.onUpArrow.bind(this),39:this.onRightArrow.bind(this),40:this.onDownArrow.bind(this)},document.addEventListener("keydown",(function(e){n(t.container)&&(e=e||window.event,t.keyActions[e.keyCode]&&t.keyActions[e.keyCode]())})))}},{key:"makeOverlay",value:function(){}},{key:"updateOverlay",value:function(){}},{key:"bindOverlay",value:function(){}},{key:"bindUnits",value:function(){}},{key:"onLeftArrow",value:function(){}},{key:"onRightArrow",value:function(){}},{key:"onUpArrow",value:function(){}},{key:"onDownArrow",value:function(){}},{key:"onEnterKey",value:function(){}},{key:"addDataPoint",value:function(){}},{key:"removeDataPoint",value:function(){}},{key:"getDataPoint",value:function(){}},{key:"setCurrentDataPoint",value:function(){}},{key:"updateDataset",value:function(){}},{key:"export",value:function(){var t=H(this.svg);!function(t,e){var i=document.createElement("a");i.style="display: none";var n=new Blob(e,{type:"image/svg+xml; charset=utf-8"}),a=window.URL.createObjectURL(n);i.href=a,i.download=t,document.body.appendChild(i),i.click(),setTimeout((function(){document.body.removeChild(i),window.URL.revokeObjectURL(a)}),300)}(this.title||"Chart",[t])}}]),e}(),It=function(t){function e(t,i){return ut(this,e),ft(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i))}return dt(e,t),ct(e,[{key:"configure",value:function(t){ht(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"configure",this).call(this,t),this.config.formatTooltipY=(t.tooltipOptions||{}).formatTooltipY,this.config.maxSlices=t.maxSlices||20,this.config.maxLegendPoints=t.maxLegendPoints||20}},{key:"calc",value:function(){var t=this,e=this.state,i=this.config.maxSlices;e.sliceTotals=[];var n=this.data.labels.map((function(e,i){var n=0;return t.data.datasets.map((function(t){n+=t.values[i]})),[n,e]})).filter((function(t){return t[0]>=0})),a=n;if(n.length>i){n.sort((function(t,e){return e[0]-t[0]})),a=n.slice(0,i-1);var r=0;n.slice(i-1).map((function(t){r+=t[0]})),a.push([r,"Rest"]),this.colors[i-1]="grey"}e.labels=[],a.map((function(t){e.sliceTotals.push(function(t){return Number(Math.round(t+"e4")+"e-4")}(t[0])),e.labels.push(t[1])})),e.grandTotal=e.sliceTotals.reduce((function(t,e){return t+e}),0),this.center={x:this.width/2,y:this.height/2}}},{key:"renderLegend",value:function(){var t=this,e=this.state;this.legendArea.textContent="",this.legendTotals=e.sliceTotals.slice(0,this.config.maxLegendPoints);var i=0,n=0;this.legendTotals.map((function(a,r){var s=150,l=Math.floor((t.width-o(t.measures))/s);t.legendTotals.lengthl&&(i=0,n+=20);var u=s*i+5,c=t.config.truncateLegends?m(e.labels[r],s/10):e.labels[r],h=t.config.formatTooltipY?t.config.formatTooltipY(a):a,d=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",a=arguments[4];a=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?m(a,Ot):a;var r={className:"legend-dot",cx:0,cy:0,r:i,fill:n},s=k("text",{className:"legend-dataset-text",x:0,y:0,dx:Tt+"px",dy:Tt/3+"px","font-size":1.2*Tt+"px","text-anchor":"start",fill:Ct,innerHTML:a}),o=k("g",{transform:"translate("+t+", "+e+")"});return o.appendChild(k("circle",r)),o.appendChild(s),o}(u,n,5,t.colors[r],c+": "+h,!1);t.legendArea.appendChild(d),i++}))}}]),e}(Ft),Rt=7,Ut=1e3,Vt=86400,Bt=["January","February","March","April","May","June","July","August","September","October","November","December"],Gt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qt=function(){function t(e){var i=e.layerClass,n=void 0===i?"":i,a=e.layerTransform,r=void 0===a?"":a,s=e.constants,o=e.getData,l=e.makeElements,u=e.animateElements;ut(this,t),this.layerTransform=r,this.constants=s,this.makeElements=l,this.getData=o,this.animateElements=u,this.store=[],this.labels=[],this.layerClass=n,this.layerClass="function"==typeof this.layerClass?this.layerClass():this.layerClass,this.refresh()}return ct(t,[{key:"refresh",value:function(t){this.data=t||this.getData()}},{key:"setup",value:function(t){this.layer=P(this.layerClass,this.layerTransform,t)}},{key:"make",value:function(){this.render(this.data),this.oldData=this.data}},{key:"render",value:function(t){var e=this;this.store=this.makeElements(t),this.layer.textContent="",this.store.forEach((function(t){e.layer.appendChild(t)})),this.labels.forEach((function(t){e.layer.appendChild(t)}))}},{key:"update",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.refresh();var e=[];return t&&(e=this.animateElements(this.data)||[]),e}}]),t}(),Jt={donutSlices:{layerClass:"donut-slices",makeElements:function(t){return t.sliceStrings.map((function(e,i){var n=S(e,"donut-path",t.colors[i],"none",t.strokeWidth);return n.style.transition="transform .3s;",n}))},animateElements:function(t){return this.store.map((function(e,i){return $(e,t.sliceStrings[i])}))}},pieSlices:{layerClass:"pie-slices",makeElements:function(t){return t.sliceStrings.map((function(e,i){var n=S(e,"pie-path","none",t.colors[i]);return n.style.transition="transform .3s;",n}))},animateElements:function(t){return this.store.map((function(e,i){return $(e,t.sliceStrings[i])}))}},percentageBars:{layerClass:"percentage-bars",makeElements:function(t){var e=this;return t.xPositions.map((function(i,n){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:yt,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none";return k("rect",{className:"percentage-bar",x:t,y:e,width:i,height:n,fill:r,styles:{stroke:x(r,-25),"stroke-dasharray":"0, "+(n+i)+", "+i+", "+n,"stroke-width":a}})}(i,0,t.widths[n],e.constants.barHeight,e.constants.barDepth,t.colors[n])}))},animateElements:function(t){if(t)return[]}},yAxis:{layerClass:"y axis",makeElements:function(t){var e=this;return t.positions.map((function(i,n){return function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};d(t)||(t=0),n.pos||(n.pos="left"),n.offset||(n.offset=0),n.mode||(n.mode="span"),n.stroke||(n.stroke=At),n.className||(n.className="");var a=-1*St,r="span"===n.mode?i+St:0;return"tick"===n.mode&&"right"===n.pos&&(a=i+St,r=i),C(t,e,a+=n.offset,r+=n.offset,{stroke:n.stroke,className:n.className,lineType:n.lineType,shortenNumbers:n.shortenNumbers})}(i,t.labels[n],e.constants.width,{mode:e.constants.mode,pos:e.constants.pos,shortenNumbers:e.constants.shortenNumbers})}))},animateElements:function(t){var e=t.positions,i=t.labels,n=this.oldData.positions,a=this.oldData.labels,r=v(n,e),s=pt(r,2);n=s[0],e=s[1];var o=v(a,i),l=pt(o,2);return a=l[0],i=l[1],this.render({positions:n,labels:i}),this.store.map((function(t,i){return N(t,e[i],n[i])}))}},xAxis:{layerClass:"x axis",makeElements:function(t){var e=this;return t.positions.map((function(i,n){return function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};d(t)||(t=0),n.pos||(n.pos="bottom"),n.offset||(n.offset=0),n.mode||(n.mode="span"),n.stroke||(n.stroke=At),n.className||(n.className="");var a=i+St,r="span"===n.mode?-1*St:i;return"tick"===n.mode&&"top"===n.pos&&(a=-1*St,r=0),A(t,e,a,r,{stroke:n.stroke,className:n.className,lineType:n.lineType})}(i,t.calcLabels[n],e.constants.height,{mode:e.constants.mode,pos:e.constants.pos})}))},animateElements:function(t){var e=t.positions,i=t.calcLabels,n=this.oldData.positions,a=this.oldData.calcLabels,r=v(n,e),s=pt(r,2);n=s[0],e=s[1];var o=v(a,i),l=pt(o,2);return a=l[0],i=l[1],this.render({positions:n,calcLabels:i}),this.store.map((function(t,i){return function(t,e,i){return _(t,[i,0],[e,0],Yt)}(t,e[i],n[i])}))}},yMarkers:{layerClass:"y-markers",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n.labelPos||(n.labelPos="right");var a=k("text",{className:"chart-label",x:"left"===n.labelPos?Lt:i-c(e,5)-Lt,y:0,dy:Tt/-2+"px","font-size":Tt+"px","text-anchor":"start",innerHTML:e+""}),r=C(t,"",0,i,{stroke:n.stroke||At,className:n.className||"",lineType:n.lineType});return r.appendChild(a),r}(t.position,t.label,e.constants.width,{labelPos:t.options.labelPos,mode:"span",lineType:"dashed"})}))},animateElements:function(t){var e=v(this.oldData,t),i=pt(e,2);this.oldData=i[0];var n=(t=i[1]).map((function(t){return t.position})),a=t.map((function(t){return t.label})),r=t.map((function(t){return t.options})),s=this.oldData.map((function(t){return t.position}));return this.render(s.map((function(t,e){return{position:s[e],label:a[e],options:r[e]}}))),this.store.map((function(t,e){return N(t,n[e],s[e])}))}},yRegions:{layerClass:"y-regions",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=t-e,s=k("rect",{className:"bar mini",styles:{fill:"rgba(228, 234, 239, 0.49)",stroke:At,"stroke-dasharray":i+", "+r},x:0,y:0,width:i,height:r});a.labelPos||(a.labelPos="right");var o=k("text",{className:"chart-label",x:"left"===a.labelPos?Lt:i-c(n+"",4.5)-Lt,y:0,dy:Tt/-2+"px","font-size":Tt+"px","text-anchor":"start",innerHTML:n+""}),l=k("g",{transform:"translate(0, "+e+")"});return l.appendChild(s),l.appendChild(o),l}(t.startPos,t.endPos,e.constants.width,t.label,{labelPos:t.options.labelPos})}))},animateElements:function(t){var e=v(this.oldData,t),i=pt(e,2);this.oldData=i[0];var n=(t=i[1]).map((function(t){return t.endPos})),a=t.map((function(t){return t.label})),r=t.map((function(t){return t.startPos})),s=t.map((function(t){return t.options})),o=this.oldData.map((function(t){return t.endPos})),l=this.oldData.map((function(t){return t.startPos}));this.render(o.map((function(t,e){return{startPos:l[e],endPos:o[e],label:a[e],options:s[e]}})));var u=[];return this.store.map((function(t,e){u=u.concat(function(t,e,i,n){var a=e-i,r=t.childNodes[0];return[[r,{height:a,"stroke-dasharray":r.getAttribute("width")+", "+a},Yt,jt],_(t,[0,n],[0,i],Yt)]}(t,r[e],n[e],o[e]))})),u}},heatDomain:{layerClass:function(){return"heat-domain domain-"+this.constants.index},makeElements:function(t){var e=this,i=this.constants,n=i.index,a=i.colWidth,r=i.rowHeight,s=i.squareSize,o=i.radius,l=i.xTranslate,u=0;return this.serializedSubDomains=[],t.cols.map((function(t,i){1===i&&e.labels.push(T("domain-name",l,-12,B(n,!0).toUpperCase(),{fontSize:9})),t.map((function(t,i){if(t.fill){var n={"data-date":t.yyyyMmDd,"data-value":t.dataValue,"data-day":i},a=O("day",l,u,s,o,t.fill,n);e.serializedSubDomains.push(a)}u+=r})),u=0,l+=a})),this.serializedSubDomains},animateElements:function(t){if(t)return[]}},barGraph:{layerClass:function(){return"dataset-units dataset-bars dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="bar",this.units=t.yPositions.map((function(i,n){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=p(e,o.zeroLine),u=pt(l,2),c=u[0],h=u[1];h-=s,0===c&&(c=o.minHeight,h-=o.minHeight),d(t)||(t=0),d(h)||(h=0),d(c,!0)||(c=0),d(i,!0)||(i=0);var f=k("rect",{className:"bar mini",style:"fill: "+n,"data-point-index":r,x:t,y:h,width:i,height:c});if((a+="")||a.length){f.setAttribute("y",0),f.setAttribute("x",0);var v=k("text",{className:"data-point-value",x:i/2,y:0,dy:Tt/2*-1+"px","font-size":Tt+"px","text-anchor":"middle",innerHTML:a}),m=k("g",{"data-point-index":r,transform:"translate("+t+", "+h+")"});return m.appendChild(f),m.appendChild(v),m}return f}(t.xPositions[n],i,t.barWidth,e.color,t.labels[n],n,t.offsets[n],{zeroLine:t.zeroLine,barsWidth:t.barsWidth,minHeight:e.minHeight})})),this.units},animateElements:function(t){var e=t.xPositions,i=t.yPositions,n=t.offsets,a=t.labels,r=this.oldData.xPositions,s=this.oldData.yPositions,o=this.oldData.offsets,l=this.oldData.labels,u=v(r,e),c=pt(u,2);r=c[0],e=c[1];var h=v(s,i),d=pt(h,2);s=d[0],i=d[1];var f=v(o,n),p=pt(f,2);o=p[0],n=p[1];var m=v(l,a),g=pt(m,2);l=g[0],a=g[1],this.render({xPositions:r,yPositions:s,offsets:o,labels:a,zeroLine:this.oldData.zeroLine,barsWidth:this.oldData.barsWidth,barWidth:this.oldData.barWidth});var y=[];return this.store.map((function(a,r){y=y.concat(E(a,e[r],i[r],t.barWidth,n[r],{zeroLine:t.zeroLine}))})),y}},lineGraph:{layerClass:function(){return"dataset-units dataset-line dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="dot",this.paths={},e.hideLine||(this.paths=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=e.map((function(e,i){return t[i]+","+e})).join("L");n.spline&&(r=y(t,e));var s=S("M"+r,"line-graph-path",i);if(n.heatline){var o=L(a.svgDefs,i);s.style.stroke="url(#"+o+")"}var l={path:s};if(n.regionFill){var u=L(a.svgDefs,i,!0),c="M"+t[0]+","+a.zeroLine+"L"+r+"L"+t.slice(-1)[0]+","+a.zeroLine;l.region=S(c,"region-fill","none","url(#"+u+")")}return l}(t.xPositions,t.yPositions,e.color,{heatline:e.heatline,regionFill:e.regionFill,spline:e.spline},{svgDefs:e.svgDefs,zeroLine:t.zeroLine})),this.units=[],e.hideDots||(this.units=t.yPositions.map((function(i,n){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=k("circle",{style:"fill: "+n,"data-point-index":r,cx:t,cy:e,r:i});if((a+="")||a.length){s.setAttribute("cy",0),s.setAttribute("cx",0);var o=k("text",{className:"data-point-value",x:0,y:0,dy:Tt/2*-1-i+"px","font-size":Tt+"px","text-anchor":"middle",innerHTML:a}),l=k("g",{"data-point-index":r,transform:"translate("+t+", "+e+")"});return l.appendChild(s),l.appendChild(o),l}return s}(t.xPositions[n],i,t.radius,e.color,e.valuesOverPoints?t.values[n]:"",n)}))),Object.values(this.paths).concat(this.units)},animateElements:function(t){var e=t.xPositions,i=t.yPositions,n=t.values,a=this.oldData.xPositions,r=this.oldData.yPositions,s=this.oldData.values,o=v(a,e),l=pt(o,2);a=l[0],e=l[1];var u=v(r,i),c=pt(u,2);r=c[0],i=c[1];var h=v(s,n),d=pt(h,2);s=d[0],n=d[1],this.render({xPositions:a,yPositions:r,values:n,zeroLine:this.oldData.zeroLine,radius:this.oldData.radius});var f=[];return Object.keys(this.paths).length&&(f=f.concat(function(t,e,i,n,a){var r=[],s=i.map((function(t,i){return e[i]+","+t})).join("L");a&&(s=y(e,i));var o=[t.path,{d:"M"+s},$t,jt];if(r.push(o),t.region){var l=e[0]+","+n+"L",u="L"+e.slice(-1)[0]+", "+n,c=[t.region,{d:"M"+l+s+u},$t,jt];r.push(c)}return r}(this.paths,e,i,t.zeroLine,this.constants.spline))),this.units.length&&this.units.map((function(t,n){f=f.concat(function(t,e,i){return"circle"!==t.nodeName?[_(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,i],Yt)]:[[t,{cx:e,cy:i},Et,jt]]}(t,e[n],i[n]))})),f}}},Xt=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.type="percentage",n.setup(),n}return dt(i,t),ct(i,[{key:"setMeasures",value:function(t){var e=this.measures;this.barOptions=t.barOptions||{};var i=this.barOptions;i.height=i.height||20,i.depth=i.depth||yt,e.paddings.right=30,e.legendHeight=60,e.baseHeight=8*(i.height+.5*i.depth)}},{key:"setupComponents",value:function(){var t=this.state,e=[["percentageBars",{barHeight:this.barOptions.height,barDepth:this.barOptions.depth},function(){return{xPositions:t.xPositions,widths:t.widths,colors:this.colors}}.bind(this)]];this.components=new Map(e.map((function(t){var e=X.apply(void 0,vt(t));return[t[0],e]})))}},{key:"calc",value:function(){var t=this;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"calc",this).call(this);var e=this.state;e.xPositions=[],e.widths=[];var n=0;e.sliceTotals.map((function(i){var a=t.width*i/e.grandTotal;e.widths.push(a),e.xPositions.push(n),n+=a}))}},{key:"makeDataByIndex",value:function(){}},{key:"bindTooltip",value:function(){var t=this,i=this.state;this.container.addEventListener("mousemove",(function(n){var a=t.components.get("percentageBars").store,r=n.target;if(a.includes(r)){var s=a.indexOf(r),o=e(t.container),l=e(r),u=l.left-o.left+parseInt(r.getAttribute("width"))/2,c=l.top-o.top,h=(t.formattedLabels&&t.formattedLabels.length>0?t.formattedLabels[s]:t.state.labels[s])+": ",d=i.sliceTotals[s]/i.grandTotal;t.tip.setValues(u,c,{name:h,value:(100*d).toFixed(1)+"%"}),t.tip.showTip()}}))}}]),i}(It),Zt=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.type="pie",n.initTimeout=0,n.init=1,n.setup(),n}return dt(i,t),ct(i,[{key:"configure",value:function(t){ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"configure",this).call(this,t),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=t.hoverRadio||.1,this.config.startAngle=t.startAngle||0,this.clockWise=t.clockWise||!1}},{key:"calc",value:function(){var t=this;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"calc",this).call(this);var e=this.state;this.radius=this.height>this.width?this.center.x:this.center.y;var n=this.radius,a=this.clockWise,r=e.slicesProperties||[];e.sliceStrings=[],e.slicesProperties=[];var s=180-this.config.startAngle;e.sliceTotals.map((function(i,o){var l=s,u=i/e.grandTotal*360,c=u>180?1:0,d=a?-u:u,f=s+=d,p=h(l,n),v=h(f,n),m=t.init&&r[o],g=void 0,y=void 0;t.init?(g=m?m.startPosition:p,y=m?m.endPosition:p):(g=p,y=v);var b=360===u?function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=i.x+t.x,o=i.y+t.y,l=i.x+e.x,u=2*i.y,c=i.y+e.y;return"M"+i.x+" "+i.y+"\n\t\tL"+s+" "+o+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+u+" z\n\t\tL"+s+" "+u+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+c+" z"}(g,y,t.center,t.radius,a,c):function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=i.x+t.x,o=i.y+t.y,l=i.x+e.x,u=i.y+e.y;return"M"+i.x+" "+i.y+"\n\t\tL"+s+" "+o+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+u+" z"}(g,y,t.center,t.radius,a,c);e.sliceStrings.push(b),e.slicesProperties.push({startPosition:p,endPosition:v,value:i,total:e.grandTotal,startAngle:l,endAngle:f,angle:d})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["pieSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors}}.bind(this)]];this.components=new Map(e.map((function(t){var e=X.apply(void 0,vt(t));return[t[0],e]})))}},{key:"calTranslateByAngle",value:function(t){var e=this.radius,i=this.hoverRadio,n=h(t.startAngle+t.angle/2,e);return"translate3d("+n.x*i+"px,"+n.y*i+"px,0)"}},{key:"hoverSlice",value:function(t,i,n,a){if(t){var r=this.colors[i];if(n){W(t,this.calTranslateByAngle(this.state.slicesProperties[i])),t.style.fill=x(r,50);var s=e(this.svg),o=a.pageX-s.left+10,l=a.pageY-s.top-10,u=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[i]:this.state.labels[i])+": ",c=(100*this.state.sliceTotals[i]/this.state.grandTotal).toFixed(1);this.tip.setValues(o,l,{name:u,value:c+"%"}),this.tip.showTip()}else W(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.fill=r}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,i=this.components.get("pieSlices").store,n=this.curActiveSliceIndex,a=this.curActiveSlice;if(i.includes(e)){var r=i.indexOf(e);this.hoverSlice(a,n,!1),this.curActiveSlice=e,this.curActiveSliceIndex=r,this.hoverSlice(e,r,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),i}(It),Kt=function(t){function e(t,i){ut(this,e);var n=ft(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i));n.type="heatmap",n.countLabel=i.countLabel||"";var a=["Sunday","Monday"],r=a.includes(i.startSubDomain)?i.startSubDomain:"Sunday";return n.startSubDomainIndex=a.indexOf(r),n.setup(),n}return dt(e,t),ct(e,[{key:"setMeasures",value:function(t){var e=this.measures;this.discreteDomains=0===t.discreteDomains?0:1,e.paddings.top=36,e.paddings.bottom=0,e.legendHeight=24,e.baseHeight=12*Rt+s(e);var i=this.data,n=this.discreteDomains?12:0;this.independentWidth=12*(U(i.start,i.end)+n)+o(e)}},{key:"updateWidth",value:function(){var t=this.discreteDomains?12:0,e=this.state.noOfWeeks?this.state.noOfWeeks:52;this.baseWidth=12*(e+t)+o(this.measures)}},{key:"prepareData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data;if(t.start&&t.end&&t.start>t.end)throw new Error("Start date cannot be greater than end date.");if(t.start||(t.start=new Date,t.start.setFullYear(t.start.getFullYear()-1)),t.end||(t.end=new Date),t.dataPoints=t.dataPoints||{},parseInt(Object.keys(t.dataPoints)[0])>1e5){var e={};Object.keys(t.dataPoints).forEach((function(i){var n=new Date(i*Ut);e[I(n)]=t.dataPoints[i]})),t.dataPoints=e}return t}},{key:"calc",value:function(){var t=this.state;t.start=R(this.data.start),t.end=R(this.data.end),t.firstWeekStart=R(t.start),t.noOfWeeks=U(t.start,t.end),t.distribution=function(t,e){for(var i=Math.max.apply(Math,vt(t)),n=1/(e-1),a=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:"",i=[t.getMonth(),t.getFullYear()],n=i[0],a=i[1],r=q(t),s={index:n,cols:[]};J(e=R(e)||G(n,a),1);for(var o=U(r,e),l=[],u=void 0,c=0;c2&&void 0!==arguments[2]&&arguments[2],n=this.state,a=R(t),r=[],s=0;s=n.start&&a<=n.end;i||a.getMonth()!==e||!l?o.yyyyMmDd=I(a):o=this.getSubDomainConfig(a),r.push(o)}return r}},{key:"getSubDomainConfig",value:function(t){var e=I(t),i=this.data.dataPoints[e];return{yyyyMmDd:e,dataValue:i||0,fill:this.colors[rt(i,this.state.distribution)]}}}]),e}(Ft),Qt=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.barOptions=e.barOptions||{},n.lineOptions=e.lineOptions||{},n.type=e.type||"line",n.init=1,n.setup(),n}return dt(i,t),ct(i,[{key:"setMeasures",value:function(){this.data.datasets.length<=1&&(this.config.showLegend=0,this.measures.paddings.bottom=30)}},{key:"configure",value:function(t){ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"configure",this).call(this,t),t.axisOptions=t.axisOptions||{},t.tooltipOptions=t.tooltipOptions||{},this.config.xAxisMode=t.axisOptions.xAxisMode||"span",this.config.yAxisMode=t.axisOptions.yAxisMode||"span",this.config.xIsSeries=t.axisOptions.xIsSeries||0,this.config.shortenYAxisNumbers=t.axisOptions.shortenYAxisNumbers||0,this.config.formatTooltipX=t.tooltipOptions.formatTooltipX,this.config.formatTooltipY=t.tooltipOptions.formatTooltipY,this.config.valuesOverPoints=t.valuesOverPoints}},{key:"prepareData",value:function(){return st(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data,this.type)}},{key:"prepareFirstData",value:function(){return ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data)}},{key:"calc",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.calcXPositions(),t||this.calcYAxisParameters(this.getAllYValues(),"line"===this.type),this.makeDataByIndex()}},{key:"calcXPositions",value:function(){var t=this.state,e=this.data.labels;t.datasetLength=e.length,t.unitWidth=this.width/t.datasetLength,t.xOffset=t.unitWidth/2,t.xAxis={labels:e,positions:e.map((function(e,i){return l(t.xOffset+i*t.unitWidth)}))}}},{key:"calcYAxisParameters",value:function(t){var e=tt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"false"),i=this.height/nt(e),n=it(e)*i,a=this.height-et(e)*n;this.state.yAxis={labels:e,positions:e.map((function(t){return a-t*i})),scaleMultiplier:i,zeroLine:a},this.calcDatasetPoints(),this.calcYExtremes(),this.calcYRegions()}},{key:"calcDatasetPoints",value:function(){var t=this.state,e=function(e){return e.map((function(e){return at(e,t.yAxis)}))};t.datasets=this.data.datasets.map((function(t,i){var n=t.values,a=t.cumulativeYs||[];return{name:t.name&&t.name.replace(/<|>|&/g,(function(t){return"&"==t?"&":"<"==t?"<":">"})),index:i,chartType:t.chartType,values:n,yPositions:e(n),cumulativeYs:a,cumulativeYPos:e(a)}}))}},{key:"calcYExtremes",value:function(){var t=this.state;this.barOptions.stacked?t.yExtremes=t.datasets[t.datasets.length-1].cumulativeYPos:(t.yExtremes=new Array(t.datasetLength).fill(9999),t.datasets.map((function(e){e.yPositions.map((function(e,i){e1&&void 0!==arguments[1]?arguments[1]:[],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t/e.length;n<=0&&(n=1);var a=n/bt,r=void 0;if(i){var s=Math.max.apply(Math,vt(e.map((function(t){return t.length}))));r=Math.ceil(s/a)}return e.map((function(t,e){return(t+="").length>a&&(i?e%r!=0&&(t=""):t=a-3>0?t.slice(0,a-3)+" ...":t.slice(0,a)+".."),t}))}(this.width,t.xAxis.labels,this.config.xIsSeries),t.xAxis}.bind(this)],["yRegions",{width:this.width,pos:"right"},function(){return this.state.yRegions}.bind(this)]],i=this.state.datasets.filter((function(t){return"bar"===t.chartType})),n=this.state.datasets.filter((function(t){return"line"===t.chartType})),a=i.map((function(e){var n=e.index;return["barGraph-"+e.index,{index:n,color:t.colors[n],stacked:t.barOptions.stacked,valuesOverPoints:t.config.valuesOverPoints,minHeight:0*t.height},function(){var t=this.state,e=t.datasets[n],a=this.barOptions.stacked,r=this.barOptions.spaceRatio||.5,s=t.unitWidth*(1-r),o=s/(a?1:i.length),l=t.xAxis.positions.map((function(t){return t-s/2}));a||(l=l.map((function(t){return t+o*n})));var u=new Array(t.datasetLength).fill("");this.config.valuesOverPoints&&(u=a&&e.index===t.datasets.length-1?e.cumulativeYs:e.values);var c=new Array(t.datasetLength).fill(0);return a&&(c=e.yPositions.map((function(t,i){return t-e.cumulativeYPos[i]}))),{xPositions:l,yPositions:e.yPositions,offsets:c,labels:u,zeroLine:t.yAxis.zeroLine,barsWidth:s,barWidth:o}}.bind(t)]})),r=n.map((function(e){var i=e.index;return["lineGraph-"+e.index,{index:i,color:t.colors[i],svgDefs:t.svgDefs,heatline:t.lineOptions.heatline,regionFill:t.lineOptions.regionFill,spline:t.lineOptions.spline,hideDots:t.lineOptions.hideDots,hideLine:t.lineOptions.hideLine,valuesOverPoints:t.config.valuesOverPoints},function(){var t=this.state,e=t.datasets[i],n=t.yAxis.positions[0]a(n)?t.mapTooltipXPosition(o):t.tip.hideTip()}))}},{key:"mapTooltipXPosition",value:function(t){var e=this.state;if(e.yExtremes){var i=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.reduce((function(e,i){return Math.abs(i-t)=0){var n=this.dataByIndex[i];this.tip.setValues(n.xPos+this.tip.offset.x,n.yExtreme+this.tip.offset.y,{name:n.formattedLabel,value:""},n.values,i),this.tip.showTip()}}}},{key:"renderLegend",value:function(){var t=this,e=this.data;e.datasets.length>1&&(this.legendArea.textContent="",e.datasets.map((function(e,i){var n=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",a=arguments[4];a=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?m(a,Ot):a;var r={className:"legend-bar",x:0,y:0,width:i,height:"2px",fill:n},s=k("text",{className:"legend-dataset-text",x:0,y:0,dy:2*Tt+"px","font-size":1.2*Tt+"px","text-anchor":"start",fill:Ct,innerHTML:a}),o=k("g",{transform:"translate("+t+", "+e+")"});return o.appendChild(k("rect",r)),o.appendChild(s),o}(100*i,"0",100,t.colors[i],e.name,t.config.truncateLegends);t.legendArea.appendChild(n)})))}},{key:"makeOverlay",value:function(){var t=this;this.init?this.init=0:(this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)})),this.overlayGuides=this.dataUnitComponents.map((function(t){return{type:t.unitType,overlay:void 0,units:t.units}})),void 0===this.state.currentIndex&&(this.state.currentIndex=this.state.datasetLength-1),this.overlayGuides.map((function(e){var i=e.units[t.state.currentIndex];e.overlay=_t[e.type](i),t.drawArea.appendChild(e.overlay)})))}},{key:"updateOverlayGuides",value:function(){this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)}))}},{key:"bindOverlay",value:function(){var t=this;this.parent.addEventListener("data-select",(function(){t.updateOverlay()}))}},{key:"bindUnits",value:function(){var t=this;this.dataUnitComponents.map((function(e){e.units.map((function(e){e.addEventListener("click",(function(){var i=e.getAttribute("data-point-index");t.setCurrentDataPoint(i)}))}))})),this.tip.container.addEventListener("click",(function(){var e=t.tip.container.getAttribute("data-point-index");t.setCurrentDataPoint(e)}))}},{key:"updateOverlay",value:function(){var t=this;this.overlayGuides.map((function(e){var i=e.units[t.state.currentIndex];Nt[e.type](i,e.overlay)}))}},{key:"onLeftArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex-1)}},{key:"onRightArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex+1)}},{key:"getDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentIndex,e=this.state;return{index:t,label:e.xAxis.labels[t],values:e.datasets.map((function(e){return e.values[t]}))}}},{key:"setCurrentDataPoint",value:function(t){var e=this.state;(t=parseInt(t))<0&&(t=0),t>=e.xAxis.labels.length&&(t=e.xAxis.labels.length-1),t!==e.currentIndex&&(e.currentIndex=t,function(t,e,i){var n=document.createEvent("HTMLEvents");for(var a in n.initEvent(e,!0,!0),i)n[a]=i[a];t.dispatchEvent(n)}(this.parent,"data-select",this.getDataPoint()))}},{key:"addDataPoint",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.datasetLength;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"addDataPoint",this).call(this,t,e,n),this.data.labels.splice(n,0,t),this.data.datasets.map((function(t,i){t.values.splice(n,0,e[i])})),this.update(this.data)}},{key:"removeDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.datasetLength-1;this.data.labels.length<=1||(ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"removeDataPoint",this).call(this,t),this.data.labels.splice(t,1),this.data.datasets.map((function(e){e.values.splice(t,1)})),this.update(this.data))}},{key:"updateDataset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.data.datasets[e].values=t,this.update(this.data)}},{key:"updateDatasets",value:function(t){this.data.datasets.map((function(e,i){t[i]&&(e.values=t[i])})),this.update(this.data)}}]),i}(Ft),te=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.type="donut",n.initTimeout=0,n.init=1,n.setup(),n}return dt(i,t),ct(i,[{key:"configure",value:function(t){ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"configure",this).call(this,t),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=t.hoverRadio||.1,this.config.startAngle=t.startAngle||0,this.clockWise=t.clockWise||!1,this.strokeWidth=t.strokeWidth||30}},{key:"calc",value:function(){var t=this;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"calc",this).call(this);var e=this.state;this.radius=this.height>this.width?this.center.x-this.strokeWidth/2:this.center.y-this.strokeWidth/2;var n=this.radius,a=this.clockWise,r=e.slicesProperties||[];e.sliceStrings=[],e.slicesProperties=[];var s=180-this.config.startAngle;e.sliceTotals.map((function(i,o){var l=s,u=i/e.grandTotal*360,c=u>180?1:0,d=a?-u:u,f=s+=d,p=h(l,n),v=h(f,n),m=t.init&&r[o],g=void 0,y=void 0;t.init?(g=m?m.startPosition:p,y=m?m.endPosition:p):(g=p,y=v);var b=360===u?function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=i.x+t.x,o=i.y+t.y,l=i.x+e.x,u=2*n+o;return"M"+s+" "+o+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+u+"\n\t\tM"+s+" "+u+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+(i.y+t.y)}(g,y,t.center,t.radius,t.clockWise,c):function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;return"M"+(i.x+t.x)+" "+(i.y+t.y)+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+(i.x+e.x)+" "+(i.y+e.y)}(g,y,t.center,t.radius,t.clockWise,c);e.sliceStrings.push(b),e.slicesProperties.push({startPosition:p,endPosition:v,value:i,total:e.grandTotal,startAngle:l,endAngle:f,angle:d})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["donutSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors,strokeWidth:this.strokeWidth}}.bind(this)]];this.components=new Map(e.map((function(t){var e=X.apply(void 0,vt(t));return[t[0],e]})))}},{key:"calTranslateByAngle",value:function(t){var e=this.radius,i=this.hoverRadio,n=h(t.startAngle+t.angle/2,e);return"translate3d("+n.x*i+"px,"+n.y*i+"px,0)"}},{key:"hoverSlice",value:function(t,i,n,a){if(t){var r=this.colors[i];if(n){W(t,this.calTranslateByAngle(this.state.slicesProperties[i])),t.style.stroke=x(r,50);var s=e(this.svg),o=a.pageX-s.left+10,l=a.pageY-s.top-10,u=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[i]:this.state.labels[i])+": ",c=(100*this.state.sliceTotals[i]/this.state.grandTotal).toFixed(1);this.tip.setValues(o,l,{name:u,value:c+"%"}),this.tip.showTip()}else W(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.stroke=r}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,i=this.components.get("donutSlices").store,n=this.curActiveSliceIndex,a=this.curActiveSlice;if(i.includes(e)){var r=i.indexOf(e);this.hoverSlice(a,n,!1),this.curActiveSlice=e,this.curActiveSliceIndex=r,this.hoverSlice(e,r,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),i}(It),ee={bar:Qt,line:Qt,percentage:Xt,heatmap:Kt,pie:Zt,donut:te},ie=Object.freeze({Chart:function t(e,i){return ut(this,t),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"line",e=arguments[1],i=arguments[2];return"axis-mixed"===t?(i.type="line",new Qt(e,i)):ee[t]?new ee[t](e,i):void console.error("Undefined chart type: "+t)}(i.type,e,i)},PercentageChart:Xt,PieChart:Zt,Heatmap:Kt,AxisChart:Qt});return Object.assign({},{NAME:"Frappe Charts",VERSION:"1.6.2"},ie)}()},440:(t,e,i)=>{var n=i(75).default;function a(){"use strict";t.exports=a=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},i=Object.prototype,r=i.hasOwnProperty,s=Object.defineProperty||function(t,e,i){t[e]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function h(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,i){return t[e]=i}}function d(t,e,i,n){var a=e&&e.prototype instanceof v?e:v,r=Object.create(a.prototype),o=new O(n||[]);return s(r,"_invoke",{value:M(t,i,o)}),r}function f(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p={};function v(){}function m(){}function g(){}var y={};h(y,l,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==i&&r.call(x,l)&&(y=x);var w=g.prototype=v.prototype=Object.create(y);function k(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(a,s,o,l){var u=f(t[a],t,s);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==n(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,o,l)}),(function(t){i("throw",t,o,l)})):e.resolve(h).then((function(t){c.value=t,o(c)}),(function(t){return i("throw",t,o,l)}))}l(u.arg)}var a;s(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,a){i(t,n,e,a)}))}return a=a?a.then(r,r):r()}})}function M(t,e,i){var n="suspendedStart";return function(a,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw r;return{value:void 0,done:!0}}for(i.method=a,i.arg=r;;){var s=i.delegate;if(s){var o=P(s,i);if(o){if(o===p)continue;return o}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=f(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}function P(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=f(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function e(){for(;++i=0;--n){var a=this.tryEntries[n],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var o=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(o&&l){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),L(i),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var a=n.arg;L(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:T(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function e(i){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,e,i)=>{var n=i(440)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n);const t=flarum.core.compat["admin/app"];var e=i.n(t);const a=flarum.core.compat["common/extend"],r=flarum.core.compat["admin/components/DashboardPage"];var s=i.n(r);function o(t,e,i,n,a,r,s){try{var o=t[r](s),l=o.value}catch(t){return void i(t)}o.done?e(l):Promise.resolve(l).then(n,a)}function l(t){return function(){var e=this,i=arguments;return new Promise((function(n,a){var r=t.apply(e,i);function s(t){o(r,n,a,s,l,"next",t)}function l(t){o(r,n,a,s,l,"throw",t)}s(void 0)}))}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}var h=i(507),d=i.n(h);const f=flarum.core.compat["admin/components/DashboardWidget"];var p=i.n(f);const v=flarum.core.compat["common/components/LoadingIndicator"];var g=i.n(v);const y=flarum.core.compat["common/components/Link"];var b=i.n(y);const x=flarum.core.compat["common/utils/abbreviateNumber"];var w=i.n(x),k=function(t){function i(){for(var e,i=arguments.length,n=new Array(i),a=0;a0?"up":"down")},$()("fas fa-arrow-"+(l>0?"up":"down")),Math.abs(l).toFixed(1),"%"))))}))),m("[",null,a?m("div",{key:"loading",className:"StatisticsWidget-chart","data-loading":"true"},m(g(),{size:"large"})):m("div",{key:"loaded",className:"StatisticsWidget-chart","data-loading":"false",oncreate:this.drawChart.bind(this),onupdate:this.drawChart.bind(this)})),this.noData&&m(N(),{text:e().translator.trans("flarum-statistics.admin.statistics.no_data")}),!this.noData&&!!this.chart&&m(T(),{className:"StatisticsWidget-chartExport Button",icon:"fas fa-file-export",onclick:function(){n.chart.export()}},e().translator.trans("flarum-statistics.admin.statistics.export_chart_button")))},n.drawChart=function(t){var i,n;if(!this.chart||this.chartEntity!==this.selectedEntity||this.chartPeriod!==this.selectedPeriod){for(var a="custom"===this.selectedPeriod?{start:null==(i=this.customPeriod)?void 0:i.start,end:null==(n=this.customPeriod)?void 0:n.end,step:86400}:this.periods[this.selectedPeriod],r=a.end-a.start,s=[],o=[],l=[],u=a.start;u86400&&(c+=" - "+R().unix(u+a.step-1).utc().format("D MMM"))),s.push(c),o.push(this.getPeriodCount(this.selectedEntity,{start:u,end:u+a.step})),l.push(this.getPeriodCount(this.selectedEntity,{start:u-r,end:u-r}))}if(0===o.length)return this.noData=!0,void m.redraw();this.noData=!1,m.redraw();var h={labels:s,datasets:[{name:C()(e().translator.trans("flarum-statistics.admin.statistics.current_period")),values:o},{name:C()(e().translator.trans("flarum-statistics.admin.statistics.previous_period")),values:l}]};this.chart&&16&document.compareDocumentPosition(this.chart.parent)?this.chart.update(h):this.chart=new J.Chart(t.dom,{data:h,type:"line",height:280,axisOptions:{xAxisMode:"tick",yAxisMode:"span",xIsSeries:!0},lineOptions:{hideDots:1,regionFill:1},colors:[e().forum.attribute("themePrimaryColor"),"black"]}),this.chartEntity=this.selectedEntity,this.chartPeriod=this.selectedPeriod}},n.changeEntity=function(t){this.selectedEntity=t},n.changePeriod=function(t){this.selectedPeriod=t},n.getTotalCount=function(t){return this.lifetimeData[t]},n.getPeriodCount=function(t,e){var i=("custom"===this.selectedPeriod?this.customPeriodData:this.timedData)[t],n=0;for(var a in i){var r=parseInt(a);r>=e.start&&r{var t={757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,i="millisecond",n="second",a="minute",r="hour",s="day",o="week",l="month",u="quarter",c="year",h="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},m=function(t,e,i){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(i)+t},g={s:m,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),n=Math.floor(i/60),a=i%60;return(e<=0?"+":"-")+m(n,2,"0")+":"+m(a,2,"0")},m:function t(e,i){if(e.date()1)return t(s[0])}else{var o=e.name;b[o]=e,a=o}return!n&&a&&(y=a),a||!n&&y},k=function(t,e){if(x(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new M(i)},D=g;D.l=w,D.i=x,D.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var M=function(){function v(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=v.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(D.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(f);if(n){var a=n[2]-1||0,r=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)):new Date(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return D},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var i=k(t);return this.startOf(e)<=i&&i<=this.endOf(e)},m.isAfter=function(t,e){return k(t)=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function a(t){return t.titleHeight+t.margins.top+t.paddings.top}function r(t){return t.margins.left+t.paddings.left}function s(t){return t.margins.top+t.margins.bottom+t.paddings.top+t.paddings.bottom+t.titleHeight+t.legendHeight}function o(t){return t.margins.left+t.margins.right+t.paddings.left+t.paddings.right}function l(t){return parseFloat(t.toFixed(2))}function u(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];i||(i=n?t[0]:t[t.length-1]);var a=new Array(Math.abs(e)).fill(i);return n?a.concat(t):t.concat(a)}function c(t,e){return(t+"").length*e}function h(t,e){return{x:Math.sin(t*kt)*e,y:Math.cos(t*kt)*e}}function d(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(Number.isNaN(t)||void 0===t||!Number.isFinite(t)||e&&t<0)}function f(t){var e=void 0,i=void 0,n=void 0;if(t instanceof Date)return new Date(t.getTime());if("object"!==(void 0===t?"undefined":lt(t))||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)i=t[n],e[n]=f(i);return e}function p(t,e){var i=void 0,n=void 0;return t<=e?(i=e-t,n=t):(i=t-e,n=e),[i,n]}function v(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-t.length;return i>0?t=u(t,i):e=u(e,i),[t,e]}function m(t,e){if(t)return t.length>e?t.slice(0,e-3)+"...":t}function g(t){var e=void 0;if("number"==typeof t)e=t;else if("string"==typeof t&&(e=Number(t),Number.isNaN(e)))return t;var i=Math.floor(Math.log10(Math.abs(e)));if(i<=2)return e;var n=Math.floor(i/3),a=Math.pow(10,i-3*n)*+(e/Math.pow(10,i)).toFixed(1);return Math.round(100*a)/100+" "+["","K","M","B","T"][n]}function y(t,e){for(var i=[],n=0;n255?255:t<0?0:t}function x(t,e){var i=Pt(t),n=!1;"#"==i[0]&&(i=i.slice(1),n=!0);var a=parseInt(i,16),r=b((a>>16)+e),s=b((a>>8&255)+e);return(n?"#":"")+(b((255&a)+e)|s<<8|r<<16).toString(16)}function w(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function k(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg",t);for(var n in e){var a=e[n];if("inside"===n)w(a).appendChild(i);else if("around"===n){var r=w(a);r.parentNode.insertBefore(i,r),i.appendChild(r)}else"styles"===n?"object"===(void 0===a?"undefined":lt(a))&&Object.keys(a).map((function(t){i.style[t]=a[t]})):("className"===n&&(n="class"),"innerHTML"===n?i.textContent=a:i.setAttribute(n,a))}return i}function D(t,e){return k("linearGradient",{inside:t,id:e,x1:0,x2:0,y1:0,y2:1})}function M(t,e,i,n){return k("stop",{inside:t,style:"stop-color: "+i,offset:e,"stop-opacity":n})}function P(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i={className:t,transform:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""};return e&&(i.inside=e),k("g",i)}function S(t){return k("path",{className:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d:t,styles:{stroke:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"none",fill:arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none","stroke-width":arguments.length>4&&void 0!==arguments[4]?arguments[4]:2}})}function L(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n="path-fill-gradient-"+e+"-"+(i?"lighter":"default"),a=D(t,n),r=[1,.6,.2];return i&&(r=[.4,.2,0]),M(a,"0%",e,r[0]),M(a,"50%",e,r[1]),M(a,"100%",e,r[2]),n}function O(t,e,i,n,a){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s={className:t,x:e,y:i,width:n,height:n,rx:a,fill:arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none"};return Object.keys(r).map((function(t){s[t]=r[t]})),k("rect",s)}function T(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=a.fontSize||Tt;return k("text",{className:t,x:e,y:i,dy:(void 0!==a.dy?a.dy:r/2)+"px","font-size":r+"px",fill:a.fill||Ct,"text-anchor":a.textAnchor||"start",innerHTML:n})}function A(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a.stroke||(a.stroke=At);var r=k("line",{className:"line-vertical "+a.className,x1:0,x2:0,y1:i,y2:n,styles:{stroke:a.stroke}}),s=k("text",{x:0,y:i>n?i+Lt:i-Lt-Tt,dy:Tt+"px","font-size":Tt+"px","text-anchor":"middle",innerHTML:e+""}),o=k("g",{transform:"translate("+t+", 0)"});return o.appendChild(r),o.appendChild(s),o}function C(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a.stroke||(a.stroke=At),a.lineType||(a.lineType=""),a.shortenNumbers&&(e=g(e));var r=k("line",{className:"line-horizontal "+a.className+("dashed"===a.lineType?"dashed":""),x1:i,x2:n,y1:0,y2:0,styles:{stroke:a.stroke}}),s=k("text",{x:i4&&void 0!==arguments[4]?arguments[4]:0,r=p(i,(arguments.length>5&&void 0!==arguments[5]?arguments[5]:{}).zeroLine),s=pt(r,2),o=s[0],l=s[1];return l-=a,"rect"!==t.nodeName?[[t.childNodes[0],{width:n,height:o},Et,jt],N(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,l],Yt)]:[[t,{width:n,height:o,x:e,y:l},Et,jt]]}function $(t,e){return[t,{d:e},Et,jt]}function Y(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"linear",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=t.cloneNode(!0),o=t.cloneNode(!0);for(var l in e){var u=void 0;u="transform"===l?document.createElementNS("http://www.w3.org/2000/svg","animateTransform"):document.createElementNS("http://www.w3.org/2000/svg","animate");var c=r[l]||t.getAttribute(l),h=e[l],d={attributeName:l,from:c,to:h,begin:"0s",dur:i/1e3+"s",values:c+";"+h,keySplines:zt[n],keyTimes:"0;1",calcMode:"spline",fill:"freeze"};for(var f in a&&(d.type=a),d)u.setAttribute(f,d[f]);s.appendChild(u),a?o.setAttribute(l,"translate("+h+")"):o.setAttribute(l,h)}return[s,o]}function W(t,e){t.style.transform=e,t.style.webkitTransform=e,t.style.msTransform=e,t.style.mozTransform=e,t.style.oTransform=e}function j(t,e){var i=[],n=[];e.map((function(t){var e,a,r=t[0],s=r.parentNode;t[0]=r;var o=Y.apply(void 0,vt(t)),l=pt(o,2);e=l[0],a=l[1],i.push(a),n.push([e,s]),s&&s.replaceChild(e,r)}));var a=t.cloneNode(!0);return n.map((function(t,n){t[1]&&(t[1].replaceChild(i[n],t[0]),e[n][0]=i[n])})),a}function z(t,e,i){if(0!==i.length){var n=j(e,i);e.parentNode==t&&(t.removeChild(e),t.appendChild(n)),setTimeout((function(){n.parentNode==t&&(t.removeChild(n),t.appendChild(e))}),Wt)}}function H(e){var i=e.cloneNode(!0);i.classList.add("chart-container"),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");var n=t.create("style",{innerHTML:Ht});i.insertBefore(n,i.firstChild);var a=t.create("div");return a.appendChild(i),a.innerHTML}function F(t){var e=new Date(t);return e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),e}function I(t){var e=t.getDate(),i=t.getMonth()+1;return[t.getFullYear(),(i>9?"":"0")+i,(e>9?"":"0")+e].join("-")}function R(t){return new Date(t.getTime())}function U(t,e){var i=q(t);return Math.ceil(function(t,e){var i=Vt*Ut;return(F(e)-F(t))/i}(i,e)/Rt)}function V(t,e){return t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}function B(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Bt[t];return e?i.slice(0,3):i}function G(t,e){return new Date(e,t+1,0)}function q(t){var e=R(t),i=e.getDay();return 0!==i&&J(e,-1*i),e}function J(t,e){t.setDate(t.getDate()+e)}function X(t,e,i){var n=Object.keys(Jt).filter((function(e){return t.includes(e)})),a=Jt[n[0]];return Object.assign(a,{constants:e,getData:i}),new qt(a)}function Z(t){if(0===t)return[0,0];if(isNaN(t))return{mantissa:-6755399441055744,exponent:972};var e=t>0?1:-1;if(!isFinite(t))return{mantissa:4503599627370496*e,exponent:972};t=Math.abs(t);var i=Math.floor(Math.log10(t));return[e*(t/Math.pow(10,i)),i]}function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Math.ceil(t),n=Math.floor(e),a=i-n,r=a,s=1;a>5&&(a%2!=0&&(a=++i-n),r=a/2,s=2),a<=2&&(s=a/(r=4)),0===a&&(r=5,s=1);for(var o=[],l=0;l<=r;l++)o.push(n+s*l);return o}function Q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Z(t),n=pt(i,2),a=n[0],r=n[1],s=e?e/Math.pow(10,r):0,o=K(a=a.toFixed(6),s);return o.map((function(t){return t*Math.pow(10,r)}))}function tt(t){function e(t,e){for(var i=Q(t),n=i[1]-i[0],a=0,r=1;a1&&void 0!==arguments[1]&&arguments[1],n=Math.max.apply(Math,vt(t)),a=Math.min.apply(Math,vt(t)),r=[];if(n>=0&&a>=0)Z(n)[1],r=i?Q(n,a):Q(n);else if(n>0&&a<0){var s=Math.abs(a);n>=s?(Z(n)[1],r=e(n,s)):(Z(s)[1],r=e(s,n).reverse().map((function(t){return-1*t})))}else if(n<=0&&a<=0){var o=Math.abs(a),l=Math.abs(n);Z(o)[1],r=(r=i?Q(o,l):Q(o)).reverse().map((function(t){return-1*t}))}return r}function et(t){var e=it(t);return t.indexOf(0)>=0?t.indexOf(0):t[0]>0?-1*t[0]/e:-1*t[t.length-1]/e+(t.length-1)}function it(t){return t[1]-t[0]}function nt(t){return t[t.length-1]-t[0]}function at(t,e){return l(e.zeroLine-t*e.scaleMultiplier)}function rt(t,e){return e.filter((function(e){return ei?n.slice(0,i):u(n,i-n.length,0),t.values=n}else t.values=a;t.chartType||(gt.includes(e),t.chartType=e)})),t.yRegions&&t.yRegions.map((function(t){if(t.end\n\t\t\t\t
      \n\t\t\t\t
      '}),this.hideTip(),this.title=this.container.querySelector(".title"),this.dataPointList=this.container.querySelector(".data-point-list"),this.parent.addEventListener("mouseleave",(function(){e.hideTip()}))}},{key:"fill",value:function(){var e,i=this;this.index&&this.container.setAttribute("data-point-index",this.index),e=this.titleValueFirst?""+this.titleValue+""+this.titleName:this.titleName+""+this.titleValue+"",this.title.innerHTML=e,this.dataPointList.innerHTML="",this.listValues.map((function(e,n){var a=i.colors[n]||"black",r=0===e.formatted||e.formatted?e.formatted:e.value,s=t.create("li",{styles:{"border-top":"3px solid "+a},innerHTML:''+(0===r||r?r:"")+"\n\t\t\t\t\t"+(e.title?e.title:"")});i.dataPointList.appendChild(s)}))}},{key:"calcPosition",value:function(){var t=this.container.offsetWidth;this.top=this.y-this.container.offsetHeight-5,this.left=this.x-t/2;var e=this.parent.offsetWidth-t,i=this.container.querySelector(".svg-pointer");if(this.left<0)i.style.left="calc(50% - "+-1*this.left+"px)",this.left=0;else if(this.left>e){var n="calc(50% + "+(this.left-e)+"px)";i.style.left=n,this.left=e}else i.style.left="50%"}},{key:"setValues",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;this.titleName=i.name,this.titleValue=i.value,this.listValues=n,this.x=t,this.y=e,this.titleValueFirst=i.valueFirst||0,this.index=a,this.refresh()}},{key:"hideTip",value:function(){this.container.style.top="0px",this.container.style.left="0px",this.container.style.opacity="0"}},{key:"showTip",value:function(){this.container.style.top=this.top+"px",this.container.style.left=this.left+"px",this.container.style.opacity="1"}}]),e}(),Mt={"light-blue":"#7cd6fd",blue:"#5e64ff",violet:"#743ee2",red:"#ff5858",orange:"#ffa00a",yellow:"#feef72",green:"#28a745","light-green":"#98d85b",purple:"#b554ff",magenta:"#ffa3ef",black:"#36114C",grey:"#bdd3e6","light-grey":"#f0f4f7","dark-grey":"#b8c2cc"},Pt=function(t){return/rgb[a]{0,1}\([\d, ]+\)/gim.test(t)?/\D+(\d*)\D+(\d*)\D+(\d*)/gim.exec(t).map((function(t,e){return 0!==e?Number(t).toString(16):"#"})).reduce((function(t,e){return""+t+e})):Mt[t]||t},St=6,Lt=4,Ot=15,Tt=10,At="#dadada",Ct="#555b51",Nt={bar:function(t){var e=void 0;"rect"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var i=t.cloneNode();return i.style.fill="#000000",i.style.opacity="0.4",e&&i.setAttribute("transform",e),i},dot:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var i=t.cloneNode(),n=t.getAttribute("r"),a=t.getAttribute("fill");return i.setAttribute("r",parseInt(n)+4),i.setAttribute("fill",a),i.style.opacity="0.6",e&&i.setAttribute("transform",e),i},heat_square:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var i=t.cloneNode(),n=t.getAttribute("r"),a=t.getAttribute("fill");return i.setAttribute("r",parseInt(n)+4),i.setAttribute("fill",a),i.style.opacity="0.6",e&&i.setAttribute("transform",e),i}},_t={bar:function(t,e){var i=void 0;"rect"!==t.nodeName&&(i=t.getAttribute("transform"),t=t.childNodes[0]);var n=["x","y","width","height"];Object.values(t.attributes).filter((function(t){return n.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),i&&e.setAttribute("transform",i)},dot:function(t,e){var i=void 0;"circle"!==t.nodeName&&(i=t.getAttribute("transform"),t=t.childNodes[0]);var n=["cx","cy"];Object.values(t.attributes).filter((function(t){return n.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),i&&e.setAttribute("transform",i)},heat_square:function(t,e){var i=void 0;"circle"!==t.nodeName&&(i=t.getAttribute("transform"),t=t.childNodes[0]);var n=["cx","cy"];Object.values(t.attributes).filter((function(t){return n.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),i&&e.setAttribute("transform",i)}},Et=350,$t=350,Yt=Et,Wt=250,jt="easein",zt={ease:"0.25 0.1 0.25 1",linear:"0 0 1 1",easein:"0.1 0.8 0.2 1",easeout:"0 0 0.58 1",easeinout:"0.42 0 0.58 1"},Ht=".chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Cantarell','Fira Sans','Droid Sans','Helvetica Neue',sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ul{padding-left:0;display:flex}.graph-svg-tip ol{padding-left:0;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:' ';border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}",Ft=function(){function e(t,i){if(ut(this,e),i=f(i),this.parent="string"==typeof t?document.querySelector(t):t,!(this.parent instanceof HTMLElement))throw new Error("No `parent` element to render on was provided.");this.rawChartArgs=i,this.title=i.title||"",this.type=i.type||"",this.realData=this.prepareData(i.data),this.data=this.prepareFirstData(this.realData),this.colors=this.validateColors(i.colors,this.type),this.config={showTooltip:1,showLegend:1,isNavigable:i.isNavigable||0,animate:void 0!==i.animate?i.animate:1,truncateLegends:i.truncateLegends||1},this.measures=JSON.parse(JSON.stringify(mt));var n=this.measures;this.setMeasures(i),this.title.length||(n.titleHeight=0),this.config.showLegend||(n.legendHeight=0),this.argHeight=i.height||n.baseHeight,this.state={},this.options={},this.initTimeout=700,this.config.isNavigable&&(this.overlays=[]),this.configure(i)}return ct(e,[{key:"prepareData",value:function(t){return t}},{key:"prepareFirstData",value:function(t){return t}},{key:"validateColors",value:function(t,e){var i=[];return(t=(t||[]).concat(wt[e])).forEach((function(t){var e=Pt(t);!function(t){return/(^\s*)(#)((?:[A-Fa-f0-9]{3}){1,2})$/i.test(t)||/(^\s*)(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/i.test(t)}(e)?console.warn('"'+t+'" is not a valid color.'):i.push(e)})),i}},{key:"setMeasures",value:function(){}},{key:"configure",value:function(){var t=this,e=this.argHeight;this.baseHeight=e,this.height=e-s(this.measures),this.boundDrawFn=function(){return t.draw(!0)},ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.boundDrawFn),this.resizeObserver.observe(this.parent)),window.addEventListener("resize",this.boundDrawFn),window.addEventListener("orientationchange",this.boundDrawFn)}},{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),window.removeEventListener("resize",this.boundDrawFn),window.removeEventListener("orientationchange",this.boundDrawFn)}},{key:"setup",value:function(){this.makeContainer(),this.updateWidth(),this.makeTooltip(),this.draw(!1,!0)}},{key:"makeContainer",value:function(){this.parent.innerHTML="";var e={inside:this.parent,className:"chart-container"};this.independentWidth&&(e.styles={width:this.independentWidth+"px"}),this.container=t.create("div",e)}},{key:"makeTooltip",value:function(){this.tip=new Dt({parent:this.container,colors:this.colors}),this.bindTooltip()}},{key:"bindTooltip",value:function(){}},{key:"draw",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&i(this.parent)||(this.updateWidth(),this.calc(e),this.makeChartArea(),this.setupComponents(),this.components.forEach((function(e){return e.setup(t.drawArea)})),this.render(this.components,!1),n&&(this.data=this.realData,setTimeout((function(){t.update(t.data)}),this.initTimeout)),this.renderLegend(),this.setupNavigation(n))}},{key:"calc",value:function(){}},{key:"updateWidth",value:function(){this.baseWidth=function(t){var e=window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.clientWidth-i}(this.parent),this.width=this.baseWidth-o(this.measures)}},{key:"makeChartArea",value:function(){this.svg&&this.container.removeChild(this.svg);var t=this.measures;this.svg=function(t,e,i,n){return k("svg",{className:e,inside:t,width:i,height:n})}(this.container,"frappe-chart chart",this.baseWidth,this.baseHeight),this.svgDefs=function(t){return k("defs",{inside:t})}(this.svg),this.title.length&&(this.titleEL=T("title",t.margins.left,t.margins.top,this.title,{fontSize:t.titleFontSize,fill:"#666666",dy:t.titleFontSize}));var e=a(t);this.drawArea=P(this.type+"-chart chart-draw-area","translate("+r(t)+", "+e+")"),this.config.showLegend&&(e+=this.height+t.paddings.bottom,this.legendArea=P("chart-legend","translate("+r(t)+", "+e+")")),this.title.length&&this.svg.appendChild(this.titleEL),this.svg.appendChild(this.drawArea),this.config.showLegend&&this.svg.appendChild(this.legendArea),this.updateTipOffset(r(t),a(t))}},{key:"updateTipOffset",value:function(t,e){this.tip.offset={x:t,y:e}}},{key:"setupComponents",value:function(){this.components=new Map}},{key:"update",value:function(t){t||console.error("No data to update."),this.data=this.prepareData(t),this.calc(),this.render(this.components,this.config.animate),this.renderLegend()}},{key:"render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.components,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.config.isNavigable&&this.overlays.map((function(t){return t.parentNode.removeChild(t)}));var n=[];e.forEach((function(t){n=n.concat(t.update(i))})),n.length>0?(z(this.container,this.svg,n),setTimeout((function(){e.forEach((function(t){return t.make()})),t.updateNav()}),400)):(e.forEach((function(t){return t.make()})),this.updateNav())}},{key:"updateNav",value:function(){this.config.isNavigable&&(this.makeOverlay(),this.bindUnits())}},{key:"renderLegend",value:function(){}},{key:"setupNavigation",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.config.isNavigable&&e&&(this.bindOverlay(),this.keyActions={13:this.onEnterKey.bind(this),37:this.onLeftArrow.bind(this),38:this.onUpArrow.bind(this),39:this.onRightArrow.bind(this),40:this.onDownArrow.bind(this)},document.addEventListener("keydown",(function(e){n(t.container)&&(e=e||window.event,t.keyActions[e.keyCode]&&t.keyActions[e.keyCode]())})))}},{key:"makeOverlay",value:function(){}},{key:"updateOverlay",value:function(){}},{key:"bindOverlay",value:function(){}},{key:"bindUnits",value:function(){}},{key:"onLeftArrow",value:function(){}},{key:"onRightArrow",value:function(){}},{key:"onUpArrow",value:function(){}},{key:"onDownArrow",value:function(){}},{key:"onEnterKey",value:function(){}},{key:"addDataPoint",value:function(){}},{key:"removeDataPoint",value:function(){}},{key:"getDataPoint",value:function(){}},{key:"setCurrentDataPoint",value:function(){}},{key:"updateDataset",value:function(){}},{key:"export",value:function(){var t=H(this.svg);!function(t,e){var i=document.createElement("a");i.style="display: none";var n=new Blob(e,{type:"image/svg+xml; charset=utf-8"}),a=window.URL.createObjectURL(n);i.href=a,i.download=t,document.body.appendChild(i),i.click(),setTimeout((function(){document.body.removeChild(i),window.URL.revokeObjectURL(a)}),300)}(this.title||"Chart",[t])}}]),e}(),It=function(t){function e(t,i){return ut(this,e),ft(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i))}return dt(e,t),ct(e,[{key:"configure",value:function(t){ht(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"configure",this).call(this,t),this.config.formatTooltipY=(t.tooltipOptions||{}).formatTooltipY,this.config.maxSlices=t.maxSlices||20,this.config.maxLegendPoints=t.maxLegendPoints||20}},{key:"calc",value:function(){var t=this,e=this.state,i=this.config.maxSlices;e.sliceTotals=[];var n=this.data.labels.map((function(e,i){var n=0;return t.data.datasets.map((function(t){n+=t.values[i]})),[n,e]})).filter((function(t){return t[0]>=0})),a=n;if(n.length>i){n.sort((function(t,e){return e[0]-t[0]})),a=n.slice(0,i-1);var r=0;n.slice(i-1).map((function(t){r+=t[0]})),a.push([r,"Rest"]),this.colors[i-1]="grey"}e.labels=[],a.map((function(t){e.sliceTotals.push(function(t){return Number(Math.round(t+"e4")+"e-4")}(t[0])),e.labels.push(t[1])})),e.grandTotal=e.sliceTotals.reduce((function(t,e){return t+e}),0),this.center={x:this.width/2,y:this.height/2}}},{key:"renderLegend",value:function(){var t=this,e=this.state;this.legendArea.textContent="",this.legendTotals=e.sliceTotals.slice(0,this.config.maxLegendPoints);var i=0,n=0;this.legendTotals.map((function(a,r){var s=150,l=Math.floor((t.width-o(t.measures))/s);t.legendTotals.lengthl&&(i=0,n+=20);var u=s*i+5,c=t.config.truncateLegends?m(e.labels[r],s/10):e.labels[r],h=t.config.formatTooltipY?t.config.formatTooltipY(a):a,d=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",a=arguments[4];a=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?m(a,Ot):a;var r={className:"legend-dot",cx:0,cy:0,r:i,fill:n},s=k("text",{className:"legend-dataset-text",x:0,y:0,dx:Tt+"px",dy:Tt/3+"px","font-size":1.2*Tt+"px","text-anchor":"start",fill:Ct,innerHTML:a}),o=k("g",{transform:"translate("+t+", "+e+")"});return o.appendChild(k("circle",r)),o.appendChild(s),o}(u,n,5,t.colors[r],c+": "+h,!1);t.legendArea.appendChild(d),i++}))}}]),e}(Ft),Rt=7,Ut=1e3,Vt=86400,Bt=["January","February","March","April","May","June","July","August","September","October","November","December"],Gt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qt=function(){function t(e){var i=e.layerClass,n=void 0===i?"":i,a=e.layerTransform,r=void 0===a?"":a,s=e.constants,o=e.getData,l=e.makeElements,u=e.animateElements;ut(this,t),this.layerTransform=r,this.constants=s,this.makeElements=l,this.getData=o,this.animateElements=u,this.store=[],this.labels=[],this.layerClass=n,this.layerClass="function"==typeof this.layerClass?this.layerClass():this.layerClass,this.refresh()}return ct(t,[{key:"refresh",value:function(t){this.data=t||this.getData()}},{key:"setup",value:function(t){this.layer=P(this.layerClass,this.layerTransform,t)}},{key:"make",value:function(){this.render(this.data),this.oldData=this.data}},{key:"render",value:function(t){var e=this;this.store=this.makeElements(t),this.layer.textContent="",this.store.forEach((function(t){e.layer.appendChild(t)})),this.labels.forEach((function(t){e.layer.appendChild(t)}))}},{key:"update",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.refresh();var e=[];return t&&(e=this.animateElements(this.data)||[]),e}}]),t}(),Jt={donutSlices:{layerClass:"donut-slices",makeElements:function(t){return t.sliceStrings.map((function(e,i){var n=S(e,"donut-path",t.colors[i],"none",t.strokeWidth);return n.style.transition="transform .3s;",n}))},animateElements:function(t){return this.store.map((function(e,i){return $(e,t.sliceStrings[i])}))}},pieSlices:{layerClass:"pie-slices",makeElements:function(t){return t.sliceStrings.map((function(e,i){var n=S(e,"pie-path","none",t.colors[i]);return n.style.transition="transform .3s;",n}))},animateElements:function(t){return this.store.map((function(e,i){return $(e,t.sliceStrings[i])}))}},percentageBars:{layerClass:"percentage-bars",makeElements:function(t){var e=this;return t.xPositions.map((function(i,n){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:yt,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none";return k("rect",{className:"percentage-bar",x:t,y:e,width:i,height:n,fill:r,styles:{stroke:x(r,-25),"stroke-dasharray":"0, "+(n+i)+", "+i+", "+n,"stroke-width":a}})}(i,0,t.widths[n],e.constants.barHeight,e.constants.barDepth,t.colors[n])}))},animateElements:function(t){if(t)return[]}},yAxis:{layerClass:"y axis",makeElements:function(t){var e=this;return t.positions.map((function(i,n){return function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};d(t)||(t=0),n.pos||(n.pos="left"),n.offset||(n.offset=0),n.mode||(n.mode="span"),n.stroke||(n.stroke=At),n.className||(n.className="");var a=-1*St,r="span"===n.mode?i+St:0;return"tick"===n.mode&&"right"===n.pos&&(a=i+St,r=i),C(t,e,a+=n.offset,r+=n.offset,{stroke:n.stroke,className:n.className,lineType:n.lineType,shortenNumbers:n.shortenNumbers})}(i,t.labels[n],e.constants.width,{mode:e.constants.mode,pos:e.constants.pos,shortenNumbers:e.constants.shortenNumbers})}))},animateElements:function(t){var e=t.positions,i=t.labels,n=this.oldData.positions,a=this.oldData.labels,r=v(n,e),s=pt(r,2);n=s[0],e=s[1];var o=v(a,i),l=pt(o,2);return a=l[0],i=l[1],this.render({positions:n,labels:i}),this.store.map((function(t,i){return _(t,e[i],n[i])}))}},xAxis:{layerClass:"x axis",makeElements:function(t){var e=this;return t.positions.map((function(i,n){return function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};d(t)||(t=0),n.pos||(n.pos="bottom"),n.offset||(n.offset=0),n.mode||(n.mode="span"),n.stroke||(n.stroke=At),n.className||(n.className="");var a=i+St,r="span"===n.mode?-1*St:i;return"tick"===n.mode&&"top"===n.pos&&(a=-1*St,r=0),A(t,e,a,r,{stroke:n.stroke,className:n.className,lineType:n.lineType})}(i,t.calcLabels[n],e.constants.height,{mode:e.constants.mode,pos:e.constants.pos})}))},animateElements:function(t){var e=t.positions,i=t.calcLabels,n=this.oldData.positions,a=this.oldData.calcLabels,r=v(n,e),s=pt(r,2);n=s[0],e=s[1];var o=v(a,i),l=pt(o,2);return a=l[0],i=l[1],this.render({positions:n,calcLabels:i}),this.store.map((function(t,i){return function(t,e,i){return N(t,[i,0],[e,0],Yt)}(t,e[i],n[i])}))}},yMarkers:{layerClass:"y-markers",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n.labelPos||(n.labelPos="right");var a=k("text",{className:"chart-label",x:"left"===n.labelPos?Lt:i-c(e,5)-Lt,y:0,dy:Tt/-2+"px","font-size":Tt+"px","text-anchor":"start",innerHTML:e+""}),r=C(t,"",0,i,{stroke:n.stroke||At,className:n.className||"",lineType:n.lineType});return r.appendChild(a),r}(t.position,t.label,e.constants.width,{labelPos:t.options.labelPos,mode:"span",lineType:"dashed"})}))},animateElements:function(t){var e=v(this.oldData,t),i=pt(e,2);this.oldData=i[0];var n=(t=i[1]).map((function(t){return t.position})),a=t.map((function(t){return t.label})),r=t.map((function(t){return t.options})),s=this.oldData.map((function(t){return t.position}));return this.render(s.map((function(t,e){return{position:s[e],label:a[e],options:r[e]}}))),this.store.map((function(t,e){return _(t,n[e],s[e])}))}},yRegions:{layerClass:"y-regions",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=t-e,s=k("rect",{className:"bar mini",styles:{fill:"rgba(228, 234, 239, 0.49)",stroke:At,"stroke-dasharray":i+", "+r},x:0,y:0,width:i,height:r});a.labelPos||(a.labelPos="right");var o=k("text",{className:"chart-label",x:"left"===a.labelPos?Lt:i-c(n+"",4.5)-Lt,y:0,dy:Tt/-2+"px","font-size":Tt+"px","text-anchor":"start",innerHTML:n+""}),l=k("g",{transform:"translate(0, "+e+")"});return l.appendChild(s),l.appendChild(o),l}(t.startPos,t.endPos,e.constants.width,t.label,{labelPos:t.options.labelPos})}))},animateElements:function(t){var e=v(this.oldData,t),i=pt(e,2);this.oldData=i[0];var n=(t=i[1]).map((function(t){return t.endPos})),a=t.map((function(t){return t.label})),r=t.map((function(t){return t.startPos})),s=t.map((function(t){return t.options})),o=this.oldData.map((function(t){return t.endPos})),l=this.oldData.map((function(t){return t.startPos}));this.render(o.map((function(t,e){return{startPos:l[e],endPos:o[e],label:a[e],options:s[e]}})));var u=[];return this.store.map((function(t,e){u=u.concat(function(t,e,i,n){var a=e-i,r=t.childNodes[0];return[[r,{height:a,"stroke-dasharray":r.getAttribute("width")+", "+a},Yt,jt],N(t,[0,n],[0,i],Yt)]}(t,r[e],n[e],o[e]))})),u}},heatDomain:{layerClass:function(){return"heat-domain domain-"+this.constants.index},makeElements:function(t){var e=this,i=this.constants,n=i.index,a=i.colWidth,r=i.rowHeight,s=i.squareSize,o=i.radius,l=i.xTranslate,u=0;return this.serializedSubDomains=[],t.cols.map((function(t,i){1===i&&e.labels.push(T("domain-name",l,-12,B(n,!0).toUpperCase(),{fontSize:9})),t.map((function(t,i){if(t.fill){var n={"data-date":t.yyyyMmDd,"data-value":t.dataValue,"data-day":i},a=O("day",l,u,s,o,t.fill,n);e.serializedSubDomains.push(a)}u+=r})),u=0,l+=a})),this.serializedSubDomains},animateElements:function(t){if(t)return[]}},barGraph:{layerClass:function(){return"dataset-units dataset-bars dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="bar",this.units=t.yPositions.map((function(i,n){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=p(e,o.zeroLine),u=pt(l,2),c=u[0],h=u[1];h-=s,0===c&&(c=o.minHeight,h-=o.minHeight),d(t)||(t=0),d(h)||(h=0),d(c,!0)||(c=0),d(i,!0)||(i=0);var f=k("rect",{className:"bar mini",style:"fill: "+n,"data-point-index":r,x:t,y:h,width:i,height:c});if((a+="")||a.length){f.setAttribute("y",0),f.setAttribute("x",0);var v=k("text",{className:"data-point-value",x:i/2,y:0,dy:Tt/2*-1+"px","font-size":Tt+"px","text-anchor":"middle",innerHTML:a}),m=k("g",{"data-point-index":r,transform:"translate("+t+", "+h+")"});return m.appendChild(f),m.appendChild(v),m}return f}(t.xPositions[n],i,t.barWidth,e.color,t.labels[n],n,t.offsets[n],{zeroLine:t.zeroLine,barsWidth:t.barsWidth,minHeight:e.minHeight})})),this.units},animateElements:function(t){var e=t.xPositions,i=t.yPositions,n=t.offsets,a=t.labels,r=this.oldData.xPositions,s=this.oldData.yPositions,o=this.oldData.offsets,l=this.oldData.labels,u=v(r,e),c=pt(u,2);r=c[0],e=c[1];var h=v(s,i),d=pt(h,2);s=d[0],i=d[1];var f=v(o,n),p=pt(f,2);o=p[0],n=p[1];var m=v(l,a),g=pt(m,2);l=g[0],a=g[1],this.render({xPositions:r,yPositions:s,offsets:o,labels:a,zeroLine:this.oldData.zeroLine,barsWidth:this.oldData.barsWidth,barWidth:this.oldData.barWidth});var y=[];return this.store.map((function(a,r){y=y.concat(E(a,e[r],i[r],t.barWidth,n[r],{zeroLine:t.zeroLine}))})),y}},lineGraph:{layerClass:function(){return"dataset-units dataset-line dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="dot",this.paths={},e.hideLine||(this.paths=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=e.map((function(e,i){return t[i]+","+e})).join("L");n.spline&&(r=y(t,e));var s=S("M"+r,"line-graph-path",i);if(n.heatline){var o=L(a.svgDefs,i);s.style.stroke="url(#"+o+")"}var l={path:s};if(n.regionFill){var u=L(a.svgDefs,i,!0),c="M"+t[0]+","+a.zeroLine+"L"+r+"L"+t.slice(-1)[0]+","+a.zeroLine;l.region=S(c,"region-fill","none","url(#"+u+")")}return l}(t.xPositions,t.yPositions,e.color,{heatline:e.heatline,regionFill:e.regionFill,spline:e.spline},{svgDefs:e.svgDefs,zeroLine:t.zeroLine})),this.units=[],e.hideDots||(this.units=t.yPositions.map((function(i,n){return function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=k("circle",{style:"fill: "+n,"data-point-index":r,cx:t,cy:e,r:i});if((a+="")||a.length){s.setAttribute("cy",0),s.setAttribute("cx",0);var o=k("text",{className:"data-point-value",x:0,y:0,dy:Tt/2*-1-i+"px","font-size":Tt+"px","text-anchor":"middle",innerHTML:a}),l=k("g",{"data-point-index":r,transform:"translate("+t+", "+e+")"});return l.appendChild(s),l.appendChild(o),l}return s}(t.xPositions[n],i,t.radius,e.color,e.valuesOverPoints?t.values[n]:"",n)}))),Object.values(this.paths).concat(this.units)},animateElements:function(t){var e=t.xPositions,i=t.yPositions,n=t.values,a=this.oldData.xPositions,r=this.oldData.yPositions,s=this.oldData.values,o=v(a,e),l=pt(o,2);a=l[0],e=l[1];var u=v(r,i),c=pt(u,2);r=c[0],i=c[1];var h=v(s,n),d=pt(h,2);s=d[0],n=d[1],this.render({xPositions:a,yPositions:r,values:n,zeroLine:this.oldData.zeroLine,radius:this.oldData.radius});var f=[];return Object.keys(this.paths).length&&(f=f.concat(function(t,e,i,n,a){var r=[],s=i.map((function(t,i){return e[i]+","+t})).join("L");a&&(s=y(e,i));var o=[t.path,{d:"M"+s},$t,jt];if(r.push(o),t.region){var l=e[0]+","+n+"L",u="L"+e.slice(-1)[0]+", "+n,c=[t.region,{d:"M"+l+s+u},$t,jt];r.push(c)}return r}(this.paths,e,i,t.zeroLine,this.constants.spline))),this.units.length&&this.units.map((function(t,n){f=f.concat(function(t,e,i){return"circle"!==t.nodeName?[N(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,i],Yt)]:[[t,{cx:e,cy:i},Et,jt]]}(t,e[n],i[n]))})),f}}},Xt=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.type="percentage",n.setup(),n}return dt(i,t),ct(i,[{key:"setMeasures",value:function(t){var e=this.measures;this.barOptions=t.barOptions||{};var i=this.barOptions;i.height=i.height||20,i.depth=i.depth||yt,e.paddings.right=30,e.legendHeight=60,e.baseHeight=8*(i.height+.5*i.depth)}},{key:"setupComponents",value:function(){var t=this.state,e=[["percentageBars",{barHeight:this.barOptions.height,barDepth:this.barOptions.depth},function(){return{xPositions:t.xPositions,widths:t.widths,colors:this.colors}}.bind(this)]];this.components=new Map(e.map((function(t){var e=X.apply(void 0,vt(t));return[t[0],e]})))}},{key:"calc",value:function(){var t=this;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"calc",this).call(this);var e=this.state;e.xPositions=[],e.widths=[];var n=0;e.sliceTotals.map((function(i){var a=t.width*i/e.grandTotal;e.widths.push(a),e.xPositions.push(n),n+=a}))}},{key:"makeDataByIndex",value:function(){}},{key:"bindTooltip",value:function(){var t=this,i=this.state;this.container.addEventListener("mousemove",(function(n){var a=t.components.get("percentageBars").store,r=n.target;if(a.includes(r)){var s=a.indexOf(r),o=e(t.container),l=e(r),u=l.left-o.left+parseInt(r.getAttribute("width"))/2,c=l.top-o.top,h=(t.formattedLabels&&t.formattedLabels.length>0?t.formattedLabels[s]:t.state.labels[s])+": ",d=i.sliceTotals[s]/i.grandTotal;t.tip.setValues(u,c,{name:h,value:(100*d).toFixed(1)+"%"}),t.tip.showTip()}}))}}]),i}(It),Zt=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.type="pie",n.initTimeout=0,n.init=1,n.setup(),n}return dt(i,t),ct(i,[{key:"configure",value:function(t){ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"configure",this).call(this,t),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=t.hoverRadio||.1,this.config.startAngle=t.startAngle||0,this.clockWise=t.clockWise||!1}},{key:"calc",value:function(){var t=this;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"calc",this).call(this);var e=this.state;this.radius=this.height>this.width?this.center.x:this.center.y;var n=this.radius,a=this.clockWise,r=e.slicesProperties||[];e.sliceStrings=[],e.slicesProperties=[];var s=180-this.config.startAngle;e.sliceTotals.map((function(i,o){var l=s,u=i/e.grandTotal*360,c=u>180?1:0,d=a?-u:u,f=s+=d,p=h(l,n),v=h(f,n),m=t.init&&r[o],g=void 0,y=void 0;t.init?(g=m?m.startPosition:p,y=m?m.endPosition:p):(g=p,y=v);var b=360===u?function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=i.x+t.x,o=i.y+t.y,l=i.x+e.x,u=2*i.y,c=i.y+e.y;return"M"+i.x+" "+i.y+"\n\t\tL"+s+" "+o+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+u+" z\n\t\tL"+s+" "+u+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+c+" z"}(g,y,t.center,t.radius,a,c):function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=i.x+t.x,o=i.y+t.y,l=i.x+e.x,u=i.y+e.y;return"M"+i.x+" "+i.y+"\n\t\tL"+s+" "+o+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+u+" z"}(g,y,t.center,t.radius,a,c);e.sliceStrings.push(b),e.slicesProperties.push({startPosition:p,endPosition:v,value:i,total:e.grandTotal,startAngle:l,endAngle:f,angle:d})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["pieSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors}}.bind(this)]];this.components=new Map(e.map((function(t){var e=X.apply(void 0,vt(t));return[t[0],e]})))}},{key:"calTranslateByAngle",value:function(t){var e=this.radius,i=this.hoverRadio,n=h(t.startAngle+t.angle/2,e);return"translate3d("+n.x*i+"px,"+n.y*i+"px,0)"}},{key:"hoverSlice",value:function(t,i,n,a){if(t){var r=this.colors[i];if(n){W(t,this.calTranslateByAngle(this.state.slicesProperties[i])),t.style.fill=x(r,50);var s=e(this.svg),o=a.pageX-s.left+10,l=a.pageY-s.top-10,u=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[i]:this.state.labels[i])+": ",c=(100*this.state.sliceTotals[i]/this.state.grandTotal).toFixed(1);this.tip.setValues(o,l,{name:u,value:c+"%"}),this.tip.showTip()}else W(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.fill=r}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,i=this.components.get("pieSlices").store,n=this.curActiveSliceIndex,a=this.curActiveSlice;if(i.includes(e)){var r=i.indexOf(e);this.hoverSlice(a,n,!1),this.curActiveSlice=e,this.curActiveSliceIndex=r,this.hoverSlice(e,r,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),i}(It),Kt=function(t){function e(t,i){ut(this,e);var n=ft(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i));n.type="heatmap",n.countLabel=i.countLabel||"";var a=["Sunday","Monday"],r=a.includes(i.startSubDomain)?i.startSubDomain:"Sunday";return n.startSubDomainIndex=a.indexOf(r),n.setup(),n}return dt(e,t),ct(e,[{key:"setMeasures",value:function(t){var e=this.measures;this.discreteDomains=0===t.discreteDomains?0:1,e.paddings.top=36,e.paddings.bottom=0,e.legendHeight=24,e.baseHeight=12*Rt+s(e);var i=this.data,n=this.discreteDomains?12:0;this.independentWidth=12*(U(i.start,i.end)+n)+o(e)}},{key:"updateWidth",value:function(){var t=this.discreteDomains?12:0,e=this.state.noOfWeeks?this.state.noOfWeeks:52;this.baseWidth=12*(e+t)+o(this.measures)}},{key:"prepareData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data;if(t.start&&t.end&&t.start>t.end)throw new Error("Start date cannot be greater than end date.");if(t.start||(t.start=new Date,t.start.setFullYear(t.start.getFullYear()-1)),t.end||(t.end=new Date),t.dataPoints=t.dataPoints||{},parseInt(Object.keys(t.dataPoints)[0])>1e5){var e={};Object.keys(t.dataPoints).forEach((function(i){var n=new Date(i*Ut);e[I(n)]=t.dataPoints[i]})),t.dataPoints=e}return t}},{key:"calc",value:function(){var t=this.state;t.start=R(this.data.start),t.end=R(this.data.end),t.firstWeekStart=R(t.start),t.noOfWeeks=U(t.start,t.end),t.distribution=function(t,e){for(var i=Math.max.apply(Math,vt(t)),n=1/(e-1),a=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:"",i=[t.getMonth(),t.getFullYear()],n=i[0],a=i[1],r=q(t),s={index:n,cols:[]};J(e=R(e)||G(n,a),1);for(var o=U(r,e),l=[],u=void 0,c=0;c2&&void 0!==arguments[2]&&arguments[2],n=this.state,a=R(t),r=[],s=0;s=n.start&&a<=n.end;i||a.getMonth()!==e||!l?o.yyyyMmDd=I(a):o=this.getSubDomainConfig(a),r.push(o)}return r}},{key:"getSubDomainConfig",value:function(t){var e=I(t),i=this.data.dataPoints[e];return{yyyyMmDd:e,dataValue:i||0,fill:this.colors[rt(i,this.state.distribution)]}}}]),e}(Ft),Qt=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.barOptions=e.barOptions||{},n.lineOptions=e.lineOptions||{},n.type=e.type||"line",n.init=1,n.setup(),n}return dt(i,t),ct(i,[{key:"setMeasures",value:function(){this.data.datasets.length<=1&&(this.config.showLegend=0,this.measures.paddings.bottom=30)}},{key:"configure",value:function(t){ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"configure",this).call(this,t),t.axisOptions=t.axisOptions||{},t.tooltipOptions=t.tooltipOptions||{},this.config.xAxisMode=t.axisOptions.xAxisMode||"span",this.config.yAxisMode=t.axisOptions.yAxisMode||"span",this.config.xIsSeries=t.axisOptions.xIsSeries||0,this.config.shortenYAxisNumbers=t.axisOptions.shortenYAxisNumbers||0,this.config.formatTooltipX=t.tooltipOptions.formatTooltipX,this.config.formatTooltipY=t.tooltipOptions.formatTooltipY,this.config.valuesOverPoints=t.valuesOverPoints}},{key:"prepareData",value:function(){return st(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data,this.type)}},{key:"prepareFirstData",value:function(){return ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data)}},{key:"calc",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.calcXPositions(),t||this.calcYAxisParameters(this.getAllYValues(),"line"===this.type),this.makeDataByIndex()}},{key:"calcXPositions",value:function(){var t=this.state,e=this.data.labels;t.datasetLength=e.length,t.unitWidth=this.width/t.datasetLength,t.xOffset=t.unitWidth/2,t.xAxis={labels:e,positions:e.map((function(e,i){return l(t.xOffset+i*t.unitWidth)}))}}},{key:"calcYAxisParameters",value:function(t){var e=tt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"false"),i=this.height/nt(e),n=it(e)*i,a=this.height-et(e)*n;this.state.yAxis={labels:e,positions:e.map((function(t){return a-t*i})),scaleMultiplier:i,zeroLine:a},this.calcDatasetPoints(),this.calcYExtremes(),this.calcYRegions()}},{key:"calcDatasetPoints",value:function(){var t=this.state,e=function(e){return e.map((function(e){return at(e,t.yAxis)}))};t.datasets=this.data.datasets.map((function(t,i){var n=t.values,a=t.cumulativeYs||[];return{name:t.name&&t.name.replace(/<|>|&/g,(function(t){return"&"==t?"&":"<"==t?"<":">"})),index:i,chartType:t.chartType,values:n,yPositions:e(n),cumulativeYs:a,cumulativeYPos:e(a)}}))}},{key:"calcYExtremes",value:function(){var t=this.state;this.barOptions.stacked?t.yExtremes=t.datasets[t.datasets.length-1].cumulativeYPos:(t.yExtremes=new Array(t.datasetLength).fill(9999),t.datasets.map((function(e){e.yPositions.map((function(e,i){e1&&void 0!==arguments[1]?arguments[1]:[],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t/e.length;n<=0&&(n=1);var a=n/bt,r=void 0;if(i){var s=Math.max.apply(Math,vt(e.map((function(t){return t.length}))));r=Math.ceil(s/a)}return e.map((function(t,e){return(t+="").length>a&&(i?e%r!=0&&(t=""):t=a-3>0?t.slice(0,a-3)+" ...":t.slice(0,a)+".."),t}))}(this.width,t.xAxis.labels,this.config.xIsSeries),t.xAxis}.bind(this)],["yRegions",{width:this.width,pos:"right"},function(){return this.state.yRegions}.bind(this)]],i=this.state.datasets.filter((function(t){return"bar"===t.chartType})),n=this.state.datasets.filter((function(t){return"line"===t.chartType})),a=i.map((function(e){var n=e.index;return["barGraph-"+e.index,{index:n,color:t.colors[n],stacked:t.barOptions.stacked,valuesOverPoints:t.config.valuesOverPoints,minHeight:0*t.height},function(){var t=this.state,e=t.datasets[n],a=this.barOptions.stacked,r=this.barOptions.spaceRatio||.5,s=t.unitWidth*(1-r),o=s/(a?1:i.length),l=t.xAxis.positions.map((function(t){return t-s/2}));a||(l=l.map((function(t){return t+o*n})));var u=new Array(t.datasetLength).fill("");this.config.valuesOverPoints&&(u=a&&e.index===t.datasets.length-1?e.cumulativeYs:e.values);var c=new Array(t.datasetLength).fill(0);return a&&(c=e.yPositions.map((function(t,i){return t-e.cumulativeYPos[i]}))),{xPositions:l,yPositions:e.yPositions,offsets:c,labels:u,zeroLine:t.yAxis.zeroLine,barsWidth:s,barWidth:o}}.bind(t)]})),r=n.map((function(e){var i=e.index;return["lineGraph-"+e.index,{index:i,color:t.colors[i],svgDefs:t.svgDefs,heatline:t.lineOptions.heatline,regionFill:t.lineOptions.regionFill,spline:t.lineOptions.spline,hideDots:t.lineOptions.hideDots,hideLine:t.lineOptions.hideLine,valuesOverPoints:t.config.valuesOverPoints},function(){var t=this.state,e=t.datasets[i],n=t.yAxis.positions[0]a(n)?t.mapTooltipXPosition(o):t.tip.hideTip()}))}},{key:"mapTooltipXPosition",value:function(t){var e=this.state;if(e.yExtremes){var i=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.reduce((function(e,i){return Math.abs(i-t)=0){var n=this.dataByIndex[i];this.tip.setValues(n.xPos+this.tip.offset.x,n.yExtreme+this.tip.offset.y,{name:n.formattedLabel,value:""},n.values,i),this.tip.showTip()}}}},{key:"renderLegend",value:function(){var t=this,e=this.data;e.datasets.length>1&&(this.legendArea.textContent="",e.datasets.map((function(e,i){var n=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",a=arguments[4];a=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?m(a,Ot):a;var r={className:"legend-bar",x:0,y:0,width:i,height:"2px",fill:n},s=k("text",{className:"legend-dataset-text",x:0,y:0,dy:2*Tt+"px","font-size":1.2*Tt+"px","text-anchor":"start",fill:Ct,innerHTML:a}),o=k("g",{transform:"translate("+t+", "+e+")"});return o.appendChild(k("rect",r)),o.appendChild(s),o}(100*i,"0",100,t.colors[i],e.name,t.config.truncateLegends);t.legendArea.appendChild(n)})))}},{key:"makeOverlay",value:function(){var t=this;this.init?this.init=0:(this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)})),this.overlayGuides=this.dataUnitComponents.map((function(t){return{type:t.unitType,overlay:void 0,units:t.units}})),void 0===this.state.currentIndex&&(this.state.currentIndex=this.state.datasetLength-1),this.overlayGuides.map((function(e){var i=e.units[t.state.currentIndex];e.overlay=Nt[e.type](i),t.drawArea.appendChild(e.overlay)})))}},{key:"updateOverlayGuides",value:function(){this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)}))}},{key:"bindOverlay",value:function(){var t=this;this.parent.addEventListener("data-select",(function(){t.updateOverlay()}))}},{key:"bindUnits",value:function(){var t=this;this.dataUnitComponents.map((function(e){e.units.map((function(e){e.addEventListener("click",(function(){var i=e.getAttribute("data-point-index");t.setCurrentDataPoint(i)}))}))})),this.tip.container.addEventListener("click",(function(){var e=t.tip.container.getAttribute("data-point-index");t.setCurrentDataPoint(e)}))}},{key:"updateOverlay",value:function(){var t=this;this.overlayGuides.map((function(e){var i=e.units[t.state.currentIndex];_t[e.type](i,e.overlay)}))}},{key:"onLeftArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex-1)}},{key:"onRightArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex+1)}},{key:"getDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentIndex,e=this.state;return{index:t,label:e.xAxis.labels[t],values:e.datasets.map((function(e){return e.values[t]}))}}},{key:"setCurrentDataPoint",value:function(t){var e=this.state;(t=parseInt(t))<0&&(t=0),t>=e.xAxis.labels.length&&(t=e.xAxis.labels.length-1),t!==e.currentIndex&&(e.currentIndex=t,function(t,e,i){var n=document.createEvent("HTMLEvents");for(var a in n.initEvent(e,!0,!0),i)n[a]=i[a];t.dispatchEvent(n)}(this.parent,"data-select",this.getDataPoint()))}},{key:"addDataPoint",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.datasetLength;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"addDataPoint",this).call(this,t,e,n),this.data.labels.splice(n,0,t),this.data.datasets.map((function(t,i){t.values.splice(n,0,e[i])})),this.update(this.data)}},{key:"removeDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.datasetLength-1;this.data.labels.length<=1||(ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"removeDataPoint",this).call(this,t),this.data.labels.splice(t,1),this.data.datasets.map((function(e){e.values.splice(t,1)})),this.update(this.data))}},{key:"updateDataset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.data.datasets[e].values=t,this.update(this.data)}},{key:"updateDatasets",value:function(t){this.data.datasets.map((function(e,i){t[i]&&(e.values=t[i])})),this.update(this.data)}}]),i}(Ft),te=function(t){function i(t,e){ut(this,i);var n=ft(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.type="donut",n.initTimeout=0,n.init=1,n.setup(),n}return dt(i,t),ct(i,[{key:"configure",value:function(t){ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"configure",this).call(this,t),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=t.hoverRadio||.1,this.config.startAngle=t.startAngle||0,this.clockWise=t.clockWise||!1,this.strokeWidth=t.strokeWidth||30}},{key:"calc",value:function(){var t=this;ht(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"calc",this).call(this);var e=this.state;this.radius=this.height>this.width?this.center.x-this.strokeWidth/2:this.center.y-this.strokeWidth/2;var n=this.radius,a=this.clockWise,r=e.slicesProperties||[];e.sliceStrings=[],e.slicesProperties=[];var s=180-this.config.startAngle;e.sliceTotals.map((function(i,o){var l=s,u=i/e.grandTotal*360,c=u>180?1:0,d=a?-u:u,f=s+=d,p=h(l,n),v=h(f,n),m=t.init&&r[o],g=void 0,y=void 0;t.init?(g=m?m.startPosition:p,y=m?m.endPosition:p):(g=p,y=v);var b=360===u?function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=i.x+t.x,o=i.y+t.y,l=i.x+e.x,u=2*n+o;return"M"+s+" "+o+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+u+"\n\t\tM"+s+" "+u+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+l+" "+(i.y+t.y)}(g,y,t.center,t.radius,t.clockWise,c):function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;return"M"+(i.x+t.x)+" "+(i.y+t.y)+"\n\t\tA "+n+" "+n+" 0 "+r+" "+(a?1:0)+"\n\t\t"+(i.x+e.x)+" "+(i.y+e.y)}(g,y,t.center,t.radius,t.clockWise,c);e.sliceStrings.push(b),e.slicesProperties.push({startPosition:p,endPosition:v,value:i,total:e.grandTotal,startAngle:l,endAngle:f,angle:d})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["donutSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors,strokeWidth:this.strokeWidth}}.bind(this)]];this.components=new Map(e.map((function(t){var e=X.apply(void 0,vt(t));return[t[0],e]})))}},{key:"calTranslateByAngle",value:function(t){var e=this.radius,i=this.hoverRadio,n=h(t.startAngle+t.angle/2,e);return"translate3d("+n.x*i+"px,"+n.y*i+"px,0)"}},{key:"hoverSlice",value:function(t,i,n,a){if(t){var r=this.colors[i];if(n){W(t,this.calTranslateByAngle(this.state.slicesProperties[i])),t.style.stroke=x(r,50);var s=e(this.svg),o=a.pageX-s.left+10,l=a.pageY-s.top-10,u=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[i]:this.state.labels[i])+": ",c=(100*this.state.sliceTotals[i]/this.state.grandTotal).toFixed(1);this.tip.setValues(o,l,{name:u,value:c+"%"}),this.tip.showTip()}else W(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.stroke=r}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,i=this.components.get("donutSlices").store,n=this.curActiveSliceIndex,a=this.curActiveSlice;if(i.includes(e)){var r=i.indexOf(e);this.hoverSlice(a,n,!1),this.curActiveSlice=e,this.curActiveSliceIndex=r,this.hoverSlice(e,r,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),i}(It),ee={bar:Qt,line:Qt,percentage:Xt,heatmap:Kt,pie:Zt,donut:te},ie=Object.freeze({Chart:function t(e,i){return ut(this,t),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"line",e=arguments[1],i=arguments[2];return"axis-mixed"===t?(i.type="line",new Qt(e,i)):ee[t]?new ee[t](e,i):void console.error("Undefined chart type: "+t)}(i.type,e,i)},PercentageChart:Xt,PieChart:Zt,Heatmap:Kt,AxisChart:Qt});return Object.assign({},{NAME:"Frappe Charts",VERSION:"1.6.2"},ie)}()},440:(t,e,i)=>{var n=i(75).default;function a(){"use strict";t.exports=a=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},i=Object.prototype,r=i.hasOwnProperty,s=Object.defineProperty||function(t,e,i){t[e]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function h(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,i){return t[e]=i}}function d(t,e,i,n){var a=e&&e.prototype instanceof v?e:v,r=Object.create(a.prototype),o=new O(n||[]);return s(r,"_invoke",{value:M(t,i,o)}),r}function f(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p={};function v(){}function m(){}function g(){}var y={};h(y,l,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==i&&r.call(x,l)&&(y=x);var w=g.prototype=v.prototype=Object.create(y);function k(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(a,s,o,l){var u=f(t[a],t,s);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==n(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,o,l)}),(function(t){i("throw",t,o,l)})):e.resolve(h).then((function(t){c.value=t,o(c)}),(function(t){return i("throw",t,o,l)}))}l(u.arg)}var a;s(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,a){i(t,n,e,a)}))}return a=a?a.then(r,r):r()}})}function M(t,e,i){var n="suspendedStart";return function(a,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw r;return{value:void 0,done:!0}}for(i.method=a,i.arg=r;;){var s=i.delegate;if(s){var o=P(s,i);if(o){if(o===p)continue;return o}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=f(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}function P(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=f(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function e(){for(;++i=0;--n){var a=this.tryEntries[n],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var o=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(o&&l){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),L(i),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var a=n.arg;L(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:T(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function e(i){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,e,i)=>{var n=i(440)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n);const t=flarum.core.compat["admin/app"];var e=i.n(t);const a=flarum.core.compat["common/extend"],r=flarum.core.compat["admin/components/DashboardPage"];var s=i.n(r);function o(t,e,i,n,a,r,s){try{var o=t[r](s),l=o.value}catch(t){return void i(t)}o.done?e(l):Promise.resolve(l).then(n,a)}function l(t){return function(){var e=this,i=arguments;return new Promise((function(n,a){var r=t.apply(e,i);function s(t){o(r,n,a,s,l,"next",t)}function l(t){o(r,n,a,s,l,"throw",t)}s(void 0)}))}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}var h=i(507),d=i.n(h);const f=flarum.core.compat["admin/components/DashboardWidget"];var p=i.n(f);const v=flarum.core.compat["common/components/LoadingIndicator"];var g=i.n(v);const y=flarum.core.compat["common/components/Link"];var b=i.n(y);const x=flarum.core.compat["common/utils/abbreviateNumber"];var w=i.n(x),k=function(t){function i(){for(var e,i=arguments.length,n=new Array(i),a=0;a0?"up":"down")},$()("fas fa-arrow-"+(l>0?"up":"down")),Math.abs(l).toFixed(1),"%"))))}))),m("[",null,a?m("div",{key:"loading",className:"StatisticsWidget-chart","data-loading":"true"},m(g(),{size:"large"})):m("div",{key:"loaded",className:"StatisticsWidget-chart","data-loading":"false",oncreate:this.drawChart.bind(this),onupdate:this.drawChart.bind(this)})),this.noData&&m(_(),{text:e().translator.trans("flarum-statistics.admin.statistics.no_data")}),!this.noData&&!!this.chart&&m(T(),{className:"StatisticsWidget-chartExport Button",icon:"fas fa-file-export",onclick:function(){n.chart.export()}},e().translator.trans("flarum-statistics.admin.statistics.export_chart_button")))},n.drawChart=function(t){var i,n;if(!this.chart||this.chartEntity!==this.selectedEntity||this.chartPeriod!==this.selectedPeriod){for(var a="custom"===this.selectedPeriod?{start:null==(i=this.customPeriod)?void 0:i.start,end:null==(n=this.customPeriod)?void 0:n.end,step:86400}:this.periods[this.selectedPeriod],r=a.end-a.start,s=[],o=[],l=[],u=a.start;u86400&&(c+=" - "+V().unix(u+a.step-1).utc().format("D MMM"))),s.push(c),o.push(this.getPeriodCount(this.selectedEntity,{start:u,end:u+a.step})),l.push(this.getPeriodCount(this.selectedEntity,{start:u-r,end:u-r}))}if(0===o.length)return this.noData=!0,void m.redraw();this.noData=!1,m.redraw();var h={labels:s,datasets:[{name:C()(e().translator.trans("flarum-statistics.admin.statistics.current_period")),values:o},{name:C()(e().translator.trans("flarum-statistics.admin.statistics.previous_period")),values:l}]};this.chart&&16&document.compareDocumentPosition(this.chart.parent)?this.chart.update(h):this.chart=new Z.Chart(t.dom,{data:h,type:"line",height:280,axisOptions:{xAxisMode:"tick",yAxisMode:"span",xIsSeries:!0},lineOptions:{hideDots:1,regionFill:1},colors:[e().forum.attribute("themePrimaryColor"),"black"]}),this.chartEntity=this.selectedEntity,this.chartPeriod=this.selectedPeriod}},n.changeEntity=function(t){this.selectedEntity=t},n.changePeriod=function(t){this.selectedPeriod=t},n.getTotalCount=function(t){return this.lifetimeData[t]},n.getPeriodCount=function(t,e){var i=("custom"===this.selectedPeriod?this.customPeriodData:this.timedData)[t],n=0;for(var a in i){var r=parseInt(a);r>=e.start&&r=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) {\n\tvar element = document.createElement(tag);\n\n\tfor (var i in o) {\n\t\tvar val = o[i];\n\n\t\tif (i === \"inside\") {\n\t\t\t$(val).appendChild(element);\n\t\t}\n\t\telse if (i === \"around\") {\n\t\t\tvar ref = $(val);\n\t\t\tref.parentNode.insertBefore(element, ref);\n\t\t\telement.appendChild(ref);\n\n\t\t} else if (i === \"styles\") {\n\t\t\tif(typeof val === \"object\") {\n\t\t\t\tObject.keys(val).map(prop => {\n\t\t\t\t\telement.style[prop] = val[prop];\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (i in element ) {\n\t\t\telement[i] = val;\n\t\t}\n\t\telse {\n\t\t\telement.setAttribute(i, val);\n\t\t}\n\t}\n\n\treturn element;\n};\n\nexport function getOffset(element) {\n\tlet rect = element.getBoundingClientRect();\n\treturn {\n\t\t// https://stackoverflow.com/a/7436602/6495043\n\t\t// rect.top varies with scroll, so we add whatever has been\n\t\t// scrolled to it to get absolute distance from actual page top\n\t\ttop: rect.top + (document.documentElement.scrollTop || document.body.scrollTop),\n\t\tleft: rect.left + (document.documentElement.scrollLeft || document.body.scrollLeft)\n\t};\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n// an element's offsetParent property will return null whenever it, or any of its parents,\n// is hidden via the display style property.\nexport function isHidden(el) {\n\treturn (el.offsetParent === null);\n}\n\nexport function isElementInViewport(el) {\n\t// Although straightforward: https://stackoverflow.com/a/7557433/6495043\n\tvar rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */\n rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */\n\t);\n}\n\nexport function getElementContentWidth(element) {\n\tvar styles = window.getComputedStyle(element);\n\tvar padding = parseFloat(styles.paddingLeft) +\n\t\tparseFloat(styles.paddingRight);\n\n\treturn element.clientWidth - padding;\n}\n\nexport function bind(element, o){\n\tif (element) {\n\t\tfor (var event in o) {\n\t\t\tvar callback = o[event];\n\n\t\t\tevent.split(/\\s+/).forEach(function (event) {\n\t\t\t\telement.addEventListener(event, callback);\n\t\t\t});\n\t\t}\n\t}\n}\n\nexport function unbind(element, o){\n\tif (element) {\n\t\tfor (var event in o) {\n\t\t\tvar callback = o[event];\n\n\t\t\tevent.split(/\\s+/).forEach(function(event) {\n\t\t\t\telement.removeEventListener(event, callback);\n\t\t\t});\n\t\t}\n\t}\n}\n\nexport function fire(target, type, properties) {\n\tvar evt = document.createEvent(\"HTMLEvents\");\n\n\tevt.initEvent(type, true, true );\n\n\tfor (var j in properties) {\n\t\tevt[j] = properties[j];\n\t}\n\n\treturn target.dispatchEvent(evt);\n}\n\n// https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\nexport function forEachNode(nodeList, callback, scope) {\n\tif(!nodeList) return;\n\tfor (var i = 0; i < nodeList.length; i++) {\n\t\tcallback.call(scope, nodeList[i], i);\n\t}\n}\n\nexport function activate($parent, $child, commonClass, activeClass='active', index = -1) {\n\tlet $children = $parent.querySelectorAll(`.${commonClass}.${activeClass}`);\n\n\tforEachNode($children, (node, i) => {\n\t\tif(index >= 0 && i <= index) return;\n\t\tnode.classList.remove(activeClass);\n\t});\n\n\t$child.classList.add(activeClass);\n}\n","export const ALL_CHART_TYPES = ['line', 'scatter', 'bar', 'percentage', 'heatmap', 'pie'];\n\nexport const COMPATIBLE_CHARTS = {\n\tbar: ['line', 'scatter', 'percentage', 'pie'],\n\tline: ['scatter', 'bar', 'percentage', 'pie'],\n\tpie: ['line', 'scatter', 'percentage', 'bar'],\n\tpercentage: ['bar', 'line', 'scatter', 'pie'],\n\theatmap: []\n};\n\nexport const DATA_COLOR_DIVISIONS = {\n\tbar: 'datasets',\n\tline: 'datasets',\n\tpie: 'labels',\n\tpercentage: 'labels',\n\theatmap: HEATMAP_DISTRIBUTION_SIZE\n};\n\nexport const BASE_MEASURES = {\n\tmargins: {\n\t\ttop: 10,\n\t\tbottom: 10,\n\t\tleft: 20,\n\t\tright: 20\n\t},\n\tpaddings: {\n\t\ttop: 20,\n\t\tbottom: 40,\n\t\tleft: 30,\n\t\tright: 10\n\t},\n\n\tbaseHeight: 240,\n\ttitleHeight: 20,\n\tlegendHeight: 30,\n\n\ttitleFontSize: 12,\n};\n\nexport function getTopOffset(m) {\n\treturn m.titleHeight + m.margins.top + m.paddings.top;\n}\n\nexport function getLeftOffset(m) {\n\treturn m.margins.left + m.paddings.left;\n}\n\nexport function getExtraHeight(m) {\n\tlet totalExtraHeight = m.margins.top + m.margins.bottom\n\t\t+ m.paddings.top + m.paddings.bottom\n\t\t+ m.titleHeight + m.legendHeight;\n\treturn totalExtraHeight;\n}\n\nexport function getExtraWidth(m) {\n\tlet totalExtraWidth = m.margins.left + m.margins.right\n\t\t+ m.paddings.left + m.paddings.right;\n\n\treturn totalExtraWidth;\n}\n\nexport const INIT_CHART_UPDATE_TIMEOUT = 700;\nexport const CHART_POST_ANIMATE_TIMEOUT = 400;\n\nexport const DEFAULT_AXIS_CHART_TYPE = 'line';\nexport const AXIS_DATASET_CHART_TYPES = ['line', 'bar'];\n\nexport const AXIS_LEGEND_BAR_SIZE = 100;\n\nexport const BAR_CHART_SPACE_RATIO = 0.5;\nexport const MIN_BAR_PERCENT_HEIGHT = 0.00;\n\nexport const LINE_CHART_DOT_SIZE = 4;\nexport const DOT_OVERLAY_SIZE_INCR = 4;\n\nexport const PERCENTAGE_BAR_DEFAULT_HEIGHT = 20;\nexport const PERCENTAGE_BAR_DEFAULT_DEPTH = 2;\n\n// Fixed 5-color theme,\n// More colors are difficult to parse visually\nexport const HEATMAP_DISTRIBUTION_SIZE = 5;\n\nexport const HEATMAP_SQUARE_SIZE = 10;\nexport const HEATMAP_GUTTER_SIZE = 2;\n\nexport const DEFAULT_CHAR_WIDTH = 7;\n\nexport const TOOLTIP_POINTER_TRIANGLE_HEIGHT = 5;\n\nconst DEFAULT_CHART_COLORS = ['light-blue', 'blue', 'violet', 'red', 'orange',\n\t'yellow', 'green', 'light-green', 'purple', 'magenta', 'light-grey', 'dark-grey'];\nconst HEATMAP_COLORS_GREEN = ['#ebedf0', '#c6e48b', '#7bc96f', '#239a3b', '#196127'];\nexport const HEATMAP_COLORS_BLUE = ['#ebedf0', '#c0ddf9', '#73b3f3', '#3886e1', '#17459e'];\nexport const HEATMAP_COLORS_YELLOW = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001c'];\n\nexport const DEFAULT_COLORS = {\n\tbar: DEFAULT_CHART_COLORS,\n\tline: DEFAULT_CHART_COLORS,\n\tpie: DEFAULT_CHART_COLORS,\n\tpercentage: DEFAULT_CHART_COLORS,\n\theatmap: HEATMAP_COLORS_GREEN,\n\tdonut: DEFAULT_CHART_COLORS\n};\n\n// Universal constants\nexport const ANGLE_RATIO = Math.PI / 180;\nexport const FULL_ANGLE = 360;\n","import { ANGLE_RATIO } from './constants';\n\n/**\n * Returns the value of a number upto 2 decimal places.\n * @param {Number} d Any number\n */\nexport function floatTwo(d) {\n\treturn parseFloat(d.toFixed(2));\n}\n\n/**\n * Returns whether or not two given arrays are equal.\n * @param {Array} arr1 First array\n * @param {Array} arr2 Second array\n */\nexport function arraysEqual(arr1, arr2) {\n\tif(arr1.length !== arr2.length) return false;\n\tlet areEqual = true;\n\tarr1.map((d, i) => {\n\t\tif(arr2[i] !== d) areEqual = false;\n\t});\n\treturn areEqual;\n}\n\n/**\n * Shuffles array in place. ES6 version\n * @param {Array} array An array containing the items.\n */\nexport function shuffle(array) {\n\t// Awesomeness: https://bost.ocks.org/mike/shuffle/\n\t// https://stackoverflow.com/a/2450976/6495043\n\t// https://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array?noredirect=1&lq=1\n\n\tfor (let i = array.length - 1; i > 0; i--) {\n\t\tlet j = Math.floor(Math.random() * (i + 1));\n\t\t[array[i], array[j]] = [array[j], array[i]];\n\t}\n\n\treturn array;\n}\n\n/**\n * Fill an array with extra points\n * @param {Array} array Array\n * @param {Number} count number of filler elements\n * @param {Object} element element to fill with\n * @param {Boolean} start fill at start?\n */\nexport function fillArray(array, count, element, start=false) {\n\tif(!element) {\n\t\telement = start ? array[0] : array[array.length - 1];\n\t}\n\tlet fillerArray = new Array(Math.abs(count)).fill(element);\n\tarray = start ? fillerArray.concat(array) : array.concat(fillerArray);\n\treturn array;\n}\n\n/**\n * Returns pixel width of string.\n * @param {String} string\n * @param {Number} charWidth Width of single char in pixels\n */\nexport function getStringWidth(string, charWidth) {\n\treturn (string+\"\").length * charWidth;\n}\n\nexport function bindChange(obj, getFn, setFn) {\n\treturn new Proxy(obj, {\n\t\tset: function(target, prop, value) {\n\t\t\tsetFn();\n\t\t\treturn Reflect.set(target, prop, value);\n\t\t},\n\t\tget: function(target, prop) {\n\t\t\tgetFn();\n\t\t\treturn Reflect.get(target, prop);\n\t\t}\n\t});\n}\n\n// https://stackoverflow.com/a/29325222\nexport function getRandomBias(min, max, bias, influence) {\n\tconst range = max - min;\n\tconst biasValue = range * bias + min;\n\tvar rnd = Math.random() * range + min,\t\t// random in range\n\t\tmix = Math.random() * influence;\t\t// random mixer\n\treturn rnd * (1 - mix) + biasValue * mix;\t// mix full range and bias\n}\n\nexport function getPositionByAngle(angle, radius) {\n\treturn {\n\t\tx: Math.sin(angle * ANGLE_RATIO) * radius,\n\t\ty: Math.cos(angle * ANGLE_RATIO) * radius,\n\t};\n}\n\n/**\n * Check if a number is valid for svg attributes\n * @param {object} candidate Candidate to test\n * @param {Boolean} nonNegative flag to treat negative number as invalid\n */\nexport function isValidNumber(candidate, nonNegative=false) {\n\tif (Number.isNaN(candidate)) return false;\n\telse if (candidate === undefined) return false;\n\telse if (!Number.isFinite(candidate)) return false;\n\telse if (nonNegative && candidate < 0) return false;\n\telse return true;\n}\n\n/**\n * Round a number to the closes precision, max max precision 4\n * @param {Number} d Any Number\n */\nexport function round(d) {\n\t// https://floating-point-gui.de/\n\t// https://www.jacklmoore.com/notes/rounding-in-javascript/\n\treturn Number(Math.round(d + 'e4') + 'e-4');\n}\n\n/**\n * Creates a deep clone of an object\n * @param {Object} candidate Any Object\n */\n export function deepClone(candidate) {\n\tlet cloned, value, key;\n \n\tif (candidate instanceof Date) {\n\t return new Date(candidate.getTime());\n\t}\n \n\tif (typeof candidate !== \"object\" || candidate === null) {\n\t return candidate;\n\t}\n \n\tcloned = Array.isArray(candidate) ? [] : {};\n \n\tfor (key in candidate) {\n\t value = candidate[key];\n \n\t cloned[key] = deepClone(value);\n\t}\n \n\treturn cloned;\n }","import { fillArray } from './helpers';\n\nexport function getBarHeightAndYAttr(yTop, zeroLine) {\n\tlet height, y;\n\tif (yTop <= zeroLine) {\n\t\theight = zeroLine - yTop;\n\t\ty = yTop;\n\t} else {\n\t\theight = yTop - zeroLine;\n\t\ty = zeroLine;\n\t}\n\n\treturn [height, y];\n}\n\nexport function equilizeNoOfElements(array1, array2,\n\textraCount = array2.length - array1.length) {\n\n\t// Doesn't work if either has zero elements.\n\tif(extraCount > 0) {\n\t\tarray1 = fillArray(array1, extraCount);\n\t} else {\n\t\tarray2 = fillArray(array2, extraCount);\n\t}\n\treturn [array1, array2];\n}\n\nexport function truncateString(txt, len) {\n\tif (!txt) {\n\t\treturn;\n\t}\n\tif (txt.length > len) {\n\t\treturn txt.slice(0, len-3) + '...';\n\t} else {\n\t\treturn txt;\n\t}\n}\n\nexport function shortenLargeNumber(label) {\n\tlet number;\n\tif (typeof label === 'number') number = label;\n\telse if (typeof label === 'string') {\n\t\tnumber = Number(label);\n\t\tif (Number.isNaN(number)) return label;\n\t}\n\n\t// Using absolute since log wont work for negative numbers\n\tlet p = Math.floor(Math.log10(Math.abs(number)));\n\tif (p <= 2) return number; // Return as is for a 3 digit number of less\n\tlet\tl = Math.floor(p / 3);\n\tlet shortened = (Math.pow(10, p - l * 3) * +(number / Math.pow(10, p)).toFixed(1));\n\n\t// Correct for floating point error upto 2 decimal places\n\treturn Math.round(shortened*100)/100 + ' ' + ['', 'K', 'M', 'B', 'T'][l];\n}\n\n// cubic bezier curve calculation (from example by Franรงois Romain)\nexport function getSplineCurvePointsStr(xList, yList) {\n\n\tlet points=[];\n\tfor(let i=0;i {\n\t\tlet lengthX = pointB[0] - pointA[0];\n\t\tlet lengthY = pointB[1] - pointA[1];\n\t\treturn {\n\t\t\tlength: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),\n\t\t\tangle: Math.atan2(lengthY, lengthX)\n\t\t};\n\t};\n \n\tlet controlPoint = (current, previous, next, reverse) => {\n\t\tlet p = previous || current;\n\t\tlet n = next || current;\n\t\tlet o = line(p, n);\n\t\tlet angle = o.angle + (reverse ? Math.PI : 0);\n\t\tlet length = o.length * smoothing;\n\t\tlet x = current[0] + Math.cos(angle) * length;\n\t\tlet y = current[1] + Math.sin(angle) * length;\n\t\treturn [x, y];\n\t};\n \n\tlet bezierCommand = (point, i, a) => {\n\t\tlet cps = controlPoint(a[i - 1], a[i - 2], point);\n\t\tlet cpe = controlPoint(point, a[i - 1], a[i + 1], true);\n\t\treturn `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`;\n\t};\n \n\tlet pointStr = (points, command) => {\n\t\treturn points.reduce((acc, point, i, a) => i === 0\n\t\t\t? `${point[0]},${point[1]}`\n\t\t\t: `${acc} ${command(point, i, a)}`, '');\n\t};\n \n\treturn pointStr(points, bezierCommand);\n}\n","const PRESET_COLOR_MAP = {\n\t'light-blue': '#7cd6fd',\n\t'blue': '#5e64ff',\n\t'violet': '#743ee2',\n\t'red': '#ff5858',\n\t'orange': '#ffa00a',\n\t'yellow': '#feef72',\n\t'green': '#28a745',\n\t'light-green': '#98d85b',\n\t'purple': '#b554ff',\n\t'magenta': '#ffa3ef',\n\t'black': '#36114C',\n\t'grey': '#bdd3e6',\n\t'light-grey': '#f0f4f7',\n\t'dark-grey': '#b8c2cc'\n};\n\nfunction limitColor(r){\n\tif (r > 255) return 255;\n\telse if (r < 0) return 0;\n\treturn r;\n}\n\nexport function lightenDarkenColor(color, amt) {\n\tlet col = getColor(color);\n\tlet usePound = false;\n\tif (col[0] == \"#\") {\n\t\tcol = col.slice(1);\n\t\tusePound = true;\n\t}\n\tlet num = parseInt(col,16);\n\tlet r = limitColor((num >> 16) + amt);\n\tlet b = limitColor(((num >> 8) & 0x00FF) + amt);\n\tlet g = limitColor((num & 0x0000FF) + amt);\n\treturn (usePound?\"#\":\"\") + (g | (b << 8) | (r << 16)).toString(16);\n}\n\nexport function isValidColor(string) {\n\t// https://stackoverflow.com/a/32685393\n\tlet HEX_RE = /(^\\s*)(#)((?:[A-Fa-f0-9]{3}){1,2})$/i;\n\tlet RGB_RE = /(^\\s*)(rgb|hsl)(a?)[(]\\s*([\\d.]+\\s*%?)\\s*,\\s*([\\d.]+\\s*%?)\\s*,\\s*([\\d.]+\\s*%?)\\s*(?:,\\s*([\\d.]+)\\s*)?[)]$/i;\n\treturn HEX_RE.test(string) || RGB_RE.test(string);\n}\n\nexport const getColor = (color) => {\n\t// When RGB color, convert to hexadecimal (alpha value is omitted)\n\tif((/rgb[a]{0,1}\\([\\d, ]+\\)/gim).test(color)) {\n\t\treturn (/\\D+(\\d*)\\D+(\\d*)\\D+(\\d*)/gim).exec(color)\n\t\t\t.map((x, i) => (i !== 0 ? Number(x).toString(16) : '#'))\n\t\t\t.reduce((c, ch) => `${c}${ch}`);\n\t}\n\treturn PRESET_COLOR_MAP[color] || color;\n};\n","import { getBarHeightAndYAttr, truncateString, shortenLargeNumber, getSplineCurvePointsStr } from './draw-utils';\nimport { getStringWidth, isValidNumber } from './helpers';\nimport { DOT_OVERLAY_SIZE_INCR, PERCENTAGE_BAR_DEFAULT_DEPTH } from './constants';\nimport { lightenDarkenColor } from './colors';\n\nexport const AXIS_TICK_LENGTH = 6;\nconst LABEL_MARGIN = 4;\nconst LABEL_MAX_CHARS = 15;\nexport const FONT_SIZE = 10;\nconst BASE_LINE_COLOR = '#dadada';\nconst FONT_FILL = '#555b51';\n\nfunction $(expr, con) {\n\treturn typeof expr === \"string\"? (con || document).querySelector(expr) : expr || null;\n}\n\nexport function createSVG(tag, o) {\n\tvar element = document.createElementNS(\"http://www.w3.org/2000/svg\", tag);\n\n\tfor (var i in o) {\n\t\tvar val = o[i];\n\n\t\tif (i === \"inside\") {\n\t\t\t$(val).appendChild(element);\n\t\t}\n\t\telse if (i === \"around\") {\n\t\t\tvar ref = $(val);\n\t\t\tref.parentNode.insertBefore(element, ref);\n\t\t\telement.appendChild(ref);\n\n\t\t} else if (i === \"styles\") {\n\t\t\tif(typeof val === \"object\") {\n\t\t\t\tObject.keys(val).map(prop => {\n\t\t\t\t\telement.style[prop] = val[prop];\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tif(i === \"className\") { i = \"class\"; }\n\t\t\tif(i === \"innerHTML\") {\n\t\t\t\telement['textContent'] = val;\n\t\t\t} else {\n\t\t\t\telement.setAttribute(i, val);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn element;\n}\n\nfunction renderVerticalGradient(svgDefElem, gradientId) {\n\treturn createSVG('linearGradient', {\n\t\tinside: svgDefElem,\n\t\tid: gradientId,\n\t\tx1: 0,\n\t\tx2: 0,\n\t\ty1: 0,\n\t\ty2: 1\n\t});\n}\n\nfunction setGradientStop(gradElem, offset, color, opacity) {\n\treturn createSVG('stop', {\n\t\t'inside': gradElem,\n\t\t'style': `stop-color: ${color}`,\n\t\t'offset': offset,\n\t\t'stop-opacity': opacity\n\t});\n}\n\nexport function makeSVGContainer(parent, className, width, height) {\n\treturn createSVG('svg', {\n\t\tclassName: className,\n\t\tinside: parent,\n\t\twidth: width,\n\t\theight: height\n\t});\n}\n\nexport function makeSVGDefs(svgContainer) {\n\treturn createSVG('defs', {\n\t\tinside: svgContainer,\n\t});\n}\n\nexport function makeSVGGroup(className, transform='', parent=undefined) {\n\tlet args = {\n\t\tclassName: className,\n\t\ttransform: transform\n\t};\n\tif(parent) args.inside = parent;\n\treturn createSVG('g', args);\n}\n\nexport function wrapInSVGGroup(elements, className='') {\n\tlet g = createSVG('g', {\n\t\tclassName: className\n\t});\n\telements.forEach(e => g.appendChild(e));\n\treturn g;\n}\n\nexport function makePath(pathStr, className='', stroke='none', fill='none', strokeWidth=2) {\n\treturn createSVG('path', {\n\t\tclassName: className,\n\t\td: pathStr,\n\t\tstyles: {\n\t\t\tstroke: stroke,\n\t\t\tfill: fill,\n\t\t\t'stroke-width': strokeWidth\n\t\t}\n\t});\n}\n\nexport function makeArcPathStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, arcEndY] = [center.x + endPosition.x, center.y + endPosition.y];\n\treturn `M${center.x} ${center.y}\n\t\tL${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY} z`;\n}\n\nexport function makeCircleStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, midArc, arcEndY] = [center.x + endPosition.x, center.y * 2, center.y + endPosition.y];\n\treturn `M${center.x} ${center.y}\n\t\tL${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${midArc} z\n\t\tL${arcStartX} ${midArc}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY} z`;\n}\n\nexport function makeArcStrokePathStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, arcEndY] = [center.x + endPosition.x, center.y + endPosition.y];\n\n\treturn `M${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY}`;\n}\n\nexport function makeStrokeCircleStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, midArc, arcEndY] = [center.x + endPosition.x, radius * 2 + arcStartY, center.y + startPosition.y];\n\n\treturn `M${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${midArc}\n\t\tM${arcStartX} ${midArc}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY}`;\n}\n\nexport function makeGradient(svgDefElem, color, lighter = false) {\n\tlet gradientId ='path-fill-gradient' + '-' + color + '-' +(lighter ? 'lighter' : 'default');\n\tlet gradientDef = renderVerticalGradient(svgDefElem, gradientId);\n\tlet opacities = [1, 0.6, 0.2];\n\tif(lighter) {\n\t\topacities = [0.4, 0.2, 0];\n\t}\n\n\tsetGradientStop(gradientDef, \"0%\", color, opacities[0]);\n\tsetGradientStop(gradientDef, \"50%\", color, opacities[1]);\n\tsetGradientStop(gradientDef, \"100%\", color, opacities[2]);\n\n\treturn gradientId;\n}\n\nexport function percentageBar(x, y, width, height,\n\tdepth=PERCENTAGE_BAR_DEFAULT_DEPTH, fill='none') {\n\n\tlet args = {\n\t\tclassName: 'percentage-bar',\n\t\tx: x,\n\t\ty: y,\n\t\twidth: width,\n\t\theight: height,\n\t\tfill: fill,\n\t\tstyles: {\n\t\t\t'stroke': lightenDarkenColor(fill, -25),\n\t\t\t// Diabolically good: https://stackoverflow.com/a/9000859\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n\t\t\t'stroke-dasharray': `0, ${height + width}, ${width}, ${height}`,\n\t\t\t'stroke-width': depth\n\t\t},\n\t};\n\n\treturn createSVG(\"rect\", args);\n}\n\nexport function heatSquare(className, x, y, size, radius, fill='none', data={}) {\n\tlet args = {\n\t\tclassName: className,\n\t\tx: x,\n\t\ty: y,\n\t\twidth: size,\n\t\theight: size,\n\t\trx: radius,\n\t\tfill: fill\n\t};\n\n\tObject.keys(data).map(key => {\n\t\targs[key] = data[key];\n\t});\n\n\treturn createSVG(\"rect\", args);\n}\n\nexport function legendBar(x, y, size, fill='none', label, truncate=false) {\n\tlabel = truncate ? truncateString(label, LABEL_MAX_CHARS) : label;\n\n\tlet args = {\n\t\tclassName: 'legend-bar',\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: size,\n\t\theight: '2px',\n\t\tfill: fill\n\t};\n\tlet text = createSVG('text', {\n\t\tclassName: 'legend-dataset-text',\n\t\tx: 0,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE * 2) + 'px',\n\t\t'font-size': (FONT_SIZE * 1.2) + 'px',\n\t\t'text-anchor': 'start',\n\t\tfill: FONT_FILL,\n\t\tinnerHTML: label\n\t});\n\n\tlet group = createSVG('g', {\n\t\ttransform: `translate(${x}, ${y})`\n\t});\n\tgroup.appendChild(createSVG(\"rect\", args));\n\tgroup.appendChild(text);\n\n\treturn group;\n}\n\nexport function legendDot(x, y, size, fill='none', label, truncate=false) {\n\tlabel = truncate ? truncateString(label, LABEL_MAX_CHARS) : label;\n\n\tlet args = {\n\t\tclassName: 'legend-dot',\n\t\tcx: 0,\n\t\tcy: 0,\n\t\tr: size,\n\t\tfill: fill\n\t};\n\tlet text = createSVG('text', {\n\t\tclassName: 'legend-dataset-text',\n\t\tx: 0,\n\t\ty: 0,\n\t\tdx: (FONT_SIZE) + 'px',\n\t\tdy: (FONT_SIZE/3) + 'px',\n\t\t'font-size': (FONT_SIZE * 1.2) + 'px',\n\t\t'text-anchor': 'start',\n\t\tfill: FONT_FILL,\n\t\tinnerHTML: label\n\t});\n\n\tlet group = createSVG('g', {\n\t\ttransform: `translate(${x}, ${y})`\n\t});\n\tgroup.appendChild(createSVG(\"circle\", args));\n\tgroup.appendChild(text);\n\n\treturn group;\n}\n\nexport function makeText(className, x, y, content, options = {}) {\n\tlet fontSize = options.fontSize || FONT_SIZE;\n\tlet dy = options.dy !== undefined ? options.dy : (fontSize / 2);\n\tlet fill = options.fill || FONT_FILL;\n\tlet textAnchor = options.textAnchor || 'start';\n\treturn createSVG('text', {\n\t\tclassName: className,\n\t\tx: x,\n\t\ty: y,\n\t\tdy: dy + 'px',\n\t\t'font-size': fontSize + 'px',\n\t\tfill: fill,\n\t\t'text-anchor': textAnchor,\n\t\tinnerHTML: content\n\t});\n}\n\nfunction makeVertLine(x, label, y1, y2, options={}) {\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tlet l = createSVG('line', {\n\t\tclassName: 'line-vertical ' + options.className,\n\t\tx1: 0,\n\t\tx2: 0,\n\t\ty1: y1,\n\t\ty2: y2,\n\t\tstyles: {\n\t\t\tstroke: options.stroke\n\t\t}\n\t});\n\n\tlet text = createSVG('text', {\n\t\tx: 0,\n\t\ty: y1 > y2 ? y1 + LABEL_MARGIN : y1 - LABEL_MARGIN - FONT_SIZE,\n\t\tdy: FONT_SIZE + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': 'middle',\n\t\tinnerHTML: label + \"\"\n\t});\n\n\tlet line = createSVG('g', {\n\t\ttransform: `translate(${ x }, 0)`\n\t});\n\n\tline.appendChild(l);\n\tline.appendChild(text);\n\n\treturn line;\n}\n\nfunction makeHoriLine(y, label, x1, x2, options={}) {\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tif(!options.lineType) options.lineType = '';\n\tif (options.shortenNumbers) label = shortenLargeNumber(label);\n\n\tlet className = 'line-horizontal ' + options.className +\n\t\t(options.lineType === \"dashed\" ? \"dashed\": \"\");\n\n\tlet l = createSVG('line', {\n\t\tclassName: className,\n\t\tx1: x1,\n\t\tx2: x2,\n\t\ty1: 0,\n\t\ty2: 0,\n\t\tstyles: {\n\t\t\tstroke: options.stroke\n\t\t}\n\t});\n\n\tlet text = createSVG('text', {\n\t\tx: x1 < x2 ? x1 - LABEL_MARGIN : x1 + LABEL_MARGIN,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE / 2 - 2) + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': x1 < x2 ? 'end' : 'start',\n\t\tinnerHTML: label+\"\"\n\t});\n\n\tlet line = createSVG('g', {\n\t\ttransform: `translate(0, ${y})`,\n\t\t'stroke-opacity': 1\n\t});\n\n\tif(text === 0 || text === '0') {\n\t\tline.style.stroke = \"rgba(27, 31, 35, 0.6)\";\n\t}\n\n\tline.appendChild(l);\n\tline.appendChild(text);\n\n\treturn line;\n}\n\nexport function yLine(y, label, width, options={}) {\n\tif (!isValidNumber(y)) y = 0;\n\n\tif(!options.pos) options.pos = 'left';\n\tif(!options.offset) options.offset = 0;\n\tif(!options.mode) options.mode = 'span';\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tif(!options.className) options.className = '';\n\n\tlet x1 = -1 * AXIS_TICK_LENGTH;\n\tlet x2 = options.mode === 'span' ? width + AXIS_TICK_LENGTH : 0;\n\n\tif(options.mode === 'tick' && options.pos === 'right') {\n\t\tx1 = width + AXIS_TICK_LENGTH;\n\t\tx2 = width;\n\t}\n\n\t// let offset = options.pos === 'left' ? -1 * options.offset : options.offset;\n\n\tx1 += options.offset;\n\tx2 += options.offset;\n\n\treturn makeHoriLine(y, label, x1, x2, {\n\t\tstroke: options.stroke,\n\t\tclassName: options.className,\n\t\tlineType: options.lineType,\n\t\tshortenNumbers: options.shortenNumbers\n\t});\n}\n\nexport function xLine(x, label, height, options={}) {\n\tif (!isValidNumber(x)) x = 0;\n\n\tif(!options.pos) options.pos = 'bottom';\n\tif(!options.offset) options.offset = 0;\n\tif(!options.mode) options.mode = 'span';\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tif(!options.className) options.className = '';\n\n\t// Draw X axis line in span/tick mode with optional label\n\t// \ty2(span)\n\t// \t\t\t\t\t\t|\n\t// \t\t\t\t\t\t|\n\t//\t\t\t\tx line\t|\n\t//\t\t\t\t\t\t|\n\t// \t\t\t\t\t \t|\n\t// ---------------------+-- y2(tick)\n\t//\t\t\t\t\t\t|\n\t//\t\t\t\t\t\t\ty1\n\n\tlet y1 = height + AXIS_TICK_LENGTH;\n\tlet y2 = options.mode === 'span' ? -1 * AXIS_TICK_LENGTH : height;\n\n\tif(options.mode === 'tick' && options.pos === 'top') {\n\t\t// top axis ticks\n\t\ty1 = -1 * AXIS_TICK_LENGTH;\n\t\ty2 = 0;\n\t}\n\n\treturn makeVertLine(x, label, y1, y2, {\n\t\tstroke: options.stroke,\n\t\tclassName: options.className,\n\t\tlineType: options.lineType\n\t});\n}\n\nexport function yMarker(y, label, width, options={}) {\n\tif(!options.labelPos) options.labelPos = 'right';\n\tlet x = options.labelPos === 'left' ? LABEL_MARGIN\n\t\t: width - getStringWidth(label, 5) - LABEL_MARGIN;\n\n\tlet labelSvg = createSVG('text', {\n\t\tclassName: 'chart-label',\n\t\tx: x,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE / -2) + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': 'start',\n\t\tinnerHTML: label+\"\"\n\t});\n\n\tlet line = makeHoriLine(y, '', 0, width, {\n\t\tstroke: options.stroke || BASE_LINE_COLOR,\n\t\tclassName: options.className || '',\n\t\tlineType: options.lineType\n\t});\n\n\tline.appendChild(labelSvg);\n\n\treturn line;\n}\n\nexport function yRegion(y1, y2, width, label, options={}) {\n\t// return a group\n\tlet height = y1 - y2;\n\n\tlet rect = createSVG('rect', {\n\t\tclassName: `bar mini`, // remove class\n\t\tstyles: {\n\t\t\tfill: `rgba(228, 234, 239, 0.49)`,\n\t\t\tstroke: BASE_LINE_COLOR,\n\t\t\t'stroke-dasharray': `${width}, ${height}`\n\t\t},\n\t\t// 'data-point-index': index,\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: width,\n\t\theight: height\n\t});\n\n\tif(!options.labelPos) options.labelPos = 'right';\n\tlet x = options.labelPos === 'left' ? LABEL_MARGIN\n\t\t: width - getStringWidth(label+\"\", 4.5) - LABEL_MARGIN;\n\n\tlet labelSvg = createSVG('text', {\n\t\tclassName: 'chart-label',\n\t\tx: x,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE / -2) + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': 'start',\n\t\tinnerHTML: label+\"\"\n\t});\n\n\tlet region = createSVG('g', {\n\t\ttransform: `translate(0, ${y2})`\n\t});\n\n\tregion.appendChild(rect);\n\tregion.appendChild(labelSvg);\n\n\treturn region;\n}\n\nexport function datasetBar(x, yTop, width, color, label='', index=0, offset=0, meta={}) {\n\tlet [height, y] = getBarHeightAndYAttr(yTop, meta.zeroLine);\n\ty -= offset;\n\n\tif(height === 0) {\n\t\theight = meta.minHeight;\n\t\ty -= meta.minHeight;\n\t}\n\n\t// Preprocess numbers to avoid svg building errors\n\tif (!isValidNumber(x)) x = 0;\n\tif (!isValidNumber(y)) y = 0;\n\tif (!isValidNumber(height, true)) height = 0;\n\tif (!isValidNumber(width, true)) width = 0;\n\n\tlet rect = createSVG('rect', {\n\t\tclassName: `bar mini`,\n\t\tstyle: `fill: ${color}`,\n\t\t'data-point-index': index,\n\t\tx: x,\n\t\ty: y,\n\t\twidth: width,\n\t\theight: height\n\t});\n\n\tlabel += \"\";\n\n\tif(!label && !label.length) {\n\t\treturn rect;\n\t} else {\n\t\trect.setAttribute('y', 0);\n\t\trect.setAttribute('x', 0);\n\t\tlet text = createSVG('text', {\n\t\t\tclassName: 'data-point-value',\n\t\t\tx: width/2,\n\t\t\ty: 0,\n\t\t\tdy: (FONT_SIZE / 2 * -1) + 'px',\n\t\t\t'font-size': FONT_SIZE + 'px',\n\t\t\t'text-anchor': 'middle',\n\t\t\tinnerHTML: label\n\t\t});\n\n\t\tlet group = createSVG('g', {\n\t\t\t'data-point-index': index,\n\t\t\ttransform: `translate(${x}, ${y})`\n\t\t});\n\t\tgroup.appendChild(rect);\n\t\tgroup.appendChild(text);\n\n\t\treturn group;\n\t}\n}\n\nexport function datasetDot(x, y, radius, color, label='', index=0) {\n\tlet dot = createSVG('circle', {\n\t\tstyle: `fill: ${color}`,\n\t\t'data-point-index': index,\n\t\tcx: x,\n\t\tcy: y,\n\t\tr: radius\n\t});\n\n\tlabel += \"\";\n\n\tif(!label && !label.length) {\n\t\treturn dot;\n\t} else {\n\t\tdot.setAttribute('cy', 0);\n\t\tdot.setAttribute('cx', 0);\n\n\t\tlet text = createSVG('text', {\n\t\t\tclassName: 'data-point-value',\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\tdy: (FONT_SIZE / 2 * -1 - radius) + 'px',\n\t\t\t'font-size': FONT_SIZE + 'px',\n\t\t\t'text-anchor': 'middle',\n\t\t\tinnerHTML: label\n\t\t});\n\n\t\tlet group = createSVG('g', {\n\t\t\t'data-point-index': index,\n\t\t\ttransform: `translate(${x}, ${y})`\n\t\t});\n\t\tgroup.appendChild(dot);\n\t\tgroup.appendChild(text);\n\n\t\treturn group;\n\t}\n}\n\nexport function getPaths(xList, yList, color, options={}, meta={}) {\n\tlet pointsList = yList.map((y, i) => (xList[i] + ',' + y));\n\tlet pointsStr = pointsList.join(\"L\");\n\n\t// Spline\n\tif (options.spline)\n\t\tpointsStr = getSplineCurvePointsStr(xList, yList);\n\n\tlet path = makePath(\"M\"+pointsStr, 'line-graph-path', color);\n\n\t// HeatLine\n\tif(options.heatline) {\n\t\tlet gradient_id = makeGradient(meta.svgDefs, color);\n\t\tpath.style.stroke = `url(#${gradient_id})`;\n\t}\n\n\tlet paths = {\n\t\tpath: path\n\t};\n\n\t// Region\n\tif(options.regionFill) {\n\t\tlet gradient_id_region = makeGradient(meta.svgDefs, color, true);\n\n\t\tlet pathStr = \"M\" + `${xList[0]},${meta.zeroLine}L` + pointsStr + `L${xList.slice(-1)[0]},${meta.zeroLine}`;\n\t\tpaths.region = makePath(pathStr, `region-fill`, 'none', `url(#${gradient_id_region})`);\n\t}\n\n\treturn paths;\n}\n\nexport let makeOverlay = {\n\t'bar': (unit) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'rect') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet overlay = unit.cloneNode();\n\t\toverlay.style.fill = '#000000';\n\t\toverlay.style.opacity = '0.4';\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t\treturn overlay;\n\t},\n\n\t'dot': (unit) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet overlay = unit.cloneNode();\n\t\tlet radius = unit.getAttribute('r');\n\t\tlet fill = unit.getAttribute('fill');\n\t\toverlay.setAttribute('r', parseInt(radius) + DOT_OVERLAY_SIZE_INCR);\n\t\toverlay.setAttribute('fill', fill);\n\t\toverlay.style.opacity = '0.6';\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t\treturn overlay;\n\t},\n\n\t'heat_square': (unit) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet overlay = unit.cloneNode();\n\t\tlet radius = unit.getAttribute('r');\n\t\tlet fill = unit.getAttribute('fill');\n\t\toverlay.setAttribute('r', parseInt(radius) + DOT_OVERLAY_SIZE_INCR);\n\t\toverlay.setAttribute('fill', fill);\n\t\toverlay.style.opacity = '0.6';\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t\treturn overlay;\n\t}\n};\n\nexport let updateOverlay = {\n\t'bar': (unit, overlay) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'rect') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet attributes = ['x', 'y', 'width', 'height'];\n\t\tObject.values(unit.attributes)\n\t\t\t.filter(attr => attributes.includes(attr.name) && attr.specified)\n\t\t\t.map(attr => {\n\t\t\t\toverlay.setAttribute(attr.name, attr.nodeValue);\n\t\t\t});\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t},\n\n\t'dot': (unit, overlay) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet attributes = ['cx', 'cy'];\n\t\tObject.values(unit.attributes)\n\t\t\t.filter(attr => attributes.includes(attr.name) && attr.specified)\n\t\t\t.map(attr => {\n\t\t\t\toverlay.setAttribute(attr.name, attr.nodeValue);\n\t\t\t});\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t},\n\n\t'heat_square': (unit, overlay) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet attributes = ['cx', 'cy'];\n\t\tObject.values(unit.attributes)\n\t\t\t.filter(attr => attributes.includes(attr.name) && attr.specified)\n\t\t\t.map(attr => {\n\t\t\t\toverlay.setAttribute(attr.name, attr.nodeValue);\n\t\t\t});\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t},\n};\n","import { getBarHeightAndYAttr, getSplineCurvePointsStr } from './draw-utils';\n\nexport const UNIT_ANIM_DUR = 350;\nexport const PATH_ANIM_DUR = 350;\nexport const MARKER_LINE_ANIM_DUR = UNIT_ANIM_DUR;\nexport const REPLACE_ALL_NEW_DUR = 250;\n\nexport const STD_EASING = 'easein';\n\nexport function translate(unit, oldCoord, newCoord, duration) {\n\tlet old = typeof oldCoord === 'string' ? oldCoord : oldCoord.join(', ');\n\treturn [\n\t\tunit,\n\t\t{transform: newCoord.join(', ')},\n\t\tduration,\n\t\tSTD_EASING,\n\t\t\"translate\",\n\t\t{transform: old}\n\t];\n}\n\nexport function translateVertLine(xLine, newX, oldX) {\n\treturn translate(xLine, [oldX, 0], [newX, 0], MARKER_LINE_ANIM_DUR);\n}\n\nexport function translateHoriLine(yLine, newY, oldY) {\n\treturn translate(yLine, [0, oldY], [0, newY], MARKER_LINE_ANIM_DUR);\n}\n\nexport function animateRegion(rectGroup, newY1, newY2, oldY2) {\n\tlet newHeight = newY1 - newY2;\n\tlet rect = rectGroup.childNodes[0];\n\tlet width = rect.getAttribute(\"width\");\n\tlet rectAnim = [\n\t\trect,\n\t\t{ height: newHeight, 'stroke-dasharray': `${width}, ${newHeight}` },\n\t\tMARKER_LINE_ANIM_DUR,\n\t\tSTD_EASING\n\t];\n\n\tlet groupAnim = translate(rectGroup, [0, oldY2], [0, newY2], MARKER_LINE_ANIM_DUR);\n\treturn [rectAnim, groupAnim];\n}\n\nexport function animateBar(bar, x, yTop, width, offset=0, meta={}) {\n\tlet [height, y] = getBarHeightAndYAttr(yTop, meta.zeroLine);\n\ty -= offset;\n\tif(bar.nodeName !== 'rect') {\n\t\tlet rect = bar.childNodes[0];\n\t\tlet rectAnim = [\n\t\t\trect,\n\t\t\t{width: width, height: height},\n\t\t\tUNIT_ANIM_DUR,\n\t\t\tSTD_EASING\n\t\t];\n\n\t\tlet oldCoordStr = bar.getAttribute(\"transform\").split(\"(\")[1].slice(0, -1);\n\t\tlet groupAnim = translate(bar, oldCoordStr, [x, y], MARKER_LINE_ANIM_DUR);\n\t\treturn [rectAnim, groupAnim];\n\t} else {\n\t\treturn [[bar, {width: width, height: height, x: x, y: y}, UNIT_ANIM_DUR, STD_EASING]];\n\t}\n\t// bar.animate({height: args.newHeight, y: yTop}, UNIT_ANIM_DUR, mina.easein);\n}\n\nexport function animateDot(dot, x, y) {\n\tif(dot.nodeName !== 'circle') {\n\t\tlet oldCoordStr = dot.getAttribute(\"transform\").split(\"(\")[1].slice(0, -1);\n\t\tlet groupAnim = translate(dot, oldCoordStr, [x, y], MARKER_LINE_ANIM_DUR);\n\t\treturn [groupAnim];\n\t} else {\n\t\treturn [[dot, {cx: x, cy: y}, UNIT_ANIM_DUR, STD_EASING]];\n\t}\n\t// dot.animate({cy: yTop}, UNIT_ANIM_DUR, mina.easein);\n}\n\nexport function animatePath(paths, newXList, newYList, zeroLine, spline) {\n\tlet pathComponents = [];\n\tlet pointsStr = newYList.map((y, i) => (newXList[i] + ',' + y)).join(\"L\");\n\n\tif (spline)\n\t\tpointsStr = getSplineCurvePointsStr(newXList, newYList);\n\n\tconst animPath = [paths.path, {d:\"M\" + pointsStr}, PATH_ANIM_DUR, STD_EASING];\n\tpathComponents.push(animPath);\n\n\tif(paths.region) {\n\t\tlet regStartPt = `${newXList[0]},${zeroLine}L`;\n\t\tlet regEndPt = `L${newXList.slice(-1)[0]}, ${zeroLine}`;\n\n\t\tconst animRegion = [\n\t\t\tpaths.region,\n\t\t\t{d:\"M\" + regStartPt + pointsStr + regEndPt},\n\t\t\tPATH_ANIM_DUR,\n\t\t\tSTD_EASING\n\t\t];\n\t\tpathComponents.push(animRegion);\n\t}\n\n\treturn pathComponents;\n}\n\nexport function animatePathStr(oldPath, pathStr) {\n\treturn [oldPath, {d: pathStr}, UNIT_ANIM_DUR, STD_EASING];\n}\n","// Leveraging SMIL Animations\n\nimport { REPLACE_ALL_NEW_DUR } from './animate';\n\nconst EASING = {\n\tease: \"0.25 0.1 0.25 1\",\n\tlinear: \"0 0 1 1\",\n\t// easein: \"0.42 0 1 1\",\n\teasein: \"0.1 0.8 0.2 1\",\n\teaseout: \"0 0 0.58 1\",\n\teaseinout: \"0.42 0 0.58 1\"\n};\n\nfunction animateSVGElement(element, props, dur, easingType=\"linear\", type=undefined, oldValues={}) {\n\n\tlet animElement = element.cloneNode(true);\n\tlet newElement = element.cloneNode(true);\n\n\tfor(var attributeName in props) {\n\t\tlet animateElement;\n\t\tif(attributeName === 'transform') {\n\t\t\tanimateElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"animateTransform\");\n\t\t} else {\n\t\t\tanimateElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"animate\");\n\t\t}\n\t\tlet currentValue = oldValues[attributeName] || element.getAttribute(attributeName);\n\t\tlet value = props[attributeName];\n\n\t\tlet animAttr = {\n\t\t\tattributeName: attributeName,\n\t\t\tfrom: currentValue,\n\t\t\tto: value,\n\t\t\tbegin: \"0s\",\n\t\t\tdur: dur/1000 + \"s\",\n\t\t\tvalues: currentValue + \";\" + value,\n\t\t\tkeySplines: EASING[easingType],\n\t\t\tkeyTimes: \"0;1\",\n\t\t\tcalcMode: \"spline\",\n\t\t\tfill: 'freeze'\n\t\t};\n\n\t\tif(type) {\n\t\t\tanimAttr[\"type\"] = type;\n\t\t}\n\n\t\tfor (var i in animAttr) {\n\t\t\tanimateElement.setAttribute(i, animAttr[i]);\n\t\t}\n\n\t\tanimElement.appendChild(animateElement);\n\n\t\tif(type) {\n\t\t\tnewElement.setAttribute(attributeName, `translate(${value})`);\n\t\t} else {\n\t\t\tnewElement.setAttribute(attributeName, value);\n\t\t}\n\t}\n\n\treturn [animElement, newElement];\n}\n\nexport function transform(element, style) { // eslint-disable-line no-unused-vars\n\telement.style.transform = style;\n\telement.style.webkitTransform = style;\n\telement.style.msTransform = style;\n\telement.style.mozTransform = style;\n\telement.style.oTransform = style;\n}\n\nfunction animateSVG(svgContainer, elements) {\n\tlet newElements = [];\n\tlet animElements = [];\n\n\telements.map(element => {\n\t\tlet unit = element[0];\n\t\tlet parent = unit.parentNode;\n\n\t\tlet animElement, newElement;\n\n\t\telement[0] = unit;\n\t\t[animElement, newElement] = animateSVGElement(...element);\n\n\t\tnewElements.push(newElement);\n\t\tanimElements.push([animElement, parent]);\n\t\t\n\t\tif (parent) {\n\t\t\tparent.replaceChild(animElement, unit);\n\t\t}\n\t});\n\n\tlet animSvg = svgContainer.cloneNode(true);\n\n\tanimElements.map((animElement, i) => {\n\t\tif (animElement[1]) {\n\t\t\tanimElement[1].replaceChild(newElements[i], animElement[0]);\n\t\t\telements[i][0] = newElements[i];\n\t\t}\n\t});\n\n\treturn animSvg;\n}\n\nexport function runSMILAnimation(parent, svgElement, elementsToAnimate) {\n\tif(elementsToAnimate.length === 0) return;\n\n\tlet animSvgElement = animateSVG(svgElement, elementsToAnimate);\n\tif(svgElement.parentNode == parent) {\n\t\tparent.removeChild(svgElement);\n\t\tparent.appendChild(animSvgElement);\n\n\t}\n\n\t// Replace the new svgElement (data has already been replaced)\n\tsetTimeout(() => {\n\t\tif(animSvgElement.parentNode == parent) {\n\t\t\tparent.removeChild(animSvgElement);\n\t\t\tparent.appendChild(svgElement);\n\t\t}\n\t}, REPLACE_ALL_NEW_DUR);\n}\n","import { $ } from '../utils/dom';\nimport { CSSTEXT } from '../../css/chartsCss';\n\nexport function downloadFile(filename, data) {\n\tvar a = document.createElement('a');\n\ta.style = \"display: none\";\n\tvar blob = new Blob(data, {type: \"image/svg+xml; charset=utf-8\"});\n\tvar url = window.URL.createObjectURL(blob);\n\ta.href = url;\n\ta.download = filename;\n\tdocument.body.appendChild(a);\n\ta.click();\n\tsetTimeout(function(){\n\t\tdocument.body.removeChild(a);\n\t\twindow.URL.revokeObjectURL(url);\n\t}, 300);\n}\n\nexport function prepareForExport(svg) {\n\tlet clone = svg.cloneNode(true);\n\tclone.classList.add('chart-container');\n\tclone.setAttribute('xmlns', \"http://www.w3.org/2000/svg\");\n\tclone.setAttribute('xmlns:xlink', \"http://www.w3.org/1999/xlink\");\n\tlet styleEl = $.create('style', {\n\t\t'innerHTML': CSSTEXT\n\t});\n\tclone.insertBefore(styleEl, clone.firstChild);\n\n\tlet container = $.create('div');\n\tcontainer.appendChild(clone);\n\n\treturn container.innerHTML;\n}\n","// Playing around with dates\n\nexport const NO_OF_YEAR_MONTHS = 12;\nexport const NO_OF_DAYS_IN_WEEK = 7;\nexport const DAYS_IN_YEAR = 375;\nexport const NO_OF_MILLIS = 1000;\nexport const SEC_IN_DAY = 86400;\n\nexport const MONTH_NAMES = [\"January\", \"February\", \"March\", \"April\", \"May\",\n\t\"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nexport const MONTH_NAMES_SHORT = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n\t\"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\nexport const DAY_NAMES_SHORT = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nexport const DAY_NAMES = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\",\n\t\"Thursday\", \"Friday\", \"Saturday\"];\n\n// https://stackoverflow.com/a/11252167/6495043\nfunction treatAsUtc(date) {\n\tlet result = new Date(date);\n\tresult.setMinutes(result.getMinutes() - result.getTimezoneOffset());\n\treturn result;\n}\n\nexport function getYyyyMmDd(date) {\n\tlet dd = date.getDate();\n\tlet mm = date.getMonth() + 1; // getMonth() is zero-based\n\treturn [\n\t\tdate.getFullYear(),\n\t\t(mm>9 ? '' : '0') + mm,\n\t\t(dd>9 ? '' : '0') + dd\n\t].join('-');\n}\n\nexport function clone(date) {\n\treturn new Date(date.getTime());\n}\n\nexport function timestampSec(date) {\n\treturn date.getTime()/NO_OF_MILLIS;\n}\n\nexport function timestampToMidnight(timestamp, roundAhead = false) {\n\tlet midnightTs = Math.floor(timestamp - (timestamp % SEC_IN_DAY));\n\tif(roundAhead) {\n\t\treturn midnightTs + SEC_IN_DAY;\n\t}\n\treturn midnightTs;\n}\n\n// export function getMonthsBetween(startDate, endDate) {}\n\nexport function getWeeksBetween(startDate, endDate) {\n\tlet weekStartDate = setDayToSunday(startDate);\n\treturn Math.ceil(getDaysBetween(weekStartDate, endDate) / NO_OF_DAYS_IN_WEEK);\n}\n\nexport function getDaysBetween(startDate, endDate) {\n\tlet millisecondsPerDay = SEC_IN_DAY * NO_OF_MILLIS;\n\treturn (treatAsUtc(endDate) - treatAsUtc(startDate)) / millisecondsPerDay;\n}\n\nexport function areInSameMonth(startDate, endDate) {\n\treturn startDate.getMonth() === endDate.getMonth()\n\t\t&& startDate.getFullYear() === endDate.getFullYear();\n}\n\nexport function getMonthName(i, short=false) {\n\tlet monthName = MONTH_NAMES[i];\n\treturn short ? monthName.slice(0, 3) : monthName;\n}\n\nexport function getLastDateInMonth (month, year) {\n\treturn new Date(year, month + 1, 0); // 0: last day in previous month\n}\n\n// mutates\nexport function setDayToSunday(date) {\n\tlet newDate = clone(date);\n\tconst day = newDate.getDay();\n\tif(day !== 0) {\n\t\taddDays(newDate, (-1) * day);\n\t}\n\treturn newDate;\n}\n\n// mutates\nexport function addDays(date, numberOfDays) {\n\tdate.setDate(date.getDate() + numberOfDays);\n}\n","import { makeSVGGroup } from '../utils/draw';\nimport { makeText, makePath, xLine, yLine, yMarker, yRegion, datasetBar, datasetDot, percentageBar, getPaths, heatSquare } from '../utils/draw';\nimport { equilizeNoOfElements } from '../utils/draw-utils';\nimport { translateHoriLine, translateVertLine, animateRegion, animateBar,\n\tanimateDot, animatePath, animatePathStr } from '../utils/animate';\nimport { getMonthName } from '../utils/date-utils';\n\nclass ChartComponent {\n\tconstructor({\n\t\tlayerClass = '',\n\t\tlayerTransform = '',\n\t\tconstants,\n\n\t\tgetData,\n\t\tmakeElements,\n\t\tanimateElements\n\t}) {\n\t\tthis.layerTransform = layerTransform;\n\t\tthis.constants = constants;\n\n\t\tthis.makeElements = makeElements;\n\t\tthis.getData = getData;\n\n\t\tthis.animateElements = animateElements;\n\n\t\tthis.store = [];\n\t\tthis.labels = [];\n\n\t\tthis.layerClass = layerClass;\n\t\tthis.layerClass = typeof(this.layerClass) === 'function'\n\t\t\t? this.layerClass() : this.layerClass;\n\n\t\tthis.refresh();\n\t}\n\n\trefresh(data) {\n\t\tthis.data = data || this.getData();\n\t}\n\n\tsetup(parent) {\n\t\tthis.layer = makeSVGGroup(this.layerClass, this.layerTransform, parent);\n\t}\n\n\tmake() {\n\t\tthis.render(this.data);\n\t\tthis.oldData = this.data;\n\t}\n\n\trender(data) {\n\t\tthis.store = this.makeElements(data);\n\n\t\tthis.layer.textContent = '';\n\t\tthis.store.forEach(element => {\n\t\t\tthis.layer.appendChild(element);\n\t\t});\n\t\tthis.labels.forEach(element => {\n\t\t\tthis.layer.appendChild(element);\n\t\t});\n\t}\n\n\tupdate(animate = true) {\n\t\tthis.refresh();\n\t\tlet animateElements = [];\n\t\tif(animate) {\n\t\t\tanimateElements = this.animateElements(this.data) || [];\n\t\t}\n\t\treturn animateElements;\n\t}\n}\n\nlet componentConfigs = {\n\tdonutSlices: {\n\t\tlayerClass: 'donut-slices',\n\t\tmakeElements(data) {\n\t\t\treturn data.sliceStrings.map((s, i) => {\n\t\t\t\tlet slice = makePath(s, 'donut-path', data.colors[i], 'none', data.strokeWidth);\n\t\t\t\tslice.style.transition = 'transform .3s;';\n\t\t\t\treturn slice;\n\t\t\t});\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\treturn this.store.map((slice, i) => animatePathStr(slice, newData.sliceStrings[i]));\n\t\t},\n\t},\n\tpieSlices: {\n\t\tlayerClass: 'pie-slices',\n\t\tmakeElements(data) {\n\t\t\treturn data.sliceStrings.map((s, i) =>{\n\t\t\t\tlet slice = makePath(s, 'pie-path', 'none', data.colors[i]);\n\t\t\t\tslice.style.transition = 'transform .3s;';\n\t\t\t\treturn slice;\n\t\t\t});\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\treturn this.store.map((slice, i) =>\n\t\t\t\tanimatePathStr(slice, newData.sliceStrings[i])\n\t\t\t);\n\t\t}\n\t},\n\tpercentageBars: {\n\t\tlayerClass: 'percentage-bars',\n\t\tmakeElements(data) {\n\t\t\treturn data.xPositions.map((x, i) =>{\n\t\t\t\tlet y = 0;\n\t\t\t\tlet bar = percentageBar(x, y, data.widths[i],\n\t\t\t\t\tthis.constants.barHeight, this.constants.barDepth, data.colors[i]);\n\t\t\t\treturn bar;\n\t\t\t});\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tif(newData) return [];\n\t\t}\n\t},\n\tyAxis: {\n\t\tlayerClass: 'y axis',\n\t\tmakeElements(data) {\n\t\t\treturn data.positions.map((position, i) =>\n\t\t\t\tyLine(position, data.labels[i], this.constants.width,\n\t\t\t\t\t{mode: this.constants.mode, pos: this.constants.pos, shortenNumbers: this.constants.shortenNumbers})\n\t\t\t);\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tlet newPos = newData.positions;\n\t\t\tlet newLabels = newData.labels;\n\t\t\tlet oldPos = this.oldData.positions;\n\t\t\tlet oldLabels = this.oldData.labels;\n\n\t\t\t[oldPos, newPos] = equilizeNoOfElements(oldPos, newPos);\n\t\t\t[oldLabels, newLabels] = equilizeNoOfElements(oldLabels, newLabels);\n\n\t\t\tthis.render({\n\t\t\t\tpositions: oldPos,\n\t\t\t\tlabels: newLabels\n\t\t\t});\n\n\t\t\treturn this.store.map((line, i) => {\n\t\t\t\treturn translateHoriLine(\n\t\t\t\t\tline, newPos[i], oldPos[i]\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t},\n\n\txAxis: {\n\t\tlayerClass: 'x axis',\n\t\tmakeElements(data) {\n\t\t\treturn data.positions.map((position, i) =>\n\t\t\t\txLine(position, data.calcLabels[i], this.constants.height,\n\t\t\t\t\t{mode: this.constants.mode, pos: this.constants.pos})\n\t\t\t);\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tlet newPos = newData.positions;\n\t\t\tlet newLabels = newData.calcLabels;\n\t\t\tlet oldPos = this.oldData.positions;\n\t\t\tlet oldLabels = this.oldData.calcLabels;\n\n\t\t\t[oldPos, newPos] = equilizeNoOfElements(oldPos, newPos);\n\t\t\t[oldLabels, newLabels] = equilizeNoOfElements(oldLabels, newLabels);\n\n\t\t\tthis.render({\n\t\t\t\tpositions: oldPos,\n\t\t\t\tcalcLabels: newLabels\n\t\t\t});\n\n\t\t\treturn this.store.map((line, i) => {\n\t\t\t\treturn translateVertLine(\n\t\t\t\t\tline, newPos[i], oldPos[i]\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t},\n\n\tyMarkers: {\n\t\tlayerClass: 'y-markers',\n\t\tmakeElements(data) {\n\t\t\treturn data.map(m =>\n\t\t\t\tyMarker(m.position, m.label, this.constants.width,\n\t\t\t\t\t{labelPos: m.options.labelPos, mode: 'span', lineType: 'dashed'})\n\t\t\t);\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\t[this.oldData, newData] = equilizeNoOfElements(this.oldData, newData);\n\n\t\t\tlet newPos = newData.map(d => d.position);\n\t\t\tlet newLabels = newData.map(d => d.label);\n\t\t\tlet newOptions = newData.map(d => d.options);\n\n\t\t\tlet oldPos = this.oldData.map(d => d.position);\n\n\t\t\tthis.render(oldPos.map((pos, i) => {\n\t\t\t\treturn {\n\t\t\t\t\tposition: oldPos[i],\n\t\t\t\t\tlabel: newLabels[i],\n\t\t\t\t\toptions: newOptions[i]\n\t\t\t\t};\n\t\t\t}));\n\n\t\t\treturn this.store.map((line, i) => {\n\t\t\t\treturn translateHoriLine(\n\t\t\t\t\tline, newPos[i], oldPos[i]\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t},\n\n\tyRegions: {\n\t\tlayerClass: 'y-regions',\n\t\tmakeElements(data) {\n\t\t\treturn data.map(r =>\n\t\t\t\tyRegion(r.startPos, r.endPos, this.constants.width,\n\t\t\t\t\tr.label, {labelPos: r.options.labelPos})\n\t\t\t);\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\t[this.oldData, newData] = equilizeNoOfElements(this.oldData, newData);\n\n\t\t\tlet newPos = newData.map(d => d.endPos);\n\t\t\tlet newLabels = newData.map(d => d.label);\n\t\t\tlet newStarts = newData.map(d => d.startPos);\n\t\t\tlet newOptions = newData.map(d => d.options);\n\n\t\t\tlet oldPos = this.oldData.map(d => d.endPos);\n\t\t\tlet oldStarts = this.oldData.map(d => d.startPos);\n\n\t\t\tthis.render(oldPos.map((pos, i) => {\n\t\t\t\treturn {\n\t\t\t\t\tstartPos: oldStarts[i],\n\t\t\t\t\tendPos: oldPos[i],\n\t\t\t\t\tlabel: newLabels[i],\n\t\t\t\t\toptions: newOptions[i]\n\t\t\t\t};\n\t\t\t}));\n\n\t\t\tlet animateElements = [];\n\n\t\t\tthis.store.map((rectGroup, i) => {\n\t\t\t\tanimateElements = animateElements.concat(animateRegion(\n\t\t\t\t\trectGroup, newStarts[i], newPos[i], oldPos[i]\n\t\t\t\t));\n\t\t\t});\n\n\t\t\treturn animateElements;\n\t\t}\n\t},\n\n\theatDomain: {\n\t\tlayerClass: function() { return 'heat-domain domain-' + this.constants.index; },\n\t\tmakeElements(data) {\n\t\t\tlet {index, colWidth, rowHeight, squareSize, radius, xTranslate} = this.constants;\n\t\t\tlet monthNameHeight = -12;\n\t\t\tlet x = xTranslate, y = 0;\n\n\t\t\tthis.serializedSubDomains = [];\n\n\t\t\tdata.cols.map((week, weekNo) => {\n\t\t\t\tif(weekNo === 1) {\n\t\t\t\t\tthis.labels.push(\n\t\t\t\t\t\tmakeText('domain-name', x, monthNameHeight, getMonthName(index, true).toUpperCase(),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfontSize: 9\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tweek.map((day, i) => {\n\t\t\t\t\tif(day.fill) {\n\t\t\t\t\t\tlet data = {\n\t\t\t\t\t\t\t'data-date': day.yyyyMmDd,\n\t\t\t\t\t\t\t'data-value': day.dataValue,\n\t\t\t\t\t\t\t'data-day': i\n\t\t\t\t\t\t};\n\t\t\t\t\t\tlet square = heatSquare('day', x, y, squareSize, radius, day.fill, data);\n\t\t\t\t\t\tthis.serializedSubDomains.push(square);\n\t\t\t\t\t}\n\t\t\t\t\ty += rowHeight;\n\t\t\t\t});\n\t\t\t\ty = 0;\n\t\t\t\tx += colWidth;\n\t\t\t});\n\n\t\t\treturn this.serializedSubDomains;\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tif(newData) return [];\n\t\t}\n\t},\n\n\tbarGraph: {\n\t\tlayerClass: function() { return 'dataset-units dataset-bars dataset-' + this.constants.index; },\n\t\tmakeElements(data) {\n\t\t\tlet c = this.constants;\n\t\t\tthis.unitType = 'bar';\n\t\t\tthis.units = data.yPositions.map((y, j) => {\n\t\t\t\treturn datasetBar(\n\t\t\t\t\tdata.xPositions[j],\n\t\t\t\t\ty,\n\t\t\t\t\tdata.barWidth,\n\t\t\t\t\tc.color,\n\t\t\t\t\tdata.labels[j],\n\t\t\t\t\tj,\n\t\t\t\t\tdata.offsets[j],\n\t\t\t\t\t{\n\t\t\t\t\t\tzeroLine: data.zeroLine,\n\t\t\t\t\t\tbarsWidth: data.barsWidth,\n\t\t\t\t\t\tminHeight: c.minHeight\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t\treturn this.units;\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\tlet newXPos = newData.xPositions;\n\t\t\tlet newYPos = newData.yPositions;\n\t\t\tlet newOffsets = newData.offsets;\n\t\t\tlet newLabels = newData.labels;\n\n\t\t\tlet oldXPos = this.oldData.xPositions;\n\t\t\tlet oldYPos = this.oldData.yPositions;\n\t\t\tlet oldOffsets = this.oldData.offsets;\n\t\t\tlet oldLabels = this.oldData.labels;\n\n\t\t\t[oldXPos, newXPos] = equilizeNoOfElements(oldXPos, newXPos);\n\t\t\t[oldYPos, newYPos] = equilizeNoOfElements(oldYPos, newYPos);\n\t\t\t[oldOffsets, newOffsets] = equilizeNoOfElements(oldOffsets, newOffsets);\n\t\t\t[oldLabels, newLabels] = equilizeNoOfElements(oldLabels, newLabels);\n\n\t\t\tthis.render({\n\t\t\t\txPositions: oldXPos,\n\t\t\t\tyPositions: oldYPos,\n\t\t\t\toffsets: oldOffsets,\n\t\t\t\tlabels: newLabels,\n\n\t\t\t\tzeroLine: this.oldData.zeroLine,\n\t\t\t\tbarsWidth: this.oldData.barsWidth,\n\t\t\t\tbarWidth: this.oldData.barWidth,\n\t\t\t});\n\n\t\t\tlet animateElements = [];\n\n\t\t\tthis.store.map((bar, i) => {\n\t\t\t\tanimateElements = animateElements.concat(animateBar(\n\t\t\t\t\tbar, newXPos[i], newYPos[i], newData.barWidth, newOffsets[i],\n\t\t\t\t\t{zeroLine: newData.zeroLine}\n\t\t\t\t));\n\t\t\t});\n\n\t\t\treturn animateElements;\n\t\t}\n\t},\n\n\tlineGraph: {\n\t\tlayerClass: function() { return 'dataset-units dataset-line dataset-' + this.constants.index; },\n\t\tmakeElements(data) {\n\t\t\tlet c = this.constants;\n\t\t\tthis.unitType = 'dot';\n\t\t\tthis.paths = {};\n\t\t\tif(!c.hideLine) {\n\t\t\t\tthis.paths = getPaths(\n\t\t\t\t\tdata.xPositions,\n\t\t\t\t\tdata.yPositions,\n\t\t\t\t\tc.color,\n\t\t\t\t\t{\n\t\t\t\t\t\theatline: c.heatline,\n\t\t\t\t\t\tregionFill: c.regionFill,\n\t\t\t\t\t\tspline: c.spline\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tsvgDefs: c.svgDefs,\n\t\t\t\t\t\tzeroLine: data.zeroLine\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.units = [];\n\t\t\tif(!c.hideDots) {\n\t\t\t\tthis.units = data.yPositions.map((y, j) => {\n\t\t\t\t\treturn datasetDot(\n\t\t\t\t\t\tdata.xPositions[j],\n\t\t\t\t\t\ty,\n\t\t\t\t\t\tdata.radius,\n\t\t\t\t\t\tc.color,\n\t\t\t\t\t\t(c.valuesOverPoints ? data.values[j] : ''),\n\t\t\t\t\t\tj\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn Object.values(this.paths).concat(this.units);\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\tlet newXPos = newData.xPositions;\n\t\t\tlet newYPos = newData.yPositions;\n\t\t\tlet newValues = newData.values;\n\n\t\t\tlet oldXPos = this.oldData.xPositions;\n\t\t\tlet oldYPos = this.oldData.yPositions;\n\t\t\tlet oldValues = this.oldData.values;\n\n\t\t\t[oldXPos, newXPos] = equilizeNoOfElements(oldXPos, newXPos);\n\t\t\t[oldYPos, newYPos] = equilizeNoOfElements(oldYPos, newYPos);\n\t\t\t[oldValues, newValues] = equilizeNoOfElements(oldValues, newValues);\n\n\t\t\tthis.render({\n\t\t\t\txPositions: oldXPos,\n\t\t\t\tyPositions: oldYPos,\n\t\t\t\tvalues: newValues,\n\n\t\t\t\tzeroLine: this.oldData.zeroLine,\n\t\t\t\tradius: this.oldData.radius,\n\t\t\t});\n\n\t\t\tlet animateElements = [];\n\n\t\t\tif(Object.keys(this.paths).length) {\n\t\t\t\tanimateElements = animateElements.concat(animatePath(\n\t\t\t\t\tthis.paths, newXPos, newYPos, newData.zeroLine, this.constants.spline));\n\t\t\t}\n\n\t\t\tif(this.units.length) {\n\t\t\t\tthis.units.map((dot, i) => {\n\t\t\t\t\tanimateElements = animateElements.concat(animateDot(\n\t\t\t\t\t\tdot, newXPos[i], newYPos[i]));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn animateElements;\n\t\t}\n\t}\n};\n\nexport function getComponent(name, constants, getData) {\n\tlet keys = Object.keys(componentConfigs).filter(k => name.includes(k));\n\tlet config = componentConfigs[keys[0]];\n\tObject.assign(config, {\n\t\tconstants: constants,\n\t\tgetData: getData\n\t});\n\treturn new ChartComponent(config);\n}\n","import { floatTwo } from './helpers';\n\nfunction normalize(x) {\n\t// Calculates mantissa and exponent of a number\n\t// Returns normalized number and exponent\n\t// https://stackoverflow.com/q/9383593/6495043\n\n\tif(x===0) {\n\t\treturn [0, 0];\n\t}\n\tif(isNaN(x)) {\n\t\treturn {mantissa: -6755399441055744, exponent: 972};\n\t}\n\tvar sig = x > 0 ? 1 : -1;\n\tif(!isFinite(x)) {\n\t\treturn {mantissa: sig * 4503599627370496, exponent: 972};\n\t}\n\n\tx = Math.abs(x);\n\tvar exp = Math.floor(Math.log10(x));\n\tvar man = x/Math.pow(10, exp);\n\n\treturn [sig * man, exp];\n}\n\nfunction getChartRangeIntervals(max, min=0) {\n\tlet upperBound = Math.ceil(max);\n\tlet lowerBound = Math.floor(min);\n\tlet range = upperBound - lowerBound;\n\n\tlet noOfParts = range;\n\tlet partSize = 1;\n\n\t// To avoid too many partitions\n\tif(range > 5) {\n\t\tif(range % 2 !== 0) {\n\t\t\tupperBound++;\n\t\t\t// Recalc range\n\t\t\trange = upperBound - lowerBound;\n\t\t}\n\t\tnoOfParts = range/2;\n\t\tpartSize = 2;\n\t}\n\n\t// Special case: 1 and 2\n\tif(range <= 2) {\n\t\tnoOfParts = 4;\n\t\tpartSize = range/noOfParts;\n\t}\n\n\t// Special case: 0\n\tif(range === 0) {\n\t\tnoOfParts = 5;\n\t\tpartSize = 1;\n\t}\n\n\tlet intervals = [];\n\tfor(var i = 0; i <= noOfParts; i++){\n\t\tintervals.push(lowerBound + partSize * i);\n\t}\n\treturn intervals;\n}\n\nfunction getChartIntervals(maxValue, minValue=0) {\n\tlet [normalMaxValue, exponent] = normalize(maxValue);\n\tlet normalMinValue = minValue ? minValue/Math.pow(10, exponent): 0;\n\n\t// Allow only 7 significant digits\n\tnormalMaxValue = normalMaxValue.toFixed(6);\n\n\tlet intervals = getChartRangeIntervals(normalMaxValue, normalMinValue);\n\tintervals = intervals.map(value => value * Math.pow(10, exponent));\n\treturn intervals;\n}\n\nexport function calcChartIntervals(values, withMinimum=false) {\n\t//*** Where the magic happens ***\n\n\t// Calculates best-fit y intervals from given values\n\t// and returns the interval array\n\n\tlet maxValue = Math.max(...values);\n\tlet minValue = Math.min(...values);\n\n\t// Exponent to be used for pretty print\n\tlet exponent = 0, intervals = []; // eslint-disable-line no-unused-vars\n\n\tfunction getPositiveFirstIntervals(maxValue, absMinValue) {\n\t\tlet intervals = getChartIntervals(maxValue);\n\n\t\tlet intervalSize = intervals[1] - intervals[0];\n\n\t\t// Then unshift the negative values\n\t\tlet value = 0;\n\t\tfor(var i = 1; value < absMinValue; i++) {\n\t\t\tvalue += intervalSize;\n\t\t\tintervals.unshift((-1) * value);\n\t\t}\n\t\treturn intervals;\n\t}\n\n\t// CASE I: Both non-negative\n\n\tif(maxValue >= 0 && minValue >= 0) {\n\t\texponent = normalize(maxValue)[1];\n\t\tif(!withMinimum) {\n\t\t\tintervals = getChartIntervals(maxValue);\n\t\t} else {\n\t\t\tintervals = getChartIntervals(maxValue, minValue);\n\t\t}\n\t}\n\n\t// CASE II: Only minValue negative\n\n\telse if(maxValue > 0 && minValue < 0) {\n\t\t// `withMinimum` irrelevant in this case,\n\t\t// We'll be handling both sides of zero separately\n\t\t// (both starting from zero)\n\t\t// Because ceil() and floor() behave differently\n\t\t// in those two regions\n\n\t\tlet absMinValue = Math.abs(minValue);\n\n\t\tif(maxValue >= absMinValue) {\n\t\t\texponent = normalize(maxValue)[1];\n\t\t\tintervals = getPositiveFirstIntervals(maxValue, absMinValue);\n\t\t} else {\n\t\t\t// Mirror: maxValue => absMinValue, then change sign\n\t\t\texponent = normalize(absMinValue)[1];\n\t\t\tlet posIntervals = getPositiveFirstIntervals(absMinValue, maxValue);\n\t\t\tintervals = posIntervals.reverse().map(d => d * (-1));\n\t\t}\n\n\t}\n\n\t// CASE III: Both non-positive\n\n\telse if(maxValue <= 0 && minValue <= 0) {\n\t\t// Mirrored Case I:\n\t\t// Work with positives, then reverse the sign and array\n\n\t\tlet pseudoMaxValue = Math.abs(minValue);\n\t\tlet pseudoMinValue = Math.abs(maxValue);\n\n\t\texponent = normalize(pseudoMaxValue)[1];\n\t\tif(!withMinimum) {\n\t\t\tintervals = getChartIntervals(pseudoMaxValue);\n\t\t} else {\n\t\t\tintervals = getChartIntervals(pseudoMaxValue, pseudoMinValue);\n\t\t}\n\n\t\tintervals = intervals.reverse().map(d => d * (-1));\n\t}\n\n\treturn intervals;\n}\n\nexport function getZeroIndex(yPts) {\n\tlet zeroIndex;\n\tlet interval = getIntervalSize(yPts);\n\tif(yPts.indexOf(0) >= 0) {\n\t\t// the range has a given zero\n\t\t// zero-line on the chart\n\t\tzeroIndex = yPts.indexOf(0);\n\t} else if(yPts[0] > 0) {\n\t\t// Minimum value is positive\n\t\t// zero-line is off the chart: below\n\t\tlet min = yPts[0];\n\t\tzeroIndex = (-1) * min / interval;\n\t} else {\n\t\t// Maximum value is negative\n\t\t// zero-line is off the chart: above\n\t\tlet max = yPts[yPts.length - 1];\n\t\tzeroIndex = (-1) * max / interval + (yPts.length - 1);\n\t}\n\treturn zeroIndex;\n}\n\nexport function getRealIntervals(max, noOfIntervals, min = 0, asc = 1) {\n\tlet range = max - min;\n\tlet part = range * 1.0 / noOfIntervals;\n\tlet intervals = [];\n\n\tfor(var i = 0; i <= noOfIntervals; i++) {\n\t\tintervals.push(min + part * i);\n\t}\n\n\treturn asc ? intervals : intervals.reverse();\n}\n\nexport function getIntervalSize(orderedArray) {\n\treturn orderedArray[1] - orderedArray[0];\n}\n\nexport function getValueRange(orderedArray) {\n\treturn orderedArray[orderedArray.length-1] - orderedArray[0];\n}\n\nexport function scale(val, yAxis) {\n\treturn floatTwo(yAxis.zeroLine - val * yAxis.scaleMultiplier);\n}\n\nexport function isInRange(val, min, max) {\n\treturn val > min && val < max;\n}\n\nexport function isInRange2D(coord, minCoord, maxCoord) {\n\treturn isInRange(coord[0], minCoord[0], maxCoord[0])\n\t\t&& isInRange(coord[1], minCoord[1], maxCoord[1]);\n}\n\nexport function getClosestInArray(goal, arr, index = false) {\n\tlet closest = arr.reduce(function(prev, curr) {\n\t\treturn (Math.abs(curr - goal) < Math.abs(prev - goal) ? curr : prev);\n\t}, []);\n\n\treturn index ? arr.indexOf(closest) : closest;\n}\n\nexport function calcDistribution(values, distributionSize) {\n\t// Assume non-negative values,\n\t// implying distribution minimum at zero\n\n\tlet dataMaxValue = Math.max(...values);\n\n\tlet distributionStep = 1 / (distributionSize - 1);\n\tlet distribution = [];\n\n\tfor(var i = 0; i < distributionSize; i++) {\n\t\tlet checkpoint = dataMaxValue * (distributionStep * i);\n\t\tdistribution.push(checkpoint);\n\t}\n\n\treturn distribution;\n}\n\nexport function getMaxCheckpoint(value, distribution) {\n\treturn distribution.filter(d => d < value).length;\n}\n","import { fillArray } from '../utils/helpers';\nimport { DEFAULT_AXIS_CHART_TYPE, AXIS_DATASET_CHART_TYPES, DEFAULT_CHAR_WIDTH } from '../utils/constants';\n\nexport function dataPrep(data, type) {\n\tdata.labels = data.labels || [];\n\n\tlet datasetLength = data.labels.length;\n\n\t// Datasets\n\tlet datasets = data.datasets;\n\tlet zeroArray = new Array(datasetLength).fill(0);\n\tif(!datasets) {\n\t\t// default\n\t\tdatasets = [{\n\t\t\tvalues: zeroArray\n\t\t}];\n\t}\n\n\tdatasets.map(d=> {\n\t\t// Set values\n\t\tif(!d.values) {\n\t\t\td.values = zeroArray;\n\t\t} else {\n\t\t\t// Check for non values\n\t\t\tlet vals = d.values;\n\t\t\tvals = vals.map(val => (!isNaN(val) ? val : 0));\n\n\t\t\t// Trim or extend\n\t\t\tif(vals.length > datasetLength) {\n\t\t\t\tvals = vals.slice(0, datasetLength);\n\t\t\t} else {\n\t\t\t\tvals = fillArray(vals, datasetLength - vals.length, 0);\n\t\t\t}\n\t\t\td.values = vals;\n\t\t}\n\n\t\t// Set type\n\t\tif(!d.chartType ) {\n\t\t\tif(!AXIS_DATASET_CHART_TYPES.includes(type)) type === DEFAULT_AXIS_CHART_TYPE;\n\t\t\td.chartType = type;\n\t\t}\n\n\t});\n\n\t// Markers\n\n\t// Regions\n\t// data.yRegions = data.yRegions || [];\n\tif(data.yRegions) {\n\t\tdata.yRegions.map(d => {\n\t\t\tif(d.end < d.start) {\n\t\t\t\t[d.start, d.end] = [d.end, d.start];\n\t\t\t}\n\t\t});\n\t}\n\n\treturn data;\n}\n\nexport function zeroDataPrep(realData) {\n\tlet datasetLength = realData.labels.length;\n\tlet zeroArray = new Array(datasetLength).fill(0);\n\n\tlet zeroData = {\n\t\tlabels: realData.labels.slice(0, -1),\n\t\tdatasets: realData.datasets.map(d => {\n\t\t\treturn {\n\t\t\t\tname: '',\n\t\t\t\tvalues: zeroArray.slice(0, -1),\n\t\t\t\tchartType: d.chartType\n\t\t\t};\n\t\t}),\n\t};\n\n\tif(realData.yMarkers) {\n\t\tzeroData.yMarkers = [\n\t\t\t{\n\t\t\t\tvalue: 0,\n\t\t\t\tlabel: ''\n\t\t\t}\n\t\t];\n\t}\n\n\tif(realData.yRegions) {\n\t\tzeroData.yRegions = [\n\t\t\t{\n\t\t\t\tstart: 0,\n\t\t\t\tend: 0,\n\t\t\t\tlabel: ''\n\t\t\t}\n\t\t];\n\t}\n\n\treturn zeroData;\n}\n\nexport function getShortenedLabels(chartWidth, labels=[], isSeries=true) {\n\tlet allowedSpace = chartWidth / labels.length;\n\tif(allowedSpace <= 0) allowedSpace = 1;\n\tlet allowedLetters = allowedSpace / DEFAULT_CHAR_WIDTH;\n\n\tlet seriesMultiple;\n\tif(isSeries) {\n\t\t// Find the maximum label length for spacing calculations\n\t\tlet maxLabelLength = Math.max(...labels.map(label => label.length));\n\t\tseriesMultiple = Math.ceil(maxLabelLength/allowedLetters);\n\t}\n\n\tlet calcLabels = labels.map((label, i) => {\n\t\tlabel += \"\";\n\t\tif(label.length > allowedLetters) {\n\n\t\t\tif(!isSeries) {\n\t\t\t\tif(allowedLetters-3 > 0) {\n\t\t\t\t\tlabel = label.slice(0, allowedLetters-3) + \" ...\";\n\t\t\t\t} else {\n\t\t\t\t\tlabel = label.slice(0, allowedLetters) + '..';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(i % seriesMultiple !== 0) {\n\t\t\t\t\tlabel = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn label;\n\t});\n\n\treturn calcLabels;\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { $ } from '../utils/dom';\nimport { TOOLTIP_POINTER_TRIANGLE_HEIGHT } from '../utils/constants';\n\nexport default class SvgTip {\n\tconstructor({\n\t\tparent = null,\n\t\tcolors = []\n\t}) {\n\t\tthis.parent = parent;\n\t\tthis.colors = colors;\n\t\tthis.titleName = '';\n\t\tthis.titleValue = '';\n\t\tthis.listValues = [];\n\t\tthis.titleValueFirst = 0;\n\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\n\t\tthis.top = 0;\n\t\tthis.left = 0;\n\n\t\tthis.setup();\n\t}\n\n\tsetup() {\n\t\tthis.makeTooltip();\n\t}\n\n\trefresh() {\n\t\tthis.fill();\n\t\tthis.calcPosition();\n\t}\n\n\tmakeTooltip() {\n\t\tthis.container = $.create('div', {\n\t\t\tinside: this.parent,\n\t\t\tclassName: 'graph-svg-tip comparison',\n\t\t\tinnerHTML: `\n\t\t\t\t
        \n\t\t\t\t
        `\n\t\t});\n\t\tthis.hideTip();\n\n\t\tthis.title = this.container.querySelector('.title');\n\t\tthis.dataPointList = this.container.querySelector('.data-point-list');\n\n\t\tthis.parent.addEventListener('mouseleave', () => {\n\t\t\tthis.hideTip();\n\t\t});\n\t}\n\n\tfill() {\n\t\tlet title;\n\t\tif(this.index) {\n\t\t\tthis.container.setAttribute('data-point-index', this.index);\n\t\t}\n\t\tif(this.titleValueFirst) {\n\t\t\ttitle = `${this.titleValue}${this.titleName}`;\n\t\t} else {\n\t\t\ttitle = `${this.titleName}${this.titleValue}`;\n\t\t}\n\t\tthis.title.innerHTML = title;\n\t\tthis.dataPointList.innerHTML = '';\n\n\t\tthis.listValues.map((set, i) => {\n\t\t\tconst color = this.colors[i] || 'black';\n\t\t\tlet value = set.formatted === 0 || set.formatted ? set.formatted : set.value;\n\n\t\t\tlet li = $.create('li', {\n\t\t\t\tstyles: {\n\t\t\t\t\t'border-top': `3px solid ${color}`\n\t\t\t\t},\n\t\t\t\tinnerHTML: `${ value === 0 || value ? value : '' }\n\t\t\t\t\t${set.title ? set.title : '' }`\n\t\t\t});\n\n\t\t\tthis.dataPointList.appendChild(li);\n\t\t});\n\t}\n\n\tcalcPosition() {\n\t\tlet width = this.container.offsetWidth;\n\n\t\tthis.top = this.y - this.container.offsetHeight\n\t\t\t- TOOLTIP_POINTER_TRIANGLE_HEIGHT;\n\t\tthis.left = this.x - width/2;\n\t\tlet maxLeft = this.parent.offsetWidth - width;\n\n\t\tlet pointer = this.container.querySelector('.svg-pointer');\n\n\t\tif(this.left < 0) {\n\t\t\tpointer.style.left = `calc(50% - ${-1 * this.left}px)`;\n\t\t\tthis.left = 0;\n\t\t} else if(this.left > maxLeft) {\n\t\t\tlet delta = this.left - maxLeft;\n\t\t\tlet pointerOffset = `calc(50% + ${delta}px)`;\n\t\t\tpointer.style.left = pointerOffset;\n\n\t\t\tthis.left = maxLeft;\n\t\t} else {\n\t\t\tpointer.style.left = `50%`;\n\t\t}\n\t}\n\n\tsetValues(x, y, title = {}, listValues = [], index = -1) {\n\t\tthis.titleName = title.name;\n\t\tthis.titleValue = title.value;\n\t\tthis.listValues = listValues;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.titleValueFirst = title.valueFirst || 0;\n\t\tthis.index = index;\n\t\tthis.refresh();\n\t}\n\n\thideTip() {\n\t\tthis.container.style.top = '0px';\n\t\tthis.container.style.left = '0px';\n\t\tthis.container.style.opacity = '0';\n\t}\n\n\tshowTip() {\n\t\tthis.container.style.top = this.top + 'px';\n\t\tthis.container.style.left = this.left + 'px';\n\t\tthis.container.style.opacity = '1';\n\t}\n}\n","export const CSSTEXT = \".chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Cantarell','Fira Sans','Droid Sans','Helvetica Neue',sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ul{padding-left:0;display:flex}.graph-svg-tip ol{padding-left:0;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:' ';border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}\";","import SvgTip from '../objects/SvgTip';\nimport { $, isElementInViewport, getElementContentWidth, isHidden } from '../utils/dom';\nimport { makeSVGContainer, makeSVGDefs, makeSVGGroup, makeText } from '../utils/draw';\nimport { BASE_MEASURES, getExtraHeight, getExtraWidth, getTopOffset, getLeftOffset,\n\tINIT_CHART_UPDATE_TIMEOUT, CHART_POST_ANIMATE_TIMEOUT, DEFAULT_COLORS} from '../utils/constants';\nimport { getColor, isValidColor } from '../utils/colors';\nimport { runSMILAnimation } from '../utils/animation';\nimport { downloadFile, prepareForExport } from '../utils/export';\nimport { deepClone } from '../utils/helpers';\n\nexport default class BaseChart {\n\tconstructor(parent, options) {\n\t\t// deepclone options to avoid making changes to orignal object\n\t\toptions = deepClone(options);\n\n\t\tthis.parent = typeof parent === 'string'\n\t\t\t? document.querySelector(parent)\n\t\t\t: parent;\n\n\t\tif (!(this.parent instanceof HTMLElement)) {\n\t\t\tthrow new Error('No `parent` element to render on was provided.');\n\t\t}\n\n\t\tthis.rawChartArgs = options;\n\n\t\tthis.title = options.title || '';\n\t\tthis.type = options.type || '';\n\n\t\tthis.realData = this.prepareData(options.data);\n\t\tthis.data = this.prepareFirstData(this.realData);\n\n\t\tthis.colors = this.validateColors(options.colors, this.type);\n\n\t\tthis.config = {\n\t\t\tshowTooltip: 1, // calculate\n\t\t\tshowLegend: 1, // calculate\n\t\t\tisNavigable: options.isNavigable || 0,\n\t\t\tanimate: (typeof options.animate !== 'undefined') ? options.animate : 1,\n\t\t\ttruncateLegends: options.truncateLegends || 1\n\t\t};\n\n\t\tthis.measures = JSON.parse(JSON.stringify(BASE_MEASURES));\n\t\tlet m = this.measures;\n\t\tthis.setMeasures(options);\n\t\tif(!this.title.length) { m.titleHeight = 0; }\n\t\tif(!this.config.showLegend) m.legendHeight = 0;\n\t\tthis.argHeight = options.height || m.baseHeight;\n\n\t\tthis.state = {};\n\t\tthis.options = {};\n\n\t\tthis.initTimeout = INIT_CHART_UPDATE_TIMEOUT;\n\n\t\tif(this.config.isNavigable) {\n\t\t\tthis.overlays = [];\n\t\t}\n\n\t\tthis.configure(options);\n\t}\n\n\tprepareData(data) {\n\t\treturn data;\n\t}\n\n\tprepareFirstData(data) {\n\t\treturn data;\n\t}\n\n\tvalidateColors(colors, type) {\n\t\tconst validColors = [];\n\t\tcolors = (colors || []).concat(DEFAULT_COLORS[type]);\n\t\tcolors.forEach((string) => {\n\t\t\tconst color = getColor(string);\n\t\t\tif(!isValidColor(color)) {\n\t\t\t\tconsole.warn('\"' + string + '\" is not a valid color.');\n\t\t\t} else {\n\t\t\t\tvalidColors.push(color);\n\t\t\t}\n\t\t});\n\t\treturn validColors;\n\t}\n\n\tsetMeasures() {\n\t\t// Override measures, including those for title and legend\n\t\t// set config for legend and title\n\t}\n\n\tconfigure() {\n\t\tlet height = this.argHeight;\n\t\tthis.baseHeight = height;\n\t\tthis.height = height - getExtraHeight(this.measures);\n\n\t\t// Bind window events\n\t\tthis.boundDrawFn = () => this.draw(true);\n\t\tif (ResizeObserver) {\n\t\t\tthis.resizeObserver = new ResizeObserver(this.boundDrawFn);\n\t\t\tthis.resizeObserver.observe(this.parent);\n\t\t}\n\t\twindow.addEventListener('resize', this.boundDrawFn);\n\t\twindow.addEventListener('orientationchange', this.boundDrawFn);\n\t}\n\n\tdestroy() {\n\t\tif (this.resizeObserver) this.resizeObserver.disconnect();\n\t\twindow.removeEventListener('resize', this.boundDrawFn);\n\t\twindow.removeEventListener('orientationchange', this.boundDrawFn);\n\t}\n\n\t// Has to be called manually\n\tsetup() {\n\t\tthis.makeContainer();\n\t\tthis.updateWidth();\n\t\tthis.makeTooltip();\n\n\t\tthis.draw(false, true);\n\t}\n\n\tmakeContainer() {\n\t\t// Chart needs a dedicated parent element\n\t\tthis.parent.innerHTML = '';\n\n\t\tlet args = {\n\t\t\tinside: this.parent,\n\t\t\tclassName: 'chart-container'\n\t\t};\n\n\t\tif(this.independentWidth) {\n\t\t\targs.styles = { width: this.independentWidth + 'px' };\n\t\t}\n\n\t\tthis.container = $.create('div', args);\n\t}\n\n\tmakeTooltip() {\n\t\tthis.tip = new SvgTip({\n\t\t\tparent: this.container,\n\t\t\tcolors: this.colors\n\t\t});\n\t\tthis.bindTooltip();\n\t}\n\n\tbindTooltip() {}\n\n\tdraw(onlyWidthChange=false, init=false) {\n\t\tif (onlyWidthChange && isHidden(this.parent)) {\n\t\t\t// Don't update anything if the chart is hidden\n\t\t\treturn;\n\t\t}\n\t\tthis.updateWidth();\n\n\t\tthis.calc(onlyWidthChange);\n\t\tthis.makeChartArea();\n\t\tthis.setupComponents();\n\n\t\tthis.components.forEach(c => c.setup(this.drawArea));\n\t\t// this.components.forEach(c => c.make());\n\t\tthis.render(this.components, false);\n\n\t\tif(init) {\n\t\t\tthis.data = this.realData;\n\t\t\tsetTimeout(() => {this.update(this.data);}, this.initTimeout);\n\t\t}\n\n\t\tthis.renderLegend();\n\n\t\tthis.setupNavigation(init);\n\t}\n\n\tcalc() {} // builds state\n\n\tupdateWidth() {\n\t\tthis.baseWidth = getElementContentWidth(this.parent);\n\t\tthis.width = this.baseWidth - getExtraWidth(this.measures);\n\t}\n\n\tmakeChartArea() {\n\t\tif(this.svg) {\n\t\t\tthis.container.removeChild(this.svg);\n\t\t}\n\t\tlet m = this.measures;\n\n\t\tthis.svg = makeSVGContainer(\n\t\t\tthis.container,\n\t\t\t'frappe-chart chart',\n\t\t\tthis.baseWidth,\n\t\t\tthis.baseHeight\n\t\t);\n\t\tthis.svgDefs = makeSVGDefs(this.svg);\n\n\t\tif(this.title.length) {\n\t\t\tthis.titleEL = makeText(\n\t\t\t\t'title',\n\t\t\t\tm.margins.left,\n\t\t\t\tm.margins.top,\n\t\t\t\tthis.title,\n\t\t\t\t{\n\t\t\t\t\tfontSize: m.titleFontSize,\n\t\t\t\t\tfill: '#666666',\n\t\t\t\t\tdy: m.titleFontSize\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tlet top = getTopOffset(m);\n\t\tthis.drawArea = makeSVGGroup(\n\t\t\tthis.type + '-chart chart-draw-area',\n\t\t\t`translate(${getLeftOffset(m)}, ${top})`\n\t\t);\n\n\t\tif(this.config.showLegend) {\n\t\t\ttop += this.height + m.paddings.bottom;\n\t\t\tthis.legendArea = makeSVGGroup(\n\t\t\t\t'chart-legend',\n\t\t\t\t`translate(${getLeftOffset(m)}, ${top})`\n\t\t\t);\n\t\t}\n\n\t\tif(this.title.length) { this.svg.appendChild(this.titleEL); }\n\t\tthis.svg.appendChild(this.drawArea);\n\t\tif(this.config.showLegend) { this.svg.appendChild(this.legendArea); }\n\n\t\tthis.updateTipOffset(getLeftOffset(m), getTopOffset(m));\n\t}\n\n\tupdateTipOffset(x, y) {\n\t\tthis.tip.offset = {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t}\n\n\tsetupComponents() { this.components = new Map(); }\n\n\tupdate(data) {\n\t\tif(!data) {\n\t\t\tconsole.error('No data to update.');\n\t\t}\n\t\tthis.data = this.prepareData(data);\n\t\tthis.calc(); // builds state\n\t\tthis.render(this.components, this.config.animate);\n\t\tthis.renderLegend();\n\t}\n\n\trender(components=this.components, animate=true) {\n\t\tif(this.config.isNavigable) {\n\t\t\t// Remove all existing overlays\n\t\t\tthis.overlays.map(o => o.parentNode.removeChild(o));\n\t\t\t// ref.parentNode.insertBefore(element, ref);\n\t\t}\n\t\tlet elementsToAnimate = [];\n\t\t// Can decouple to this.refreshComponents() first to save animation timeout\n\t\tcomponents.forEach(c => {\n\t\t\telementsToAnimate = elementsToAnimate.concat(c.update(animate));\n\t\t});\n\t\tif(elementsToAnimate.length > 0) {\n\t\t\trunSMILAnimation(this.container, this.svg, elementsToAnimate);\n\t\t\tsetTimeout(() => {\n\t\t\t\tcomponents.forEach(c => c.make());\n\t\t\t\tthis.updateNav();\n\t\t\t}, CHART_POST_ANIMATE_TIMEOUT);\n\t\t} else {\n\t\t\tcomponents.forEach(c => c.make());\n\t\t\tthis.updateNav();\n\t\t}\n\t}\n\n\tupdateNav() {\n\t\tif(this.config.isNavigable) {\n\t\t\tthis.makeOverlay();\n\t\t\tthis.bindUnits();\n\t\t}\n\t}\n\n\trenderLegend() {}\n\n\tsetupNavigation(init=false) {\n\t\tif(!this.config.isNavigable) return;\n\n\t\tif(init) {\n\t\t\tthis.bindOverlay();\n\n\t\t\tthis.keyActions = {\n\t\t\t\t'13': this.onEnterKey.bind(this),\n\t\t\t\t'37': this.onLeftArrow.bind(this),\n\t\t\t\t'38': this.onUpArrow.bind(this),\n\t\t\t\t'39': this.onRightArrow.bind(this),\n\t\t\t\t'40': this.onDownArrow.bind(this),\n\t\t\t};\n\n\t\t\tdocument.addEventListener('keydown', (e) => {\n\t\t\t\tif(isElementInViewport(this.container)) {\n\t\t\t\t\te = e || window.event;\n\t\t\t\t\tif(this.keyActions[e.keyCode]) {\n\t\t\t\t\t\tthis.keyActions[e.keyCode]();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tmakeOverlay() {}\n\tupdateOverlay() {}\n\tbindOverlay() {}\n\tbindUnits() {}\n\n\tonLeftArrow() {}\n\tonRightArrow() {}\n\tonUpArrow() {}\n\tonDownArrow() {}\n\tonEnterKey() {}\n\n\taddDataPoint() {}\n\tremoveDataPoint() {}\n\n\tgetDataPoint() {}\n\tsetCurrentDataPoint() {}\n\n\tupdateDataset() {}\n\n\texport() {\n\t\tlet chartSvg = prepareForExport(this.svg);\n\t\tdownloadFile(this.title || 'Chart', [chartSvg]);\n\t}\n}\n","import BaseChart from './BaseChart';\nimport { truncateString } from '../utils/draw-utils';\nimport { legendDot } from '../utils/draw';\nimport { round } from '../utils/helpers';\nimport { getExtraWidth } from '../utils/constants';\n\nexport default class AggregationChart extends BaseChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t}\n\n\tconfigure(args) {\n\t\tsuper.configure(args);\n\n\t\tthis.config.formatTooltipY = (args.tooltipOptions || {}).formatTooltipY;\n\t\tthis.config.maxSlices = args.maxSlices || 20;\n\t\tthis.config.maxLegendPoints = args.maxLegendPoints || 20;\n\t}\n\n\tcalc() {\n\t\tlet s = this.state;\n\t\tlet maxSlices = this.config.maxSlices;\n\t\ts.sliceTotals = [];\n\n\t\tlet allTotals = this.data.labels.map((label, i) => {\n\t\t\tlet total = 0;\n\t\t\tthis.data.datasets.map(e => {\n\t\t\t\ttotal += e.values[i];\n\t\t\t});\n\t\t\treturn [total, label];\n\t\t}).filter(d => { return d[0] >= 0; }); // keep only positive results\n\n\t\tlet totals = allTotals;\n\t\tif(allTotals.length > maxSlices) {\n\t\t\t// Prune and keep a grey area for rest as per maxSlices\n\t\t\tallTotals.sort((a, b) => { return b[0] - a[0]; });\n\n\t\t\ttotals = allTotals.slice(0, maxSlices-1);\n\t\t\tlet remaining = allTotals.slice(maxSlices-1);\n\n\t\t\tlet sumOfRemaining = 0;\n\t\t\tremaining.map(d => {sumOfRemaining += d[0];});\n\t\t\ttotals.push([sumOfRemaining, 'Rest']);\n\t\t\tthis.colors[maxSlices-1] = 'grey';\n\t\t}\n\n\t\ts.labels = [];\n\t\ttotals.map(d => {\n\t\t\ts.sliceTotals.push(round(d[0]));\n\t\t\ts.labels.push(d[1]);\n\t\t});\n\n\t\ts.grandTotal = s.sliceTotals.reduce((a, b) => a + b, 0);\n\n\t\tthis.center = {\n\t\t\tx: this.width / 2,\n\t\t\ty: this.height / 2\n\t\t};\n\t}\n\n\trenderLegend() {\n\t\tlet s = this.state;\n\t\tthis.legendArea.textContent = '';\n\t\tthis.legendTotals = s.sliceTotals.slice(0, this.config.maxLegendPoints);\n\n\t\tlet count = 0;\n\t\tlet y = 0;\n\t\tthis.legendTotals.map((d, i) => {\n\t\t\tlet barWidth = 150;\n\t\t\tlet divisor = Math.floor(\n\t\t\t\t(this.width - getExtraWidth(this.measures))/barWidth\n\t\t\t);\n\t\t\tif (this.legendTotals.length < divisor) {\n\t\t\t\tbarWidth = this.width/this.legendTotals.length;\n\t\t\t}\n\t\t\tif(count > divisor) {\n\t\t\t\tcount = 0;\n\t\t\t\ty += 20;\n\t\t\t}\n\t\t\tlet x = barWidth * count + 5;\n\t\t\tlet label = this.config.truncateLegends ? truncateString(s.labels[i], barWidth/10) : s.labels[i];\n\t\t\tlet formatted = this.config.formatTooltipY ? this.config.formatTooltipY(d) : d;\n\t\t\tlet dot = legendDot(\n\t\t\t\tx,\n\t\t\t\ty,\n\t\t\t\t5,\n\t\t\t\tthis.colors[i],\n\t\t\t\t`${label}: ${formatted}`,\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tthis.legendArea.appendChild(dot);\n\t\t\tcount++;\n\t\t});\n\t}\n}\n","import AggregationChart from './AggregationChart';\nimport { getOffset } from '../utils/dom';\nimport { getComponent } from '../objects/ChartComponents';\nimport { PERCENTAGE_BAR_DEFAULT_HEIGHT, PERCENTAGE_BAR_DEFAULT_DEPTH } from '../utils/constants';\n\nexport default class PercentageChart extends AggregationChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t\tthis.type = 'percentage';\n\t\tthis.setup();\n\t}\n\n\tsetMeasures(options) {\n\t\tlet m = this.measures;\n\t\tthis.barOptions = options.barOptions || {};\n\n\t\tlet b = this.barOptions;\n\t\tb.height = b.height || PERCENTAGE_BAR_DEFAULT_HEIGHT;\n\t\tb.depth = b.depth || PERCENTAGE_BAR_DEFAULT_DEPTH;\n\n\t\tm.paddings.right = 30;\n\t\tm.legendHeight = 60;\n\t\tm.baseHeight = (b.height + b.depth * 0.5) * 8;\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'percentageBars',\n\t\t\t\t{\n\t\t\t\t\tbarHeight: this.barOptions.height,\n\t\t\t\t\tbarDepth: this.barOptions.depth,\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\txPositions: s.xPositions,\n\t\t\t\t\t\twidths: s.widths,\n\t\t\t\t\t\tcolors: this.colors\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tcalc() {\n\t\tsuper.calc();\n\t\tlet s = this.state;\n\n\t\ts.xPositions = [];\n\t\ts.widths = [];\n\n\t\tlet xPos = 0;\n\t\ts.sliceTotals.map((value) => {\n\t\t\tlet width = this.width * value / s.grandTotal;\n\t\t\ts.widths.push(width);\n\t\t\ts.xPositions.push(xPos);\n\t\t\txPos += width;\n\t\t});\n\t}\n\n\tmakeDataByIndex() { }\n\n\tbindTooltip() {\n\t\tlet s = this.state;\n\t\tthis.container.addEventListener('mousemove', (e) => {\n\t\t\tlet bars = this.components.get('percentageBars').store;\n\t\t\tlet bar = e.target;\n\t\t\tif(bars.includes(bar)) {\n\n\t\t\t\tlet i = bars.indexOf(bar);\n\t\t\t\tlet gOff = getOffset(this.container), pOff = getOffset(bar);\n\n\t\t\t\tlet x = pOff.left - gOff.left + parseInt(bar.getAttribute('width'))/2;\n\t\t\t\tlet y = pOff.top - gOff.top;\n\t\t\t\tlet title = (this.formattedLabels && this.formattedLabels.length>0\n\t\t\t\t\t? this.formattedLabels[i] : this.state.labels[i]) + ': ';\n\t\t\t\tlet fraction = s.sliceTotals[i]/s.grandTotal;\n\n\t\t\t\tthis.tip.setValues(x, y, {name: title, value: (fraction*100).toFixed(1) + \"%\"});\n\t\t\t\tthis.tip.showTip();\n\t\t\t}\n\t\t});\n\t}\n}\n","import AggregationChart from './AggregationChart';\nimport { getComponent } from '../objects/ChartComponents';\nimport { getOffset } from '../utils/dom';\nimport { getPositionByAngle } from '../utils/helpers';\nimport { makeArcPathStr, makeCircleStr } from '../utils/draw';\nimport { lightenDarkenColor } from '../utils/colors';\nimport { transform } from '../utils/animation';\nimport { FULL_ANGLE } from '../utils/constants';\n\nexport default class PieChart extends AggregationChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t\tthis.type = 'pie';\n\t\tthis.initTimeout = 0;\n\t\tthis.init = 1;\n\n\t\tthis.setup();\n\t}\n\n\tconfigure(args) {\n\t\tsuper.configure(args);\n\t\tthis.mouseMove = this.mouseMove.bind(this);\n\t\tthis.mouseLeave = this.mouseLeave.bind(this);\n\n\t\tthis.hoverRadio = args.hoverRadio || 0.1;\n\t\tthis.config.startAngle = args.startAngle || 0;\n\n\t\tthis.clockWise = args.clockWise || false;\n\t}\n\n\tcalc() {\n\t\tsuper.calc();\n\t\tlet s = this.state;\n\t\tthis.radius = (this.height > this.width ? this.center.x : this.center.y);\n\n\t\tconst { radius, clockWise } = this;\n\n\t\tconst prevSlicesProperties = s.slicesProperties || [];\n\t\ts.sliceStrings = [];\n\t\ts.slicesProperties = [];\n\t\tlet curAngle = 180 - this.config.startAngle;\n\t\ts.sliceTotals.map((total, i) => {\n\t\t\tconst startAngle = curAngle;\n\t\t\tconst originDiffAngle = (total / s.grandTotal) * FULL_ANGLE;\n\t\t\tconst largeArc = originDiffAngle > 180 ? 1: 0;\n\t\t\tconst diffAngle = clockWise ? -originDiffAngle : originDiffAngle;\n\t\t\tconst endAngle = curAngle = curAngle + diffAngle;\n\t\t\tconst startPosition = getPositionByAngle(startAngle, radius);\n\t\t\tconst endPosition = getPositionByAngle(endAngle, radius);\n\n\t\t\tconst prevProperty = this.init && prevSlicesProperties[i];\n\n\t\t\tlet curStart,curEnd;\n\t\t\tif(this.init) {\n\t\t\t\tcurStart = prevProperty ? prevProperty.startPosition : startPosition;\n\t\t\t\tcurEnd = prevProperty ? prevProperty.endPosition : startPosition;\n\t\t\t} else {\n\t\t\t\tcurStart = startPosition;\n\t\t\t\tcurEnd = endPosition;\n\t\t\t}\n\t\t\tconst curPath =\n\t\t\t\toriginDiffAngle === 360\n\t\t\t\t\t? makeCircleStr(curStart, curEnd, this.center, this.radius, clockWise, largeArc)\n\t\t\t\t\t: makeArcPathStr(curStart, curEnd, this.center, this.radius, clockWise, largeArc);\n\n\t\t\ts.sliceStrings.push(curPath);\n\t\t\ts.slicesProperties.push({\n\t\t\t\tstartPosition,\n\t\t\t\tendPosition,\n\t\t\t\tvalue: total,\n\t\t\t\ttotal: s.grandTotal,\n\t\t\t\tstartAngle,\n\t\t\t\tendAngle,\n\t\t\t\tangle: diffAngle\n\t\t\t});\n\n\t\t});\n\t\tthis.init = 0;\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'pieSlices',\n\t\t\t\t{ },\n\t\t\t\tfunction() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsliceStrings: s.sliceStrings,\n\t\t\t\t\t\tcolors: this.colors\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tcalTranslateByAngle(property){\n\t\tconst{radius,hoverRadio} = this;\n\t\tconst position = getPositionByAngle(property.startAngle+(property.angle / 2),radius);\n\t\treturn `translate3d(${(position.x) * hoverRadio}px,${(position.y) * hoverRadio}px,0)`;\n\t}\n\n\thoverSlice(path,i,flag,e){\n\t\tif(!path) return;\n\t\tconst color = this.colors[i];\n\t\tif(flag) {\n\t\t\ttransform(path, this.calTranslateByAngle(this.state.slicesProperties[i]));\n\t\t\tpath.style.fill = lightenDarkenColor(color, 50);\n\t\t\tlet g_off = getOffset(this.svg);\n\t\t\tlet x = e.pageX - g_off.left + 10;\n\t\t\tlet y = e.pageY - g_off.top - 10;\n\t\t\tlet title = (this.formatted_labels && this.formatted_labels.length > 0\n\t\t\t\t? this.formatted_labels[i] : this.state.labels[i]) + ': ';\n\t\t\tlet percent = (this.state.sliceTotals[i] * 100 / this.state.grandTotal).toFixed(1);\n\t\t\tthis.tip.setValues(x, y, {name: title, value: percent + \"%\"});\n\t\t\tthis.tip.showTip();\n\t\t} else {\n\t\t\ttransform(path,'translate3d(0,0,0)');\n\t\t\tthis.tip.hideTip();\n\t\t\tpath.style.fill = color;\n\t\t}\n\t}\n\n\tbindTooltip() {\n\t\tthis.container.addEventListener('mousemove', this.mouseMove);\n\t\tthis.container.addEventListener('mouseleave', this.mouseLeave);\n\t}\n\n\tmouseMove(e){\n\t\tconst target = e.target;\n\t\tlet slices = this.components.get('pieSlices').store;\n\t\tlet prevIndex = this.curActiveSliceIndex;\n\t\tlet prevAcitve = this.curActiveSlice;\n\t\tif(slices.includes(target)) {\n\t\t\tlet i = slices.indexOf(target);\n\t\t\tthis.hoverSlice(prevAcitve, prevIndex,false);\n\t\t\tthis.curActiveSlice = target;\n\t\t\tthis.curActiveSliceIndex = i;\n\t\t\tthis.hoverSlice(target, i, true, e);\n\t\t} else {\n\t\t\tthis.mouseLeave();\n\t\t}\n\t}\n\n\tmouseLeave(){\n\t\tthis.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,false);\n\t}\n}\n","import BaseChart from './BaseChart';\nimport { getComponent } from '../objects/ChartComponents';\nimport { makeText, heatSquare } from '../utils/draw';\nimport { DAY_NAMES_SHORT, addDays, areInSameMonth, getLastDateInMonth, setDayToSunday, getYyyyMmDd, getWeeksBetween, getMonthName, clone,\n\tNO_OF_MILLIS, NO_OF_YEAR_MONTHS, NO_OF_DAYS_IN_WEEK } from '../utils/date-utils';\nimport { calcDistribution, getMaxCheckpoint } from '../utils/intervals';\nimport { getExtraHeight, getExtraWidth, HEATMAP_DISTRIBUTION_SIZE, HEATMAP_SQUARE_SIZE,\n\tHEATMAP_GUTTER_SIZE } from '../utils/constants';\n\nconst COL_WIDTH = HEATMAP_SQUARE_SIZE + HEATMAP_GUTTER_SIZE;\nconst ROW_HEIGHT = COL_WIDTH;\n// const DAY_INCR = 1;\n\nexport default class Heatmap extends BaseChart {\n\tconstructor(parent, options) {\n\t\tsuper(parent, options);\n\t\tthis.type = 'heatmap';\n\n\t\tthis.countLabel = options.countLabel || '';\n\n\t\tlet validStarts = ['Sunday', 'Monday'];\n\t\tlet startSubDomain = validStarts.includes(options.startSubDomain)\n\t\t\t? options.startSubDomain : 'Sunday';\n\t\tthis.startSubDomainIndex = validStarts.indexOf(startSubDomain);\n\n\t\tthis.setup();\n\t}\n\n\tsetMeasures(options) {\n\t\tlet m = this.measures;\n\t\tthis.discreteDomains = options.discreteDomains === 0 ? 0 : 1;\n\n\t\tm.paddings.top = ROW_HEIGHT * 3;\n\t\tm.paddings.bottom = 0;\n\t\tm.legendHeight = ROW_HEIGHT * 2;\n\t\tm.baseHeight = ROW_HEIGHT * NO_OF_DAYS_IN_WEEK\n\t\t\t+ getExtraHeight(m);\n\n\t\tlet d = this.data;\n\t\tlet spacing = this.discreteDomains ? NO_OF_YEAR_MONTHS : 0;\n\t\tthis.independentWidth = (getWeeksBetween(d.start, d.end)\n\t\t\t+ spacing) * COL_WIDTH + getExtraWidth(m);\n\t}\n\n\tupdateWidth() {\n\t\tlet spacing = this.discreteDomains ? NO_OF_YEAR_MONTHS : 0;\n\t\tlet noOfWeeks = this.state.noOfWeeks ? this.state.noOfWeeks : 52;\n\t\tthis.baseWidth = (noOfWeeks + spacing) * COL_WIDTH\n\t\t\t+ getExtraWidth(this.measures);\n\t}\n\n\tprepareData(data=this.data) {\n\t\tif(data.start && data.end && data.start > data.end) {\n\t\t\tthrow new Error('Start date cannot be greater than end date.');\n\t\t}\n\n\t\tif(!data.start) {\n\t\t\tdata.start = new Date();\n\t\t\tdata.start.setFullYear( data.start.getFullYear() - 1 );\n\t\t}\n\t\tif(!data.end) { data.end = new Date(); }\n\t\tdata.dataPoints = data.dataPoints || {};\n\n\t\tif(parseInt(Object.keys(data.dataPoints)[0]) > 100000) {\n\t\t\tlet points = {};\n\t\t\tObject.keys(data.dataPoints).forEach(timestampSec => {\n\t\t\t\tlet date = new Date(timestampSec * NO_OF_MILLIS);\n\t\t\t\tpoints[getYyyyMmDd(date)] = data.dataPoints[timestampSec];\n\t\t\t});\n\t\t\tdata.dataPoints = points;\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tcalc() {\n\t\tlet s = this.state;\n\n\t\ts.start = clone(this.data.start);\n\t\ts.end = clone(this.data.end);\n\n\t\ts.firstWeekStart = clone(s.start);\n\t\ts.noOfWeeks = getWeeksBetween(s.start, s.end);\n\t\ts.distribution = calcDistribution(\n\t\t\tObject.values(this.data.dataPoints), HEATMAP_DISTRIBUTION_SIZE);\n\n\t\ts.domainConfigs = this.getDomains();\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\t\tlet lessCol = this.discreteDomains ? 0 : 1;\n\n\t\tlet componentConfigs = s.domainConfigs.map((config, i) => [\n\t\t\t'heatDomain',\n\t\t\t{\n\t\t\t\tindex: config.index,\n\t\t\t\tcolWidth: COL_WIDTH,\n\t\t\t\trowHeight: ROW_HEIGHT,\n\t\t\t\tsquareSize: HEATMAP_SQUARE_SIZE,\n\t\t\t\tradius: this.rawChartArgs.radius || 0,\n\t\t\t\txTranslate: s.domainConfigs\n\t\t\t\t\t.filter((config, j) => j < i)\n\t\t\t\t\t.map(config => config.cols.length - lessCol)\n\t\t\t\t\t.reduce((a, b) => a + b, 0)\n\t\t\t\t\t* COL_WIDTH\n\t\t\t},\n\t\t\tfunction() {\n\t\t\t\treturn s.domainConfigs[i];\n\t\t\t}.bind(this)\n\n\t\t]);\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map((args, i) => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0] + '-' + i, component];\n\t\t\t})\n\t\t);\n\n\t\tlet y = 0;\n\t\tDAY_NAMES_SHORT.forEach((dayName, i) => {\n\t\t\tif([1, 3, 5].includes(i)) {\n\t\t\t\tlet dayText = makeText('subdomain-name', -COL_WIDTH/2, y, dayName,\n\t\t\t\t\t{\n\t\t\t\t\t\tfontSize: HEATMAP_SQUARE_SIZE,\n\t\t\t\t\t\tdy: 8,\n\t\t\t\t\t\ttextAnchor: 'end'\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tthis.drawArea.appendChild(dayText);\n\t\t\t}\n\t\t\ty += ROW_HEIGHT;\n\t\t});\n\t}\n\n\tupdate(data) {\n\t\tif(!data) {\n\t\t\tconsole.error('No data to update.');\n\t\t}\n\n\t\tthis.data = this.prepareData(data);\n\t\tthis.draw();\n\t\tthis.bindTooltip();\n\t}\n\n\tbindTooltip() {\n\t\tthis.container.addEventListener('mousemove', (e) => {\n\t\t\tthis.components.forEach(comp => {\n\t\t\t\tlet daySquares = comp.store;\n\t\t\t\tlet daySquare = e.target;\n\t\t\t\tif(daySquares.includes(daySquare)) {\n\n\t\t\t\t\tlet count = daySquare.getAttribute('data-value');\n\t\t\t\t\tlet dateParts = daySquare.getAttribute('data-date').split('-');\n\n\t\t\t\t\tlet month = getMonthName(parseInt(dateParts[1])-1, true);\n\n\t\t\t\t\tlet gOff = this.container.getBoundingClientRect(), pOff = daySquare.getBoundingClientRect();\n\n\t\t\t\t\tlet width = parseInt(e.target.getAttribute('width'));\n\t\t\t\t\tlet x = pOff.left - gOff.left + width/2;\n\t\t\t\t\tlet y = pOff.top - gOff.top;\n\t\t\t\t\tlet value = count + ' ' + this.countLabel;\n\t\t\t\t\tlet name = ' on ' + month + ' ' + dateParts[0] + ', ' + dateParts[2];\n\n\t\t\t\t\tthis.tip.setValues(x, y, {name: name, value: value, valueFirst: 1}, []);\n\t\t\t\t\tthis.tip.showTip();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\trenderLegend() {\n\t\tthis.legendArea.textContent = '';\n\t\tlet x = 0;\n\t\tlet y = ROW_HEIGHT;\n\t\tlet radius = this.rawChartArgs.radius || 0;\n\n\t\tlet lessText = makeText('subdomain-name', x, y, 'Less',\n\t\t\t{\n\t\t\t\tfontSize: HEATMAP_SQUARE_SIZE + 1,\n\t\t\t\tdy: 9\n\t\t\t}\n\t\t);\n\t\tx = (COL_WIDTH * 2) + COL_WIDTH/2;\n\t\tthis.legendArea.appendChild(lessText);\n\n\t\tthis.colors.slice(0, HEATMAP_DISTRIBUTION_SIZE).map((color, i) => {\n\t\t\tconst square = heatSquare('heatmap-legend-unit', x + (COL_WIDTH + 3) * i,\n\t\t\t\ty, HEATMAP_SQUARE_SIZE, radius, color);\n\t\t\tthis.legendArea.appendChild(square);\n\t\t});\n\n\t\tlet moreTextX = x + HEATMAP_DISTRIBUTION_SIZE * (COL_WIDTH + 3) + COL_WIDTH/4;\n\t\tlet moreText = makeText('subdomain-name', moreTextX, y, 'More',\n\t\t\t{\n\t\t\t\tfontSize: HEATMAP_SQUARE_SIZE + 1,\n\t\t\t\tdy: 9\n\t\t\t}\n\t\t);\n\t\tthis.legendArea.appendChild(moreText);\n\t}\n\n\tgetDomains() {\n\t\tlet s = this.state;\n\t\tconst [startMonth, startYear] = [s.start.getMonth(), s.start.getFullYear()];\n\t\tconst [endMonth, endYear] = [s.end.getMonth(), s.end.getFullYear()];\n\n\t\tconst noOfMonths = (endMonth - startMonth + 1) + (endYear - startYear) * 12;\n\n\t\tlet domainConfigs = [];\n\n\t\tlet startOfMonth = clone(s.start);\n\t\tfor(var i = 0; i < noOfMonths; i++) {\n\t\t\tlet endDate = s.end;\n\t\t\tif(!areInSameMonth(startOfMonth, s.end)) {\n\t\t\t\tlet [month, year] = [startOfMonth.getMonth(), startOfMonth.getFullYear()];\n\t\t\t\tendDate = getLastDateInMonth(month, year);\n\t\t\t}\n\t\t\tdomainConfigs.push(this.getDomainConfig(startOfMonth, endDate));\n\n\t\t\taddDays(endDate, 1);\n\t\t\tstartOfMonth = endDate;\n\t\t}\n\n\t\treturn domainConfigs;\n\t}\n\n\tgetDomainConfig(startDate, endDate='') {\n\t\tlet [month, year] = [startDate.getMonth(), startDate.getFullYear()];\n\t\tlet startOfWeek = setDayToSunday(startDate); // TODO: Monday as well\n\t\tendDate = clone(endDate) || getLastDateInMonth(month, year);\n\n\t\tlet domainConfig = {\n\t\t\tindex: month,\n\t\t\tcols: []\n\t\t};\n\n\t\taddDays(endDate, 1);\n\t\tlet noOfMonthWeeks = getWeeksBetween(startOfWeek, endDate);\n\n\t\tlet cols = [], col;\n\t\tfor(var i = 0; i < noOfMonthWeeks; i++) {\n\t\t\tcol = this.getCol(startOfWeek, month);\n\t\t\tcols.push(col);\n\n\t\t\tstartOfWeek = new Date(col[NO_OF_DAYS_IN_WEEK - 1].yyyyMmDd);\n\t\t\taddDays(startOfWeek, 1);\n\t\t}\n\n\t\tif(col[NO_OF_DAYS_IN_WEEK - 1].dataValue !== undefined) {\n\t\t\taddDays(startOfWeek, 1);\n\t\t\tcols.push(this.getCol(startOfWeek, month, true));\n\t\t}\n\n\t\tdomainConfig.cols = cols;\n\n\t\treturn domainConfig;\n\t}\n\n\tgetCol(startDate, month, empty = false) {\n\t\tlet s = this.state;\n\n\t\t// startDate is the start of week\n\t\tlet currentDate = clone(startDate);\n\t\tlet col = [];\n\n\t\tfor(var i = 0; i < NO_OF_DAYS_IN_WEEK; i++, addDays(currentDate, 1)) {\n\t\t\tlet config = {};\n\n\t\t\t// Non-generic adjustment for entire heatmap, needs state\n\t\t\tlet currentDateWithinData = currentDate >= s.start && currentDate <= s.end;\n\n\t\t\tif(empty || currentDate.getMonth() !== month || !currentDateWithinData) {\n\t\t\t\tconfig.yyyyMmDd = getYyyyMmDd(currentDate);\n\t\t\t} else {\n\t\t\t\tconfig = this.getSubDomainConfig(currentDate);\n\t\t\t}\n\t\t\tcol.push(config);\n\t\t}\n\n\t\treturn col;\n\t}\n\n\tgetSubDomainConfig(date) {\n\t\tlet yyyyMmDd = getYyyyMmDd(date);\n\t\tlet dataValue = this.data.dataPoints[yyyyMmDd];\n\t\tlet config = {\n\t\t\tyyyyMmDd: yyyyMmDd,\n\t\t\tdataValue: dataValue || 0,\n\t\t\tfill: this.colors[getMaxCheckpoint(dataValue, this.state.distribution)]\n\t\t};\n\t\treturn config;\n\t}\n}\n","import BaseChart from './BaseChart';\nimport { dataPrep, zeroDataPrep, getShortenedLabels } from '../utils/axis-chart-utils';\nimport { AXIS_LEGEND_BAR_SIZE } from '../utils/constants';\nimport { getComponent } from '../objects/ChartComponents';\nimport { getOffset, fire } from '../utils/dom';\nimport { calcChartIntervals, getIntervalSize, getValueRange, getZeroIndex, scale, getClosestInArray } from '../utils/intervals';\nimport { floatTwo } from '../utils/helpers';\nimport { makeOverlay, updateOverlay, legendBar } from '../utils/draw';\nimport { getTopOffset, getLeftOffset, MIN_BAR_PERCENT_HEIGHT, BAR_CHART_SPACE_RATIO,\n\tLINE_CHART_DOT_SIZE } from '../utils/constants';\n\nexport default class AxisChart extends BaseChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\n\t\tthis.barOptions = args.barOptions || {};\n\t\tthis.lineOptions = args.lineOptions || {};\n\n\t\tthis.type = args.type || 'line';\n\t\tthis.init = 1;\n\n\t\tthis.setup();\n\t}\n\n\tsetMeasures() {\n\t\tif(this.data.datasets.length <= 1) {\n\t\t\tthis.config.showLegend = 0;\n\t\t\tthis.measures.paddings.bottom = 30;\n\t\t}\n\t}\n\n\tconfigure(options) {\n\t\tsuper.configure(options);\n\n\t\toptions.axisOptions = options.axisOptions || {};\n\t\toptions.tooltipOptions = options.tooltipOptions || {};\n\n\t\tthis.config.xAxisMode = options.axisOptions.xAxisMode || 'span';\n\t\tthis.config.yAxisMode = options.axisOptions.yAxisMode || 'span';\n\t\tthis.config.xIsSeries = options.axisOptions.xIsSeries || 0;\n\t\tthis.config.shortenYAxisNumbers = options.axisOptions.shortenYAxisNumbers || 0;\n\n\t\tthis.config.formatTooltipX = options.tooltipOptions.formatTooltipX;\n\t\tthis.config.formatTooltipY = options.tooltipOptions.formatTooltipY;\n\n\t\tthis.config.valuesOverPoints = options.valuesOverPoints;\n\t}\n\n\tprepareData(data=this.data) {\n\t\treturn dataPrep(data, this.type);\n\t}\n\n\tprepareFirstData(data=this.data) {\n\t\treturn zeroDataPrep(data);\n\t}\n\n\tcalc(onlyWidthChange = false) {\n\t\tthis.calcXPositions();\n\t\tif(!onlyWidthChange) {\n\t\t\tthis.calcYAxisParameters(this.getAllYValues(), this.type === 'line');\n\t\t}\n\t\tthis.makeDataByIndex();\n\t}\n\n\tcalcXPositions() {\n\t\tlet s = this.state;\n\t\tlet labels = this.data.labels;\n\t\ts.datasetLength = labels.length;\n\n\t\ts.unitWidth = this.width/(s.datasetLength);\n\t\t// Default, as per bar, and mixed. Only line will be a special case\n\t\ts.xOffset = s.unitWidth/2;\n\n\t\t// // For a pure Line Chart\n\t\t// s.unitWidth = this.width/(s.datasetLength - 1);\n\t\t// s.xOffset = 0;\n\n\t\ts.xAxis = {\n\t\t\tlabels: labels,\n\t\t\tpositions: labels.map((d, i) =>\n\t\t\t\tfloatTwo(s.xOffset + i * s.unitWidth)\n\t\t\t)\n\t\t};\n\t}\n\n\tcalcYAxisParameters(dataValues, withMinimum = 'false') {\n\t\tconst yPts = calcChartIntervals(dataValues, withMinimum);\n\t\tconst scaleMultiplier = this.height / getValueRange(yPts);\n\t\tconst intervalHeight = getIntervalSize(yPts) * scaleMultiplier;\n\t\tconst zeroLine = this.height - (getZeroIndex(yPts) * intervalHeight);\n\n\t\tthis.state.yAxis = {\n\t\t\tlabels: yPts,\n\t\t\tpositions: yPts.map(d => zeroLine - d * scaleMultiplier),\n\t\t\tscaleMultiplier: scaleMultiplier,\n\t\t\tzeroLine: zeroLine,\n\t\t};\n\n\t\t// Dependent if above changes\n\t\tthis.calcDatasetPoints();\n\t\tthis.calcYExtremes();\n\t\tthis.calcYRegions();\n\t}\n\n\tcalcDatasetPoints() {\n\t\tlet s = this.state;\n\t\tlet scaleAll = values => values.map(val => scale(val, s.yAxis));\n\n\t\ts.datasets = this.data.datasets.map((d, i) => {\n\t\t\tlet values = d.values;\n\t\t\tlet cumulativeYs = d.cumulativeYs || [];\n\t\t\treturn {\n\t\t\t\tname: d.name && d.name.replace(/<|>|&/g, (char) => char == '&' ? '&' : char == '<' ? '<' : '>'),\n\t\t\t\tindex: i,\n\t\t\t\tchartType: d.chartType,\n\n\t\t\t\tvalues: values,\n\t\t\t\tyPositions: scaleAll(values),\n\n\t\t\t\tcumulativeYs: cumulativeYs,\n\t\t\t\tcumulativeYPos: scaleAll(cumulativeYs),\n\t\t\t};\n\t\t});\n\t}\n\n\tcalcYExtremes() {\n\t\tlet s = this.state;\n\t\tif(this.barOptions.stacked) {\n\t\t\ts.yExtremes = s.datasets[s.datasets.length - 1].cumulativeYPos;\n\t\t\treturn;\n\t\t}\n\t\ts.yExtremes = new Array(s.datasetLength).fill(9999);\n\t\ts.datasets.map(d => {\n\t\t\td.yPositions.map((pos, j) => {\n\t\t\t\tif(pos < s.yExtremes[j]) {\n\t\t\t\t\ts.yExtremes[j] = pos;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tcalcYRegions() {\n\t\tlet s = this.state;\n\t\tif(this.data.yMarkers) {\n\t\t\tthis.state.yMarkers = this.data.yMarkers.map(d => {\n\t\t\t\td.position = scale(d.value, s.yAxis);\n\t\t\t\tif(!d.options) d.options = {};\n\t\t\t\t// if(!d.label.includes(':')) {\n\t\t\t\t// \td.label += ': ' + d.value;\n\t\t\t\t// }\n\t\t\t\treturn d;\n\t\t\t});\n\t\t}\n\t\tif(this.data.yRegions) {\n\t\t\tthis.state.yRegions = this.data.yRegions.map(d => {\n\t\t\t\td.startPos = scale(d.start, s.yAxis);\n\t\t\t\td.endPos = scale(d.end, s.yAxis);\n\t\t\t\tif(!d.options) d.options = {};\n\t\t\t\treturn d;\n\t\t\t});\n\t\t}\n\t}\n\n\tgetAllYValues() {\n\t\tlet key = 'values';\n\n\t\tif(this.barOptions.stacked) {\n\t\t\tkey = 'cumulativeYs';\n\t\t\tlet cumulative = new Array(this.state.datasetLength).fill(0);\n\t\t\tthis.data.datasets.map((d, i) => {\n\t\t\t\tlet values = this.data.datasets[i].values;\n\t\t\t\td[key] = cumulative = cumulative.map((c, i) => c + values[i]);\n\t\t\t});\n\t\t}\n\n\t\tlet allValueLists = this.data.datasets.map(d => d[key]);\n\t\tif(this.data.yMarkers) {\n\t\t\tallValueLists.push(this.data.yMarkers.map(d => d.value));\n\t\t}\n\t\tif(this.data.yRegions) {\n\t\t\tthis.data.yRegions.map(d => {\n\t\t\t\tallValueLists.push([d.end, d.start]);\n\t\t\t});\n\t\t}\n\n\t\treturn [].concat(...allValueLists);\n\t}\n\n\tsetupComponents() {\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'yAxis',\n\t\t\t\t{\n\t\t\t\t\tmode: this.config.yAxisMode,\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\tshortenNumbers: this.config.shortenYAxisNumbers\n\t\t\t\t\t// pos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn this.state.yAxis;\n\t\t\t\t}.bind(this)\n\t\t\t],\n\n\t\t\t[\n\t\t\t\t'xAxis',\n\t\t\t\t{\n\t\t\t\t\tmode: this.config.xAxisMode,\n\t\t\t\t\theight: this.height,\n\t\t\t\t\t// pos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\tlet s = this.state;\n\t\t\t\t\ts.xAxis.calcLabels = getShortenedLabels(this.width,\n\t\t\t\t\t\ts.xAxis.labels, this.config.xIsSeries);\n\n\t\t\t\t\treturn s.xAxis;\n\t\t\t\t}.bind(this)\n\t\t\t],\n\n\t\t\t[\n\t\t\t\t'yRegions',\n\t\t\t\t{\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\tpos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn this.state.yRegions;\n\t\t\t\t}.bind(this)\n\t\t\t],\n\t\t];\n\n\t\tlet barDatasets = this.state.datasets.filter(d => d.chartType === 'bar');\n\t\tlet lineDatasets = this.state.datasets.filter(d => d.chartType === 'line');\n\n\t\tlet barsConfigs = barDatasets.map(d => {\n\t\t\tlet index = d.index;\n\t\t\treturn [\n\t\t\t\t'barGraph' + '-' + d.index,\n\t\t\t\t{\n\t\t\t\t\tindex: index,\n\t\t\t\t\tcolor: this.colors[index],\n\t\t\t\t\tstacked: this.barOptions.stacked,\n\n\t\t\t\t\t// same for all datasets\n\t\t\t\t\tvaluesOverPoints: this.config.valuesOverPoints,\n\t\t\t\t\tminHeight: this.height * MIN_BAR_PERCENT_HEIGHT,\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\tlet s = this.state;\n\t\t\t\t\tlet d = s.datasets[index];\n\t\t\t\t\tlet stacked = this.barOptions.stacked;\n\n\t\t\t\t\tlet spaceRatio = this.barOptions.spaceRatio || BAR_CHART_SPACE_RATIO;\n\t\t\t\t\tlet barsWidth = s.unitWidth * (1 - spaceRatio);\n\t\t\t\t\tlet barWidth = barsWidth/(stacked ? 1 : barDatasets.length);\n\n\t\t\t\t\tlet xPositions = s.xAxis.positions.map(x => x - barsWidth/2);\n\t\t\t\t\tif(!stacked) {\n\t\t\t\t\t\txPositions = xPositions.map(p => p + barWidth * index);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet labels = new Array(s.datasetLength).fill('');\n\t\t\t\t\tif(this.config.valuesOverPoints) {\n\t\t\t\t\t\tif(stacked && d.index === s.datasets.length - 1) {\n\t\t\t\t\t\t\tlabels = d.cumulativeYs;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlabels = d.values;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet offsets = new Array(s.datasetLength).fill(0);\n\t\t\t\t\tif(stacked) {\n\t\t\t\t\t\toffsets = d.yPositions.map((y, j) => y - d.cumulativeYPos[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\txPositions: xPositions,\n\t\t\t\t\t\tyPositions: d.yPositions,\n\t\t\t\t\t\toffsets: offsets,\n\t\t\t\t\t\t// values: d.values,\n\t\t\t\t\t\tlabels: labels,\n\n\t\t\t\t\t\tzeroLine: s.yAxis.zeroLine,\n\t\t\t\t\t\tbarsWidth: barsWidth,\n\t\t\t\t\t\tbarWidth: barWidth,\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t];\n\t\t});\n\n\t\tlet lineConfigs = lineDatasets.map(d => {\n\t\t\tlet index = d.index;\n\t\t\treturn [\n\t\t\t\t'lineGraph' + '-' + d.index,\n\t\t\t\t{\n\t\t\t\t\tindex: index,\n\t\t\t\t\tcolor: this.colors[index],\n\t\t\t\t\tsvgDefs: this.svgDefs,\n\t\t\t\t\theatline: this.lineOptions.heatline,\n\t\t\t\t\tregionFill: this.lineOptions.regionFill,\n\t\t\t\t\tspline: this.lineOptions.spline,\n\t\t\t\t\thideDots: this.lineOptions.hideDots,\n\t\t\t\t\thideLine: this.lineOptions.hideLine,\n\n\t\t\t\t\t// same for all datasets\n\t\t\t\t\tvaluesOverPoints: this.config.valuesOverPoints,\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\tlet s = this.state;\n\t\t\t\t\tlet d = s.datasets[index];\n\t\t\t\t\tlet minLine = s.yAxis.positions[0] < s.yAxis.zeroLine\n\t\t\t\t\t\t? s.yAxis.positions[0] : s.yAxis.zeroLine;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\txPositions: s.xAxis.positions,\n\t\t\t\t\t\tyPositions: d.yPositions,\n\n\t\t\t\t\t\tvalues: d.values,\n\n\t\t\t\t\t\tzeroLine: minLine,\n\t\t\t\t\t\tradius: this.lineOptions.dotSize || LINE_CHART_DOT_SIZE,\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t];\n\t\t});\n\n\t\tlet markerConfigs = [\n\t\t\t[\n\t\t\t\t'yMarkers',\n\t\t\t\t{\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\tpos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn this.state.yMarkers;\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tcomponentConfigs = componentConfigs.concat(barsConfigs, lineConfigs, markerConfigs);\n\n\t\tlet optionals = ['yMarkers', 'yRegions'];\n\t\tthis.dataUnitComponents = [];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.filter(args => !optionals.includes(args[0]) || this.state[args[0]])\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\tif(args[0].includes('lineGraph') || args[0].includes('barGraph')) {\n\t\t\t\t\tthis.dataUnitComponents.push(component);\n\t\t\t\t}\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tmakeDataByIndex() {\n\t\tthis.dataByIndex = {};\n\n\t\tlet s = this.state;\n\t\tlet formatX = this.config.formatTooltipX;\n\t\tlet formatY = this.config.formatTooltipY;\n\t\tlet titles = s.xAxis.labels;\n\n\t\ttitles.map((label, index) => {\n\t\t\tlet values = this.state.datasets.map((set, i) => {\n\t\t\t\tlet value = set.values[index];\n\t\t\t\treturn {\n\t\t\t\t\ttitle: set.name,\n\t\t\t\t\tvalue: value,\n\t\t\t\t\tyPos: set.yPositions[index],\n\t\t\t\t\tcolor: this.colors[i],\n\t\t\t\t\tformatted: formatY ? formatY(value) : value,\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tthis.dataByIndex[index] = {\n\t\t\t\tlabel: label,\n\t\t\t\tformattedLabel: formatX ? formatX(label) : label,\n\t\t\t\txPos: s.xAxis.positions[index],\n\t\t\t\tvalues: values,\n\t\t\t\tyExtreme: s.yExtremes[index],\n\t\t\t};\n\t\t});\n\t}\n\n\tbindTooltip() {\n\t\t// NOTE: could be in tooltip itself, as it is a given functionality for its parent\n\t\tthis.container.addEventListener('mousemove', (e) => {\n\t\t\tlet m = this.measures;\n\t\t\tlet o = getOffset(this.container);\n\t\t\tlet relX = e.pageX - o.left - getLeftOffset(m);\n\t\t\tlet relY = e.pageY - o.top;\n\n\t\t\tif(relY < this.height + getTopOffset(m)\n\t\t\t\t&& relY > getTopOffset(m)) {\n\t\t\t\tthis.mapTooltipXPosition(relX);\n\t\t\t} else {\n\t\t\t\tthis.tip.hideTip();\n\t\t\t}\n\t\t});\n\t}\n\n\tmapTooltipXPosition(relX) {\n\t\tlet s = this.state;\n\t\tif(!s.yExtremes) return;\n\n\t\tlet index = getClosestInArray(relX, s.xAxis.positions, true);\n\t\tif (index >= 0) {\n\t\t\tlet dbi = this.dataByIndex[index];\n\n\t\t\tthis.tip.setValues(\n\t\t\t\tdbi.xPos + this.tip.offset.x,\n\t\t\t\tdbi.yExtreme + this.tip.offset.y,\n\t\t\t\t{name: dbi.formattedLabel, value: ''},\n\t\t\t\tdbi.values,\n\t\t\t\tindex\n\t\t\t);\n\n\t\t\tthis.tip.showTip();\n\t\t}\n\t}\n\n\trenderLegend() {\n\t\tlet s = this.data;\n\t\tif(s.datasets.length > 1) {\n\t\t\tthis.legendArea.textContent = '';\n\t\t\ts.datasets.map((d, i) => {\n\t\t\t\tlet barWidth = AXIS_LEGEND_BAR_SIZE;\n\t\t\t\t// let rightEndPoint = this.baseWidth - this.measures.margins.left - this.measures.margins.right;\n\t\t\t\t// let multiplier = s.datasets.length - i;\n\t\t\t\tlet rect = legendBar(\n\t\t\t\t\t// rightEndPoint - multiplier * barWidth,\t// To right align\n\t\t\t\t\tbarWidth * i,\n\t\t\t\t\t'0',\n\t\t\t\t\tbarWidth,\n\t\t\t\t\tthis.colors[i],\n\t\t\t\t\td.name,\n\t\t\t\t\tthis.config.truncateLegends);\n\t\t\t\tthis.legendArea.appendChild(rect);\n\t\t\t});\n\t\t}\n\t}\n\n\n\n\t// Overlay\n\tmakeOverlay() {\n\t\tif(this.init) {\n\t\t\tthis.init = 0;\n\t\t\treturn;\n\t\t}\n\t\tif(this.overlayGuides) {\n\t\t\tthis.overlayGuides.forEach(g => {\n\t\t\t\tlet o = g.overlay;\n\t\t\t\to.parentNode.removeChild(o);\n\t\t\t});\n\t\t}\n\n\t\tthis.overlayGuides = this.dataUnitComponents.map(c => {\n\t\t\treturn {\n\t\t\t\ttype: c.unitType,\n\t\t\t\toverlay: undefined,\n\t\t\t\tunits: c.units,\n\t\t\t};\n\t\t});\n\n\t\tif(this.state.currentIndex === undefined) {\n\t\t\tthis.state.currentIndex = this.state.datasetLength - 1;\n\t\t}\n\n\t\t// Render overlays\n\t\tthis.overlayGuides.map(d => {\n\t\t\tlet currentUnit = d.units[this.state.currentIndex];\n\n\t\t\td.overlay = makeOverlay[d.type](currentUnit);\n\t\t\tthis.drawArea.appendChild(d.overlay);\n\t\t});\n\t}\n\n\tupdateOverlayGuides() {\n\t\tif(this.overlayGuides) {\n\t\t\tthis.overlayGuides.forEach(g => {\n\t\t\t\tlet o = g.overlay;\n\t\t\t\to.parentNode.removeChild(o);\n\t\t\t});\n\t\t}\n\t}\n\n\tbindOverlay() {\n\t\tthis.parent.addEventListener('data-select', () => {\n\t\t\tthis.updateOverlay();\n\t\t});\n\t}\n\n\tbindUnits() {\n\t\tthis.dataUnitComponents.map(c => {\n\t\t\tc.units.map(unit => {\n\t\t\t\tunit.addEventListener('click', () => {\n\t\t\t\t\tlet index = unit.getAttribute('data-point-index');\n\t\t\t\t\tthis.setCurrentDataPoint(index);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\t// Note: Doesn't work as tooltip is absolutely positioned\n\t\tthis.tip.container.addEventListener('click', () => {\n\t\t\tlet index = this.tip.container.getAttribute('data-point-index');\n\t\t\tthis.setCurrentDataPoint(index);\n\t\t});\n\t}\n\n\tupdateOverlay() {\n\t\tthis.overlayGuides.map(d => {\n\t\t\tlet currentUnit = d.units[this.state.currentIndex];\n\t\t\tupdateOverlay[d.type](currentUnit, d.overlay);\n\t\t});\n\t}\n\n\tonLeftArrow() {\n\t\tthis.setCurrentDataPoint(this.state.currentIndex - 1);\n\t}\n\n\tonRightArrow() {\n\t\tthis.setCurrentDataPoint(this.state.currentIndex + 1);\n\t}\n\n\tgetDataPoint(index=this.state.currentIndex) {\n\t\tlet s = this.state;\n\t\tlet data_point = {\n\t\t\tindex: index,\n\t\t\tlabel: s.xAxis.labels[index],\n\t\t\tvalues: s.datasets.map(d => d.values[index])\n\t\t};\n\t\treturn data_point;\n\t}\n\n\tsetCurrentDataPoint(index) {\n\t\tlet s = this.state;\n\t\tindex = parseInt(index);\n\t\tif(index < 0) index = 0;\n\t\tif(index >= s.xAxis.labels.length) index = s.xAxis.labels.length - 1;\n\t\tif(index === s.currentIndex) return;\n\t\ts.currentIndex = index;\n\t\tfire(this.parent, \"data-select\", this.getDataPoint());\n\t}\n\n\n\n\t// API\n\taddDataPoint(label, datasetValues, index=this.state.datasetLength) {\n\t\tsuper.addDataPoint(label, datasetValues, index);\n\t\tthis.data.labels.splice(index, 0, label);\n\t\tthis.data.datasets.map((d, i) => {\n\t\t\td.values.splice(index, 0, datasetValues[i]);\n\t\t});\n\t\tthis.update(this.data);\n\t}\n\n\tremoveDataPoint(index = this.state.datasetLength-1) {\n\t\tif (this.data.labels.length <= 1) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.removeDataPoint(index);\n\t\tthis.data.labels.splice(index, 1);\n\t\tthis.data.datasets.map(d => {\n\t\t\td.values.splice(index, 1);\n\t\t});\n\t\tthis.update(this.data);\n\t}\n\n\tupdateDataset(datasetValues, index=0) {\n\t\tthis.data.datasets[index].values = datasetValues;\n\t\tthis.update(this.data);\n\t}\n\t// addDataset(dataset, index) {}\n\t// removeDataset(index = 0) {}\n\n\tupdateDatasets(datasets) {\n\t\tthis.data.datasets.map((d, i) => {\n\t\t\tif(datasets[i]) {\n\t\t\t\td.values = datasets[i];\n\t\t\t}\n\t\t});\n\t\tthis.update(this.data);\n\t}\n\n\t// updateDataPoint(dataPoint, index = 0) {}\n\t// addDataPoint(dataPoint, index = 0) {}\n\t// removeDataPoint(index = 0) {}\n}\n","import AggregationChart from './AggregationChart';\nimport { getComponent } from '../objects/ChartComponents';\nimport { getOffset } from '../utils/dom';\nimport { getPositionByAngle } from '../utils/helpers';\nimport { makeArcStrokePathStr, makeStrokeCircleStr } from '../utils/draw';\nimport { lightenDarkenColor } from '../utils/colors';\nimport { transform } from '../utils/animation';\nimport { FULL_ANGLE } from '../utils/constants';\n\nexport default class DonutChart extends AggregationChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t\tthis.type = 'donut';\n\t\tthis.initTimeout = 0;\n\t\tthis.init = 1;\n\n\t\tthis.setup();\n\t}\n\n\tconfigure(args) {\n\t\tsuper.configure(args);\n\t\tthis.mouseMove = this.mouseMove.bind(this);\n\t\tthis.mouseLeave = this.mouseLeave.bind(this);\n\n\t\tthis.hoverRadio = args.hoverRadio || 0.1;\n\t\tthis.config.startAngle = args.startAngle || 0;\n\n\t\tthis.clockWise = args.clockWise || false;\n\t\tthis.strokeWidth = args.strokeWidth || 30;\n\t}\n\n\tcalc() {\n\t\tsuper.calc();\n\t\tlet s = this.state;\n\t\tthis.radius =\n\t\t\tthis.height > this.width\n\t\t\t\t? this.center.x - this.strokeWidth / 2\n\t\t\t\t: this.center.y - this.strokeWidth / 2;\n\n\t\tconst { radius, clockWise } = this;\n\n\t\tconst prevSlicesProperties = s.slicesProperties || [];\n\t\ts.sliceStrings = [];\n\t\ts.slicesProperties = [];\n\t\tlet curAngle = 180 - this.config.startAngle;\n\n\t\ts.sliceTotals.map((total, i) => {\n\t\t\tconst startAngle = curAngle;\n\t\t\tconst originDiffAngle = (total / s.grandTotal) * FULL_ANGLE;\n\t\t\tconst largeArc = originDiffAngle > 180 ? 1: 0;\n\t\t\tconst diffAngle = clockWise ? -originDiffAngle : originDiffAngle;\n\t\t\tconst endAngle = curAngle = curAngle + diffAngle;\n\t\t\tconst startPosition = getPositionByAngle(startAngle, radius);\n\t\t\tconst endPosition = getPositionByAngle(endAngle, radius);\n\n\t\t\tconst prevProperty = this.init && prevSlicesProperties[i];\n\n\t\t\tlet curStart,curEnd;\n\t\t\tif(this.init) {\n\t\t\t\tcurStart = prevProperty ? prevProperty.startPosition : startPosition;\n\t\t\t\tcurEnd = prevProperty ? prevProperty.endPosition : startPosition;\n\t\t\t} else {\n\t\t\t\tcurStart = startPosition;\n\t\t\t\tcurEnd = endPosition;\n\t\t\t}\n\t\t\tconst curPath =\n\t\t\t\toriginDiffAngle === 360\n\t\t\t\t\t? makeStrokeCircleStr(curStart, curEnd, this.center, this.radius, this.clockWise, largeArc)\n\t\t\t\t\t: makeArcStrokePathStr(curStart, curEnd, this.center, this.radius, this.clockWise, largeArc);\n\n\t\t\ts.sliceStrings.push(curPath);\n\t\t\ts.slicesProperties.push({\n\t\t\t\tstartPosition,\n\t\t\t\tendPosition,\n\t\t\t\tvalue: total,\n\t\t\t\ttotal: s.grandTotal,\n\t\t\t\tstartAngle,\n\t\t\t\tendAngle,\n\t\t\t\tangle: diffAngle\n\t\t\t});\n\n\t\t});\n\t\tthis.init = 0;\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'donutSlices',\n\t\t\t\t{ },\n\t\t\t\tfunction() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsliceStrings: s.sliceStrings,\n\t\t\t\t\t\tcolors: this.colors,\n\t\t\t\t\t\tstrokeWidth: this.strokeWidth,\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tcalTranslateByAngle(property){\n\t\tconst{ radius, hoverRadio } = this;\n\t\tconst position = getPositionByAngle(property.startAngle+(property.angle / 2),radius);\n\t\treturn `translate3d(${(position.x) * hoverRadio}px,${(position.y) * hoverRadio}px,0)`;\n\t}\n\n\thoverSlice(path,i,flag,e){\n\t\tif(!path) return;\n\t\tconst color = this.colors[i];\n\t\tif(flag) {\n\t\t\ttransform(path, this.calTranslateByAngle(this.state.slicesProperties[i]));\n\t\t\tpath.style.stroke = lightenDarkenColor(color, 50);\n\t\t\tlet g_off = getOffset(this.svg);\n\t\t\tlet x = e.pageX - g_off.left + 10;\n\t\t\tlet y = e.pageY - g_off.top - 10;\n\t\t\tlet title = (this.formatted_labels && this.formatted_labels.length > 0\n\t\t\t\t? this.formatted_labels[i] : this.state.labels[i]) + ': ';\n\t\t\tlet percent = (this.state.sliceTotals[i] * 100 / this.state.grandTotal).toFixed(1);\n\t\t\tthis.tip.setValues(x, y, {name: title, value: percent + \"%\"});\n\t\t\tthis.tip.showTip();\n\t\t} else {\n\t\t\ttransform(path,'translate3d(0,0,0)');\n\t\t\tthis.tip.hideTip();\n\t\t\tpath.style.stroke = color;\n\t\t}\n\t}\n\n\tbindTooltip() {\n\t\tthis.container.addEventListener('mousemove', this.mouseMove);\n\t\tthis.container.addEventListener('mouseleave', this.mouseLeave);\n\t}\n\n\tmouseMove(e){\n\t\tconst target = e.target;\n\t\tlet slices = this.components.get('donutSlices').store;\n\t\tlet prevIndex = this.curActiveSliceIndex;\n\t\tlet prevAcitve = this.curActiveSlice;\n\t\tif(slices.includes(target)) {\n\t\t\tlet i = slices.indexOf(target);\n\t\t\tthis.hoverSlice(prevAcitve, prevIndex,false);\n\t\t\tthis.curActiveSlice = target;\n\t\t\tthis.curActiveSliceIndex = i;\n\t\t\tthis.hoverSlice(target, i, true, e);\n\t\t} else {\n\t\t\tthis.mouseLeave();\n\t\t}\n\t}\n\n\tmouseLeave(){\n\t\tthis.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,false);\n\t}\n}\n","import '../css/charts.scss';\n\n// import MultiAxisChart from './charts/MultiAxisChart';\nimport PercentageChart from './charts/PercentageChart';\nimport PieChart from './charts/PieChart';\nimport Heatmap from './charts/Heatmap';\nimport AxisChart from './charts/AxisChart';\nimport DonutChart from './charts/DonutChart';\n\nconst chartTypes = {\n\tbar: AxisChart,\n\tline: AxisChart,\n\t// multiaxis: MultiAxisChart,\n\tpercentage: PercentageChart,\n\theatmap: Heatmap,\n\tpie: PieChart,\n\tdonut: DonutChart,\n};\n\nfunction getChartByType(chartType = 'line', parent, options) {\n\tif (chartType === 'axis-mixed') {\n\t\toptions.type = 'line';\n\t\treturn new AxisChart(parent, options);\n\t}\n\n\tif (!chartTypes[chartType]) {\n\t\tconsole.error(\"Undefined chart type: \" + chartType);\n\t\treturn;\n\t}\n\n\treturn new chartTypes[chartType](parent, options);\n}\n\nclass Chart {\n\tconstructor(parent, options) {\n\t\treturn getChartByType(options.type, parent, options);\n\t}\n}\n\nexport { Chart, PercentageChart, PieChart, Heatmap, AxisChart };","import * as Charts from './chart';\n\nlet frappe = { };\n\nfrappe.NAME = 'Frappe Charts';\nfrappe.VERSION = '1.6.2';\n\nfrappe = Object.assign({ }, frappe, Charts);\n\nexport default frappe;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/DashboardPage'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/DashboardWidget'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/abbreviateNumber'];","import app from 'flarum/admin/app';\n\nimport DashboardWidget, { IDashboardWidgetAttrs } from 'flarum/admin/components/DashboardWidget';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Link from 'flarum/common/components/Link';\n\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\n\nimport type Mithril from 'mithril';\n\nexport default class MiniStatisticsWidget extends DashboardWidget {\n entities = ['users', 'discussions', 'posts'];\n\n lifetimeData: any;\n\n loadingLifetime = true;\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.loadLifetimeData();\n }\n\n async loadLifetimeData() {\n this.loadingLifetime = true;\n m.redraw();\n\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'lifetime',\n },\n });\n\n this.lifetimeData = data;\n this.loadingLifetime = false;\n\n m.redraw();\n }\n\n className() {\n return 'StatisticsWidget StatisticsWidget--mini';\n }\n\n content() {\n return (\n
        \n

        {app.translator.trans('flarum-statistics.admin.statistics.mini_heading')}

        \n\n
        \n
        \n
        {app.translator.trans('flarum-statistics.admin.statistics.total_label')}
        \n
        \n\n {this.entities.map((entity) => {\n const totalCount = this.loadingLifetime ? app.translator.trans('flarum-statistics.admin.statistics.loading') : this.getTotalCount(entity);\n\n return (\n
        \n

        {app.translator.trans('flarum-statistics.admin.statistics.' + entity + '_heading')}

        \n
        \n {this.loadingLifetime ? : abbreviateNumber(totalCount as number)}\n
        \n
        \n );\n })}\n
        \n\n
        \n \n {app.translator.trans('flarum-statistics.admin.statistics.view_full')}\n \n
        \n
        \n );\n }\n\n getTotalCount(entity: string): number {\n return this.lifetimeData[entity];\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/SelectDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Placeholder'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/utils/generateElementId'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","import app from 'flarum/admin/app';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport generateElementId from 'flarum/admin/utils/generateElementId';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\n\nimport Mithril from 'mithril';\nimport Button from 'flarum/common/components/Button';\n\nimport dayjs from 'dayjs';\nimport dayjsUtc from 'dayjs/plugin/utc';\n\ndayjs.extend(dayjsUtc);\n\nexport interface IDateSelection {\n /**\n * Timestamp (seconds, not ms) for start date\n */\n start: number;\n /**\n * Timestamp (seconds, not ms) for end date\n */\n end: number;\n}\n\nexport interface IStatisticsWidgetDateSelectionModalAttrs extends IInternalModalAttrs {\n onModalSubmit: (dates: IDateSelection) => void;\n value?: IDateSelection;\n}\n\ninterface IStatisticsWidgetDateSelectionModalState {\n inputs: {\n startDateVal: string;\n endDateVal: string;\n };\n ids: {\n startDate: string;\n endDate: string;\n };\n}\n\nexport default class StatisticsWidgetDateSelectionModal extends Modal {\n /* @ts-expect-error core typings don't allow us to set the type of the state attr :( */\n state: IStatisticsWidgetDateSelectionModalState = {\n inputs: {\n startDateVal: dayjs().format('YYYY-MM-DD'),\n endDateVal: dayjs().format('YYYY-MM-DD'),\n },\n ids: {\n startDate: generateElementId(),\n endDate: generateElementId(),\n },\n };\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (this.attrs.value) {\n this.state.inputs = {\n startDateVal: dayjs.utc(this.attrs.value.start * 1000).format('YYYY-MM-DD'),\n endDateVal: dayjs.utc(this.attrs.value.end * 1000).format('YYYY-MM-DD'),\n };\n }\n }\n\n className(): string {\n return 'StatisticsWidgetDateSelectionModal Modal--small';\n }\n\n title(): Mithril.Children {\n return app.translator.trans('flarum-statistics.admin.date_selection_modal.title');\n }\n\n content(): Mithril.Children {\n return
        {this.items().toArray()}
        ;\n }\n\n items(): ItemList {\n const items = new ItemList();\n\n items.add('intro',

        {app.translator.trans('flarum-statistics.admin.date_selection_modal.description')}

        , 100);\n\n items.add(\n 'date_start',\n
        \n \n \n
        ,\n 90\n );\n\n items.add(\n 'date_end',\n
        \n \n \n
        ,\n 80\n );\n\n items.add(\n 'submit',\n ,\n 0\n );\n\n return items;\n }\n\n updateState(field: keyof IStatisticsWidgetDateSelectionModalState['inputs']): (e: InputEvent) => void {\n return (e: InputEvent) => {\n this.state.inputs[field] = (e.currentTarget as HTMLInputElement).value;\n };\n }\n\n submitData(): IDateSelection {\n // We force 'zulu' time (UTC)\n return {\n start: Math.floor(+dayjs.utc(this.state.inputs.startDateVal + 'Z') / 1000),\n // Ensures that the end date is the end of the day\n end: Math.floor(\n +dayjs\n .utc(this.state.inputs.endDateVal + 'Z')\n .hour(23)\n .minute(59)\n .second(59)\n .millisecond(999) / 1000\n ),\n };\n }\n\n onsubmit(e: SubmitEvent): void {\n e.preventDefault();\n\n const data = this.submitData();\n\n if (data.end < data.start) {\n this.alertAttrs = {\n type: 'error',\n controls: app.translator.trans('flarum-statistics.admin.date_selection_modal.errors.end_before_start'),\n };\n return;\n }\n\n this.attrs.onModalSubmit(data);\n this.hide();\n }\n}\n","import app from 'flarum/admin/app';\n\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport Button from 'flarum/common/components/Button';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\nimport extractText from 'flarum/common/utils/extractText';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport icon from 'flarum/common/helpers/icon';\n\nimport DashboardWidget, { IDashboardWidgetAttrs } from 'flarum/admin/components/DashboardWidget';\n\nimport StatisticsWidgetDateSelectionModal, { IDateSelection, IStatisticsWidgetDateSelectionModalAttrs } from './StatisticsWidgetDateSelectionModal';\n\nimport type Mithril from 'mithril';\n\nimport dayjs from 'dayjs';\nimport dayjsUtc from 'dayjs/plugin/utc';\nimport dayjsLocalizedFormat from 'dayjs/plugin/localizedFormat';\n// @ts-expect-error No typings available\nimport { Chart } from 'frappe-charts';\n\ndayjs.extend(dayjsUtc);\ndayjs.extend(dayjsLocalizedFormat);\n\ninterface IPeriodDeclaration {\n start: number;\n end: number;\n step: number;\n}\n\nexport default class StatisticsWidget extends DashboardWidget {\n entities = ['users', 'discussions', 'posts'];\n periods: undefined | Record;\n\n chart: any;\n\n customPeriod: IDateSelection | null = null;\n\n timedData: Record = {};\n lifetimeData: any;\n customPeriodData: Record = {};\n\n noData: boolean = false;\n\n loadingLifetime = true;\n loadingTimed: Record = this.entities.reduce((acc, curr) => {\n acc[curr] = 'unloaded';\n return acc;\n }, {} as Record);\n loadingCustom: Record = this.entities.reduce((acc, curr) => {\n acc[curr] = 'unloaded';\n return acc;\n }, {} as Record);\n\n selectedEntity = 'users';\n selectedPeriod: undefined | string;\n\n chartEntity?: string;\n chartPeriod?: string;\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.loadLifetimeData();\n }\n\n async loadLifetimeData() {\n this.loadingLifetime = true;\n m.redraw();\n\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'lifetime',\n },\n });\n\n this.lifetimeData = data;\n this.loadingLifetime = false;\n\n m.redraw();\n }\n\n async loadTimedData(model: string) {\n this.loadingTimed[model] = 'loading';\n m.redraw();\n\n try {\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'timed',\n model,\n },\n });\n\n this.timedData[model] = data;\n this.loadingTimed[model] = 'loaded';\n\n // Create a Date object which represents the start of the day.\n let todayDate = new Date();\n todayDate.setUTCHours(0, 0, 0, 0);\n\n const today = todayDate.getTime() / 1000;\n\n this.periods = {\n today: { start: today, end: today + 86400, step: 3600 },\n last_7_days: { start: today - 86400 * 7, end: today, step: 86400 },\n previous_7_days: { start: today - 86400 * 14, end: today - 86400 * 7, step: 86400 },\n last_28_days: { start: today - 86400 * 28, end: today, step: 86400 },\n previous_28_days: { start: today - 86400 * 28 * 2, end: today - 86400 * 28, step: 86400 },\n last_12_months: { start: today - 86400 * 364, end: today, step: 86400 * 7 },\n };\n\n this.selectedPeriod = 'last_7_days';\n } catch (e) {\n console.error(e);\n this.loadingTimed[model] = 'fail';\n }\n\n m.redraw();\n }\n\n async loadCustomRangeData(model: string): Promise {\n this.loadingCustom[model] = 'loading';\n m.redraw();\n\n // We clone so we can check that the same period is still selected\n // once the HTTP request is complete and the data is to be displayed\n const range = { ...this.customPeriod };\n try {\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'custom',\n model,\n dateRange: {\n start: range.start,\n end: range.end,\n },\n },\n });\n\n if (JSON.stringify(range) !== JSON.stringify(this.customPeriod)) {\n // The range this method was called with is no longer the selected.\n // Bail out here.\n return;\n }\n\n this.customPeriodData[model] = data;\n this.loadingCustom[model] = 'loaded';\n\n m.redraw();\n } catch (e) {\n if (JSON.stringify(range) !== JSON.stringify(this.customPeriod)) {\n // The range this method was called with is no longer the selected.\n // Bail out here.\n return;\n }\n\n console.error(e);\n this.loadingCustom[model] = 'fail';\n }\n }\n\n className() {\n return 'StatisticsWidget';\n }\n\n content() {\n const loadingSelectedEntity = (this.selectedPeriod === 'custom' ? this.loadingCustom : this.loadingTimed)[this.selectedEntity] !== 'loaded';\n\n const thisPeriod = loadingSelectedEntity\n ? null\n : this.selectedPeriod === 'custom'\n ? {\n start: this.customPeriod?.end!,\n end: this.customPeriod?.end!,\n step: 86400,\n }\n : this.periods![this.selectedPeriod!];\n\n if (this.selectedPeriod === 'custom') {\n if (!this.customPeriodData[this.selectedEntity] && this.loadingCustom[this.selectedEntity] === 'unloaded') {\n this.loadCustomRangeData(this.selectedEntity);\n }\n } else {\n if (!this.timedData[this.selectedEntity] && this.loadingTimed[this.selectedEntity] === 'unloaded') {\n this.loadTimedData(this.selectedEntity);\n }\n }\n\n return (\n
        \n
        \n
        \n
        {app.translator.trans('flarum-statistics.admin.statistics.total_label')}
        \n
        \n {loadingSelectedEntity ? (\n \n ) : (\n \n {Object.keys(this.periods!)\n .map((period) => (\n \n {app.translator.trans(`flarum-statistics.admin.statistics.${period}_label`)}\n \n ))\n .concat([\n {\n const attrs: IStatisticsWidgetDateSelectionModalAttrs = {\n onModalSubmit: (dates: IDateSelection) => {\n if (JSON.stringify(dates) === JSON.stringify(this.customPeriod)) {\n // If same period is selected, don't reload data\n return;\n }\n\n this.customPeriodData = {};\n Object.keys(this.loadingCustom).forEach((k) => (this.loadingCustom[k] = 'unloaded'));\n this.customPeriod = dates;\n this.changePeriod('custom');\n },\n } as any;\n\n // If we have a custom period set already,\n // let's prefill the modal with it\n if (this.customPeriod) {\n attrs.value = this.customPeriod;\n }\n\n app.modal.show(StatisticsWidgetDateSelectionModal as any, attrs as any);\n }}\n icon={this.selectedPeriod === 'custom' ? 'fas fa-check' : true}\n >\n {this.selectedPeriod === 'custom'\n ? extractText(\n app.translator.trans(`flarum-statistics.admin.statistics.custom_label_specified`, {\n fromDate: dayjs.utc(this.customPeriod!.start! * 1000).format('ll'),\n toDate: dayjs.utc(this.customPeriod!.end! * 1000).format('ll'),\n })\n )\n : app.translator.trans(`flarum-statistics.admin.statistics.custom_label`)}\n ,\n ])}\n \n )}\n
        \n
        \n\n {this.entities.map((entity) => {\n const totalCount = this.loadingLifetime ? app.translator.trans('flarum-statistics.admin.statistics.loading') : this.getTotalCount(entity);\n const thisPeriodCount = loadingSelectedEntity\n ? app.translator.trans('flarum-statistics.admin.statistics.loading')\n : this.getPeriodCount(entity, thisPeriod!);\n const lastPeriodCount =\n this.selectedPeriod === 'custom'\n ? null\n : loadingSelectedEntity\n ? app.translator.trans('flarum-statistics.admin.statistics.loading')\n : this.getPeriodCount(entity, this.getLastPeriod(thisPeriod!));\n const periodChange =\n loadingSelectedEntity || lastPeriodCount === 0 || lastPeriodCount === null\n ? 0\n : (((thisPeriodCount as number) - (lastPeriodCount as number)) / (lastPeriodCount as number)) * 100;\n\n return (\n \n

        {app.translator.trans('flarum-statistics.admin.statistics.' + entity + '_heading')}

        \n
        \n {this.loadingLifetime ? : abbreviateNumber(totalCount as number)}\n
        \n
        \n {loadingSelectedEntity ? : abbreviateNumber(thisPeriodCount as number)}\n {periodChange !== 0 && (\n <>\n {' '}\n 0 ? 'up' : 'down')}>\n {icon('fas fa-arrow-' + (periodChange > 0 ? 'up' : 'down'))}\n {Math.abs(periodChange).toFixed(1)}%\n \n \n )}\n
        \n \n );\n })}\n
        \n\n <>\n {loadingSelectedEntity ? (\n
        \n \n
        \n ) : (\n \n )}\n \n\n {this.noData && }\n\n {!this.noData && !!this.chart && (\n {\n this.chart.export();\n }}\n >\n {app.translator.trans('flarum-statistics.admin.statistics.export_chart_button')}\n \n )}\n
        \n );\n }\n\n drawChart(vnode: Mithril.VnodeDOM) {\n if (this.chart && this.chartEntity === this.selectedEntity && this.chartPeriod === this.selectedPeriod) {\n return;\n }\n\n const period =\n this.selectedPeriod === 'custom'\n ? {\n start: this.customPeriod?.start!,\n end: this.customPeriod?.end!,\n step: 86400,\n }\n : this.periods![this.selectedPeriod!];\n const periodLength = period.end - period.start;\n const labels: string[] = [];\n const thisPeriod = [];\n const lastPeriod = [];\n\n for (let i = period.start; i < period.end; i += period.step) {\n let label;\n\n if (period.step < 86400) {\n label = dayjs.unix(i).utc().format('h A');\n } else {\n label = dayjs.unix(i).utc().format('D MMM');\n\n if (period.step > 86400) {\n label +=\n ' - ' +\n dayjs\n .unix(i + period.step - 1)\n .utc()\n .format('D MMM');\n }\n }\n\n labels.push(label);\n\n thisPeriod.push(this.getPeriodCount(this.selectedEntity, { start: i, end: i + period.step }));\n lastPeriod.push(this.getPeriodCount(this.selectedEntity, { start: i - periodLength, end: i - periodLength }));\n }\n\n if (thisPeriod.length === 0) {\n this.noData = true;\n m.redraw();\n return;\n } else {\n this.noData = false;\n m.redraw();\n }\n\n const datasets = [\n {\n name: extractText(app.translator.trans('flarum-statistics.admin.statistics.current_period')),\n values: thisPeriod,\n },\n {\n name: extractText(app.translator.trans('flarum-statistics.admin.statistics.previous_period')),\n values: lastPeriod,\n },\n ];\n const data = {\n labels,\n datasets,\n };\n\n // If the dom element no longer exists, recreate the chart\n // https://stackoverflow.com/a/2620373/11091039\n if (!this.chart || !(document.compareDocumentPosition(this.chart.parent) & 16)) {\n this.chart = new Chart(vnode.dom, {\n data,\n type: 'line',\n height: 280,\n axisOptions: {\n xAxisMode: 'tick',\n yAxisMode: 'span',\n xIsSeries: true,\n },\n lineOptions: {\n hideDots: 1,\n regionFill: 1,\n },\n colors: [app.forum.attribute('themePrimaryColor'), 'black'],\n });\n } else {\n this.chart.update(data);\n }\n\n this.chartEntity = this.selectedEntity;\n this.chartPeriod = this.selectedPeriod;\n }\n\n changeEntity(entity: string) {\n this.selectedEntity = entity;\n }\n\n changePeriod(period: string) {\n this.selectedPeriod = period;\n }\n\n getTotalCount(entity: string): number {\n return this.lifetimeData[entity];\n }\n\n getPeriodCount(entity: string, period: { start: number; end: number }) {\n const timed: Record = (this.selectedPeriod === 'custom' ? this.customPeriodData : this.timedData)[entity];\n let count = 0;\n\n for (const t in timed) {\n const time = parseInt(t);\n\n if (time >= period.start && time < period.end) {\n count += timed[time];\n }\n }\n\n return count;\n }\n\n getLastPeriod(thisPeriod: { start: number; end: number }) {\n return {\n start: thisPeriod.start - (thisPeriod.end - thisPeriod.start),\n end: thisPeriod.start,\n };\n }\n}\n","import ExtensionPage from 'flarum/admin/components/ExtensionPage';\n\nimport StatisticsWidget from './StatisticsWidget';\n\nexport default class StatisticsPage extends ExtensionPage {\n content() {\n return (\n
        \n
        \n \n
        \n
        \n );\n }\n}\n","import app from 'flarum/admin/app';\nimport { extend } from 'flarum/common/extend';\n\nimport DashboardPage from 'flarum/admin/components/DashboardPage';\n\nimport MiniStatisticsWidget from './components/MiniStatisticsWidget';\nimport StatisticsPage from './components/StatisticsPage';\n\napp.initializers.add('flarum-statistics', () => {\n extend(DashboardPage.prototype, 'availableWidgets', function (widgets) {\n widgets.add('statistics', , 20);\n });\n\n app.extensionData.for('flarum-statistics').registerPage(StatisticsPage);\n});\n"],"names":["module","exports","e","n","r","i","s","u","a","o","f","h","c","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","_","S","args","arguments","O","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","forEach","extend","$i","isDayjs","en","Ls","LTS","LT","L","LL","LLL","LLLL","formats","toUpperCase","call","local","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","expr","con","document","querySelector","getOffset","element","rect","getBoundingClientRect","top","documentElement","scrollTop","body","left","scrollLeft","isHidden","el","offsetParent","isElementInViewport","bottom","window","innerHeight","clientHeight","right","innerWidth","clientWidth","getTopOffset","titleHeight","margins","paddings","getLeftOffset","getExtraHeight","legendHeight","getExtraWidth","floatTwo","parseFloat","toFixed","fillArray","array","count","start","fillerArray","fill","concat","getStringWidth","string","charWidth","getPositionByAngle","angle","radius","sin","ANGLE_RATIO","cos","isValidNumber","candidate","nonNegative","isNaN","isFinite","deepClone","cloned","value","key","isArray","getBarHeightAndYAttr","yTop","zeroLine","height","equilizeNoOfElements","array1","array2","extraCount","truncateString","txt","len","shortenLargeNumber","label","number","log10","shortened","pow","getSplineCurvePointsStr","xList","yList","points","push","controlPoint","current","previous","next","reverse","pointA","pointB","lengthX","lengthY","sqrt","atan2","line","PI","command","reduce","acc","point","cps","cpe","limitColor","lightenDarkenColor","color","amt","col","getColor","usePound","num","parseInt","b","createSVG","tag","createElementNS","val","appendChild","ref","parentNode","insertBefore","keys","map","style","prop","textContent","setAttribute","renderVerticalGradient","svgDefElem","gradientId","inside","x2","y1","y2","setGradientStop","gradElem","offset","opacity","makeSVGGroup","className","parent","transform","makePath","pathStr","makeGradient","lighter","gradientDef","opacities","heatSquare","size","data","makeText","content","options","fontSize","FONT_SIZE","dy","FONT_FILL","textAnchor","innerHTML","makeVertLine","stroke","BASE_LINE_COLOR","text","LABEL_MARGIN","makeHoriLine","x1","lineType","shortenNumbers","styles","translate","unit","oldCoord","newCoord","duration","old","STD_EASING","translateHoriLine","yLine","newY","oldY","MARKER_LINE_ANIM_DUR","animateBar","bar","width","nodeName","childNodes","UNIT_ANIM_DUR","getAttribute","animatePathStr","oldPath","animateSVGElement","props","dur","easingType","type","oldValues","animElement","cloneNode","newElement","attributeName","animateElement","currentValue","animAttr","values","EASING","calcMode","webkitTransform","msTransform","mozTransform","oTransform","animateSVG","svgContainer","elements","newElements","animElements","replaceChild","animSvg","runSMILAnimation","svgElement","elementsToAnimate","animSvgElement","removeChild","REPLACE_ALL_NEW_DUR","prepareForExport","svg","classList","styleEl","create","CSSTEXT","firstChild","container","treatAsUtc","result","setMinutes","getYyyyMmDd","getWeeksBetween","startDate","endDate","weekStartDate","setDayToSunday","millisecondsPerDay","SEC_IN_DAY","NO_OF_MILLIS","getDaysBetween","NO_OF_DAYS_IN_WEEK","areInSameMonth","getMonthName","short","monthName","MONTH_NAMES","getLastDateInMonth","newDate","day","addDays","numberOfDays","setDate","getComponent","constants","getData","Object","componentConfigs","filter","includes","k","config","assign","ChartComponent","normalize","mantissa","exponent","sig","exp","getChartRangeIntervals","max","upperBound","lowerBound","range","noOfParts","partSize","intervals","getChartIntervals","maxValue","minValue","normalMaxValue","normalMinValue","calcChartIntervals","getPositiveFirstIntervals","absMinValue","intervalSize","unshift","withMinimum","pseudoMaxValue","pseudoMinValue","getZeroIndex","yPts","interval","getIntervalSize","indexOf","orderedArray","getValueRange","scale","yAxis","scaleMultiplier","getMaxCheckpoint","distribution","dataPrep","labels","datasetLength","datasets","zeroArray","vals","chartType","AXIS_DATASET_CHART_TYPES","yRegions","end","zeroDataPrep","realData","zeroData","yMarkers","css","insertAt","head","getElementsByTagName","createElement","styleSheet","cssText","createTextNode","BASE_MEASURES","baseHeight","titleFontSize","PERCENTAGE_BAR_DEFAULT_DEPTH","DEFAULT_CHAR_WIDTH","DEFAULT_CHART_COLORS","DEFAULT_COLORS","donut","SvgTip","colors","titleName","titleValue","listValues","titleValueFirst","setup","makeTooltip","calcPosition","hideTip","title","dataPointList","addEventListener","index","_this2","formatted","li","offsetWidth","offsetHeight","maxLeft","pointer","pointerOffset","valueFirst","refresh","PRESET_COLOR_MAP","blue","violet","red","orange","yellow","green","purple","magenta","black","grey","exec","ch","AXIS_TICK_LENGTH","LABEL_MAX_CHARS","makeOverlay","transformValue","overlay","updateOverlay","attributes","attr","specified","nodeValue","PATH_ANIM_DUR","linear","easein","easeout","easeinout","BaseChart","HTMLElement","Error","rawChartArgs","prepareData","prepareFirstData","validateColors","showLegend","isNavigable","animate","truncateLegends","measures","JSON","stringify","setMeasures","argHeight","state","initTimeout","overlays","configure","validColors","isValidColor","warn","boundDrawFn","_this","draw","ResizeObserver","resizeObserver","observe","disconnect","removeEventListener","makeContainer","updateWidth","independentWidth","tip","bindTooltip","onlyWidthChange","calc","makeChartArea","setupComponents","components","drawArea","render","update","renderLegend","setupNavigation","baseWidth","getComputedStyle","padding","paddingLeft","paddingRight","getElementContentWidth","makeSVGContainer","svgDefs","makeSVGDefs","titleEL","legendArea","updateTipOffset","Map","error","make","updateNav","bindUnits","bindOverlay","keyActions","onEnterKey","bind","onLeftArrow","onUpArrow","onRightArrow","onDownArrow","_this4","event","keyCode","chartSvg","filename","blob","Blob","url","URL","createObjectURL","href","download","click","revokeObjectURL","AggregationChart","formatTooltipY","tooltipOptions","maxSlices","maxLegendPoints","sliceTotals","allTotals","total","totals","sort","sumOfRemaining","grandTotal","center","legendTotals","barWidth","divisor","_this3","dot","cx","cy","dx","group","legendDot","DAY_NAMES_SHORT","layerClass","layerTransform","makeElements","animateElements","store","layer","oldData","sliceStrings","strokeWidth","transition","newData","xPositions","depth","percentageBar","widths","barHeight","barDepth","positions","position","pos","mode","newPos","newLabels","oldPos","oldLabels","xLine","calcLabels","newX","oldX","translateVertLine","labelPos","labelSvg","yMarker","_this5","newOptions","region","yRegion","startPos","endPos","_this6","newStarts","oldStarts","rectGroup","newY1","newY2","oldY2","newHeight","stroke-dasharray","animateRegion","colWidth","rowHeight","squareSize","xTranslate","serializedSubDomains","cols","week","weekNo","yyyyMmDd","dataValue","square","barGraph","unitType","units","yPositions","j","meta","minHeight","datasetBar","offsets","barsWidth","newXPos","newYPos","newOffsets","oldXPos","oldYPos","oldOffsets","paths","hideLine","pointsStr","spline","path","heatline","gradient_id","regionFill","gradient_id_region","getPaths","hideDots","datasetDot","valuesOverPoints","newValues","newXList","newYList","pathComponents","animPath","regStartPt","regEndPt","animRegion","animatePath","animateDot","PercentageChart","barOptions","component","xPos","bars","target","gOff","pOff","formattedLabels","fraction","setValues","showTip","PieChart","mouseMove","mouseLeave","hoverRadio","startAngle","clockWise","Rt","prevSlicesProperties","slicesProperties","curAngle","originDiffAngle","largeArc","diffAngle","endAngle","startPosition","endPosition","prevProperty","curStart","curEnd","curPath","arcStartX","arcStartY","arcEndX","midArc","arcEndY","makeCircleStr","makeArcPathStr","property","flag","ot","calTranslateByAngle","g_off","pageX","pageY","formatted_labels","percent","slices","prevIndex","curActiveSliceIndex","prevAcitve","curActiveSlice","hoverSlice","Heatmap","countLabel","validStarts","startSubDomain","startSubDomainIndex","discreteDomains","ROW_HEIGHT","HEATMAP_SQUARE_SIZE","spacing","noOfWeeks","setFullYear","dataPoints","timestampSec","firstWeekStart","distributionSize","dataMaxValue","distributionStep","checkpoint","calcDistribution","domainConfigs","getDomains","lessCol","Pe","dayName","dayText","daySquares","comp","daySquare","dateParts","lessText","COL_WIDTH","moreText","HEATMAP_DISTRIBUTION_SIZE","startMonth","startYear","noOfMonths","startOfMonth","getDomainConfig","startOfWeek","domainConfig","noOfMonthWeeks","getCol","empty","currentDate","currentDateWithinData","getSubDomainConfig","AxisChart","lineOptions","axisOptions","xAxisMode","yAxisMode","xIsSeries","shortenYAxisNumbers","formatTooltipX","calcXPositions","calcYAxisParameters","getAllYValues","makeDataByIndex","unitWidth","xOffset","xAxis","dataValues","intervalHeight","calcDatasetPoints","calcYExtremes","calcYRegions","scaleAll","cumulativeYs","char","stacked","yExtremes","cumulativeYPos","cumulative","allValueLists","chartWidth","isSeries","allowedSpace","allowedLetters","seriesMultiple","maxLabelLength","getShortenedLabels","barDatasets","lineDatasets","barsConfigs","spaceRatio","lineConfigs","minLine","dotSize","markerConfigs","optionals","dataUnitComponents","dataByIndex","formatX","formatY","relX","relY","mapTooltipXPosition","goal","arr","closest","prev","curr","getClosestInArray","dbi","yExtreme","formattedLabel","legendBar","overlayGuides","undefined","currentIndex","currentUnit","_this7","setCurrentDataPoint","_this9","_this10","properties","evt","createEvent","initEvent","dispatchEvent","getDataPoint","datasetValues","splice","DonutChart","makeStrokeCircleStr","makeArcStrokePathStr","chartTypes","getChartByType","frappe","Charts","_typeof","require","_regeneratorRuntime","__esModule","Op","hasOwn","hasOwnProperty","defineProperty","obj","desc","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","makeInvokeMethod","tryCatch","fn","arg","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","object","pop","skipTempReset","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","definition","flarum","core","compat","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","_setPrototypeOf","_inheritsLoose","subClass","superClass","MiniStatisticsWidget","entities","lifetimeData","loadingLifetime","oncreate","vnode","loadLifetimeData","redraw","app","params","period","entity","totalCount","getTotalCount","display","abbreviateNumber","id","DashboardWidget","_extends","source","dayjs","dayjsUtc","StatisticsWidgetDateSelectionModal","inputs","startDateVal","endDateVal","ids","generateElementId","oninit","attrs","class","items","toArray","ItemList","htmlFor","onchange","updateState","field","currentTarget","submitData","hour","minute","second","millisecond","onsubmit","preventDefault","alertAttrs","controls","onModalSubmit","hide","Modal","dayjsLocalizedFormat","StatisticsWidget","periods","chart","customPeriod","timedData","customPeriodData","noData","loadingTimed","loadingCustom","selectedEntity","selectedPeriod","chartEntity","chartPeriod","loadTimedData","model","todayDate","setUTCHours","today","step","last_7_days","previous_7_days","last_28_days","previous_28_days","last_12_months","console","loadCustomRangeData","dateRange","loadingSelectedEntity","thisPeriod","disabled","buttonClassName","caretIcon","active","onclick","changePeriod","icon","dates","extractText","fromDate","thisPeriodCount","getPeriodCount","lastPeriodCount","getLastPeriod","periodChange","changeEntity","drawChart","onupdate","periodLength","lastPeriod","compareDocumentPosition","Chart","dom","timed","time","StatisticsPage","ExtensionPage","DashboardPage","widgets","registerPage"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":";6BAAoEA,EAAOC,QAAmI,WAAW,aAAa,IAAUC,EAAE,IAAIC,EAAE,KAAKC,EAAE,cAAcC,EA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,GAC5DA,EAAQpoC,IAAI,aAAc,EAACwhC,EAAoB,MAAK,GACtD,IAEAQ,IAAAA,cAAAA,IAAsB,qBAAqBqG,aAAaJ,EAC1D","sources":["webpack://@flarum/statistics/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/statistics/../../../node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/statistics/../../../node_modules/dayjs/plugin/utc.js","webpack://@flarum/statistics/../src/js/utils/dom.js","webpack://@flarum/statistics/../src/js/utils/constants.js","webpack://@flarum/statistics/../src/js/utils/helpers.js","webpack://@flarum/statistics/../src/js/utils/draw-utils.js","webpack://@flarum/statistics/../src/js/utils/colors.js","webpack://@flarum/statistics/../src/js/utils/draw.js","webpack://@flarum/statistics/../src/js/utils/animate.js","webpack://@flarum/statistics/../src/js/utils/animation.js","webpack://@flarum/statistics/../src/js/utils/export.js","webpack://@flarum/statistics/../src/js/utils/date-utils.js","webpack://@flarum/statistics/../src/js/objects/ChartComponents.js","webpack://@flarum/statistics/../src/js/utils/intervals.js","webpack://@flarum/statistics/../src/js/utils/axis-chart-utils.js","webpack://@flarum/statistics/../node_modules/style-inject/dist/style-inject.es.js","webpack://@flarum/statistics/../src/js/objects/SvgTip.js","webpack://@flarum/statistics/../src/css/chartsCss.js","webpack://@flarum/statistics/../src/js/charts/BaseChart.js","webpack://@flarum/statistics/../src/js/charts/AggregationChart.js","webpack://@flarum/statistics/../src/js/charts/PercentageChart.js","webpack://@flarum/statistics/../src/js/charts/PieChart.js","webpack://@flarum/statistics/../src/js/charts/Heatmap.js","webpack://@flarum/statistics/../src/js/charts/AxisChart.js","webpack://@flarum/statistics/../src/js/charts/DonutChart.js","webpack://@flarum/statistics/../src/js/chart.js","webpack://@flarum/statistics/../src/js/index.js","webpack://@flarum/statistics/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/statistics/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/statistics/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/statistics/webpack/bootstrap","webpack://@flarum/statistics/webpack/runtime/compat get default export","webpack://@flarum/statistics/webpack/runtime/define property getters","webpack://@flarum/statistics/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/statistics/webpack/runtime/make namespace object","webpack://@flarum/statistics/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['admin/components/DashboardPage']\"","webpack://@flarum/statistics/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/statistics/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/statistics/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/statistics/external root \"flarum.core.compat['admin/components/DashboardWidget']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/utils/abbreviateNumber']\"","webpack://@flarum/statistics/./src/admin/components/MiniStatisticsWidget.tsx","webpack://@flarum/statistics/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@flarum/statistics/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/statistics/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/components/Placeholder']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['admin/utils/generateElementId']\"","webpack://@flarum/statistics/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/statistics/./src/admin/components/StatisticsWidgetDateSelectionModal.tsx","webpack://@flarum/statistics/./src/admin/components/StatisticsWidget.tsx","webpack://@flarum/statistics/./src/admin/components/StatisticsPage.tsx","webpack://@flarum/statistics/./src/admin/index.tsx"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) {\n\tvar element = document.createElement(tag);\n\n\tfor (var i in o) {\n\t\tvar val = o[i];\n\n\t\tif (i === \"inside\") {\n\t\t\t$(val).appendChild(element);\n\t\t}\n\t\telse if (i === \"around\") {\n\t\t\tvar ref = $(val);\n\t\t\tref.parentNode.insertBefore(element, ref);\n\t\t\telement.appendChild(ref);\n\n\t\t} else if (i === \"styles\") {\n\t\t\tif(typeof val === \"object\") {\n\t\t\t\tObject.keys(val).map(prop => {\n\t\t\t\t\telement.style[prop] = val[prop];\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (i in element ) {\n\t\t\telement[i] = val;\n\t\t}\n\t\telse {\n\t\t\telement.setAttribute(i, val);\n\t\t}\n\t}\n\n\treturn element;\n};\n\nexport function getOffset(element) {\n\tlet rect = element.getBoundingClientRect();\n\treturn {\n\t\t// https://stackoverflow.com/a/7436602/6495043\n\t\t// rect.top varies with scroll, so we add whatever has been\n\t\t// scrolled to it to get absolute distance from actual page top\n\t\ttop: rect.top + (document.documentElement.scrollTop || document.body.scrollTop),\n\t\tleft: rect.left + (document.documentElement.scrollLeft || document.body.scrollLeft)\n\t};\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n// an element's offsetParent property will return null whenever it, or any of its parents,\n// is hidden via the display style property.\nexport function isHidden(el) {\n\treturn (el.offsetParent === null);\n}\n\nexport function isElementInViewport(el) {\n\t// Although straightforward: https://stackoverflow.com/a/7557433/6495043\n\tvar rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */\n rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */\n\t);\n}\n\nexport function getElementContentWidth(element) {\n\tvar styles = window.getComputedStyle(element);\n\tvar padding = parseFloat(styles.paddingLeft) +\n\t\tparseFloat(styles.paddingRight);\n\n\treturn element.clientWidth - padding;\n}\n\nexport function bind(element, o){\n\tif (element) {\n\t\tfor (var event in o) {\n\t\t\tvar callback = o[event];\n\n\t\t\tevent.split(/\\s+/).forEach(function (event) {\n\t\t\t\telement.addEventListener(event, callback);\n\t\t\t});\n\t\t}\n\t}\n}\n\nexport function unbind(element, o){\n\tif (element) {\n\t\tfor (var event in o) {\n\t\t\tvar callback = o[event];\n\n\t\t\tevent.split(/\\s+/).forEach(function(event) {\n\t\t\t\telement.removeEventListener(event, callback);\n\t\t\t});\n\t\t}\n\t}\n}\n\nexport function fire(target, type, properties) {\n\tvar evt = document.createEvent(\"HTMLEvents\");\n\n\tevt.initEvent(type, true, true );\n\n\tfor (var j in properties) {\n\t\tevt[j] = properties[j];\n\t}\n\n\treturn target.dispatchEvent(evt);\n}\n\n// https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\nexport function forEachNode(nodeList, callback, scope) {\n\tif(!nodeList) return;\n\tfor (var i = 0; i < nodeList.length; i++) {\n\t\tcallback.call(scope, nodeList[i], i);\n\t}\n}\n\nexport function activate($parent, $child, commonClass, activeClass='active', index = -1) {\n\tlet $children = $parent.querySelectorAll(`.${commonClass}.${activeClass}`);\n\n\tforEachNode($children, (node, i) => {\n\t\tif(index >= 0 && i <= index) return;\n\t\tnode.classList.remove(activeClass);\n\t});\n\n\t$child.classList.add(activeClass);\n}\n","export const ALL_CHART_TYPES = ['line', 'scatter', 'bar', 'percentage', 'heatmap', 'pie'];\n\nexport const COMPATIBLE_CHARTS = {\n\tbar: ['line', 'scatter', 'percentage', 'pie'],\n\tline: ['scatter', 'bar', 'percentage', 'pie'],\n\tpie: ['line', 'scatter', 'percentage', 'bar'],\n\tpercentage: ['bar', 'line', 'scatter', 'pie'],\n\theatmap: []\n};\n\nexport const DATA_COLOR_DIVISIONS = {\n\tbar: 'datasets',\n\tline: 'datasets',\n\tpie: 'labels',\n\tpercentage: 'labels',\n\theatmap: HEATMAP_DISTRIBUTION_SIZE\n};\n\nexport const BASE_MEASURES = {\n\tmargins: {\n\t\ttop: 10,\n\t\tbottom: 10,\n\t\tleft: 20,\n\t\tright: 20\n\t},\n\tpaddings: {\n\t\ttop: 20,\n\t\tbottom: 40,\n\t\tleft: 30,\n\t\tright: 10\n\t},\n\n\tbaseHeight: 240,\n\ttitleHeight: 20,\n\tlegendHeight: 30,\n\n\ttitleFontSize: 12,\n};\n\nexport function getTopOffset(m) {\n\treturn m.titleHeight + m.margins.top + m.paddings.top;\n}\n\nexport function getLeftOffset(m) {\n\treturn m.margins.left + m.paddings.left;\n}\n\nexport function getExtraHeight(m) {\n\tlet totalExtraHeight = m.margins.top + m.margins.bottom\n\t\t+ m.paddings.top + m.paddings.bottom\n\t\t+ m.titleHeight + m.legendHeight;\n\treturn totalExtraHeight;\n}\n\nexport function getExtraWidth(m) {\n\tlet totalExtraWidth = m.margins.left + m.margins.right\n\t\t+ m.paddings.left + m.paddings.right;\n\n\treturn totalExtraWidth;\n}\n\nexport const INIT_CHART_UPDATE_TIMEOUT = 700;\nexport const CHART_POST_ANIMATE_TIMEOUT = 400;\n\nexport const DEFAULT_AXIS_CHART_TYPE = 'line';\nexport const AXIS_DATASET_CHART_TYPES = ['line', 'bar'];\n\nexport const AXIS_LEGEND_BAR_SIZE = 100;\n\nexport const BAR_CHART_SPACE_RATIO = 0.5;\nexport const MIN_BAR_PERCENT_HEIGHT = 0.00;\n\nexport const LINE_CHART_DOT_SIZE = 4;\nexport const DOT_OVERLAY_SIZE_INCR = 4;\n\nexport const PERCENTAGE_BAR_DEFAULT_HEIGHT = 20;\nexport const PERCENTAGE_BAR_DEFAULT_DEPTH = 2;\n\n// Fixed 5-color theme,\n// More colors are difficult to parse visually\nexport const HEATMAP_DISTRIBUTION_SIZE = 5;\n\nexport const HEATMAP_SQUARE_SIZE = 10;\nexport const HEATMAP_GUTTER_SIZE = 2;\n\nexport const DEFAULT_CHAR_WIDTH = 7;\n\nexport const TOOLTIP_POINTER_TRIANGLE_HEIGHT = 5;\n\nconst DEFAULT_CHART_COLORS = ['light-blue', 'blue', 'violet', 'red', 'orange',\n\t'yellow', 'green', 'light-green', 'purple', 'magenta', 'light-grey', 'dark-grey'];\nconst HEATMAP_COLORS_GREEN = ['#ebedf0', '#c6e48b', '#7bc96f', '#239a3b', '#196127'];\nexport const HEATMAP_COLORS_BLUE = ['#ebedf0', '#c0ddf9', '#73b3f3', '#3886e1', '#17459e'];\nexport const HEATMAP_COLORS_YELLOW = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001c'];\n\nexport const DEFAULT_COLORS = {\n\tbar: DEFAULT_CHART_COLORS,\n\tline: DEFAULT_CHART_COLORS,\n\tpie: DEFAULT_CHART_COLORS,\n\tpercentage: DEFAULT_CHART_COLORS,\n\theatmap: HEATMAP_COLORS_GREEN,\n\tdonut: DEFAULT_CHART_COLORS\n};\n\n// Universal constants\nexport const ANGLE_RATIO = Math.PI / 180;\nexport const FULL_ANGLE = 360;\n","import { ANGLE_RATIO } from './constants';\n\n/**\n * Returns the value of a number upto 2 decimal places.\n * @param {Number} d Any number\n */\nexport function floatTwo(d) {\n\treturn parseFloat(d.toFixed(2));\n}\n\n/**\n * Returns whether or not two given arrays are equal.\n * @param {Array} arr1 First array\n * @param {Array} arr2 Second array\n */\nexport function arraysEqual(arr1, arr2) {\n\tif(arr1.length !== arr2.length) return false;\n\tlet areEqual = true;\n\tarr1.map((d, i) => {\n\t\tif(arr2[i] !== d) areEqual = false;\n\t});\n\treturn areEqual;\n}\n\n/**\n * Shuffles array in place. ES6 version\n * @param {Array} array An array containing the items.\n */\nexport function shuffle(array) {\n\t// Awesomeness: https://bost.ocks.org/mike/shuffle/\n\t// https://stackoverflow.com/a/2450976/6495043\n\t// https://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array?noredirect=1&lq=1\n\n\tfor (let i = array.length - 1; i > 0; i--) {\n\t\tlet j = Math.floor(Math.random() * (i + 1));\n\t\t[array[i], array[j]] = [array[j], array[i]];\n\t}\n\n\treturn array;\n}\n\n/**\n * Fill an array with extra points\n * @param {Array} array Array\n * @param {Number} count number of filler elements\n * @param {Object} element element to fill with\n * @param {Boolean} start fill at start?\n */\nexport function fillArray(array, count, element, start=false) {\n\tif(!element) {\n\t\telement = start ? array[0] : array[array.length - 1];\n\t}\n\tlet fillerArray = new Array(Math.abs(count)).fill(element);\n\tarray = start ? fillerArray.concat(array) : array.concat(fillerArray);\n\treturn array;\n}\n\n/**\n * Returns pixel width of string.\n * @param {String} string\n * @param {Number} charWidth Width of single char in pixels\n */\nexport function getStringWidth(string, charWidth) {\n\treturn (string+\"\").length * charWidth;\n}\n\nexport function bindChange(obj, getFn, setFn) {\n\treturn new Proxy(obj, {\n\t\tset: function(target, prop, value) {\n\t\t\tsetFn();\n\t\t\treturn Reflect.set(target, prop, value);\n\t\t},\n\t\tget: function(target, prop) {\n\t\t\tgetFn();\n\t\t\treturn Reflect.get(target, prop);\n\t\t}\n\t});\n}\n\n// https://stackoverflow.com/a/29325222\nexport function getRandomBias(min, max, bias, influence) {\n\tconst range = max - min;\n\tconst biasValue = range * bias + min;\n\tvar rnd = Math.random() * range + min,\t\t// random in range\n\t\tmix = Math.random() * influence;\t\t// random mixer\n\treturn rnd * (1 - mix) + biasValue * mix;\t// mix full range and bias\n}\n\nexport function getPositionByAngle(angle, radius) {\n\treturn {\n\t\tx: Math.sin(angle * ANGLE_RATIO) * radius,\n\t\ty: Math.cos(angle * ANGLE_RATIO) * radius,\n\t};\n}\n\n/**\n * Check if a number is valid for svg attributes\n * @param {object} candidate Candidate to test\n * @param {Boolean} nonNegative flag to treat negative number as invalid\n */\nexport function isValidNumber(candidate, nonNegative=false) {\n\tif (Number.isNaN(candidate)) return false;\n\telse if (candidate === undefined) return false;\n\telse if (!Number.isFinite(candidate)) return false;\n\telse if (nonNegative && candidate < 0) return false;\n\telse return true;\n}\n\n/**\n * Round a number to the closes precision, max max precision 4\n * @param {Number} d Any Number\n */\nexport function round(d) {\n\t// https://floating-point-gui.de/\n\t// https://www.jacklmoore.com/notes/rounding-in-javascript/\n\treturn Number(Math.round(d + 'e4') + 'e-4');\n}\n\n/**\n * Creates a deep clone of an object\n * @param {Object} candidate Any Object\n */\n export function deepClone(candidate) {\n\tlet cloned, value, key;\n \n\tif (candidate instanceof Date) {\n\t return new Date(candidate.getTime());\n\t}\n \n\tif (typeof candidate !== \"object\" || candidate === null) {\n\t return candidate;\n\t}\n \n\tcloned = Array.isArray(candidate) ? [] : {};\n \n\tfor (key in candidate) {\n\t value = candidate[key];\n \n\t cloned[key] = deepClone(value);\n\t}\n \n\treturn cloned;\n }","import { fillArray } from './helpers';\n\nexport function getBarHeightAndYAttr(yTop, zeroLine) {\n\tlet height, y;\n\tif (yTop <= zeroLine) {\n\t\theight = zeroLine - yTop;\n\t\ty = yTop;\n\t} else {\n\t\theight = yTop - zeroLine;\n\t\ty = zeroLine;\n\t}\n\n\treturn [height, y];\n}\n\nexport function equilizeNoOfElements(array1, array2,\n\textraCount = array2.length - array1.length) {\n\n\t// Doesn't work if either has zero elements.\n\tif(extraCount > 0) {\n\t\tarray1 = fillArray(array1, extraCount);\n\t} else {\n\t\tarray2 = fillArray(array2, extraCount);\n\t}\n\treturn [array1, array2];\n}\n\nexport function truncateString(txt, len) {\n\tif (!txt) {\n\t\treturn;\n\t}\n\tif (txt.length > len) {\n\t\treturn txt.slice(0, len-3) + '...';\n\t} else {\n\t\treturn txt;\n\t}\n}\n\nexport function shortenLargeNumber(label) {\n\tlet number;\n\tif (typeof label === 'number') number = label;\n\telse if (typeof label === 'string') {\n\t\tnumber = Number(label);\n\t\tif (Number.isNaN(number)) return label;\n\t}\n\n\t// Using absolute since log wont work for negative numbers\n\tlet p = Math.floor(Math.log10(Math.abs(number)));\n\tif (p <= 2) return number; // Return as is for a 3 digit number of less\n\tlet\tl = Math.floor(p / 3);\n\tlet shortened = (Math.pow(10, p - l * 3) * +(number / Math.pow(10, p)).toFixed(1));\n\n\t// Correct for floating point error upto 2 decimal places\n\treturn Math.round(shortened*100)/100 + ' ' + ['', 'K', 'M', 'B', 'T'][l];\n}\n\n// cubic bezier curve calculation (from example by Franรงois Romain)\nexport function getSplineCurvePointsStr(xList, yList) {\n\n\tlet points=[];\n\tfor(let i=0;i {\n\t\tlet lengthX = pointB[0] - pointA[0];\n\t\tlet lengthY = pointB[1] - pointA[1];\n\t\treturn {\n\t\t\tlength: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),\n\t\t\tangle: Math.atan2(lengthY, lengthX)\n\t\t};\n\t};\n \n\tlet controlPoint = (current, previous, next, reverse) => {\n\t\tlet p = previous || current;\n\t\tlet n = next || current;\n\t\tlet o = line(p, n);\n\t\tlet angle = o.angle + (reverse ? Math.PI : 0);\n\t\tlet length = o.length * smoothing;\n\t\tlet x = current[0] + Math.cos(angle) * length;\n\t\tlet y = current[1] + Math.sin(angle) * length;\n\t\treturn [x, y];\n\t};\n \n\tlet bezierCommand = (point, i, a) => {\n\t\tlet cps = controlPoint(a[i - 1], a[i - 2], point);\n\t\tlet cpe = controlPoint(point, a[i - 1], a[i + 1], true);\n\t\treturn `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`;\n\t};\n \n\tlet pointStr = (points, command) => {\n\t\treturn points.reduce((acc, point, i, a) => i === 0\n\t\t\t? `${point[0]},${point[1]}`\n\t\t\t: `${acc} ${command(point, i, a)}`, '');\n\t};\n \n\treturn pointStr(points, bezierCommand);\n}\n","const PRESET_COLOR_MAP = {\n\t'light-blue': '#7cd6fd',\n\t'blue': '#5e64ff',\n\t'violet': '#743ee2',\n\t'red': '#ff5858',\n\t'orange': '#ffa00a',\n\t'yellow': '#feef72',\n\t'green': '#28a745',\n\t'light-green': '#98d85b',\n\t'purple': '#b554ff',\n\t'magenta': '#ffa3ef',\n\t'black': '#36114C',\n\t'grey': '#bdd3e6',\n\t'light-grey': '#f0f4f7',\n\t'dark-grey': '#b8c2cc'\n};\n\nfunction limitColor(r){\n\tif (r > 255) return 255;\n\telse if (r < 0) return 0;\n\treturn r;\n}\n\nexport function lightenDarkenColor(color, amt) {\n\tlet col = getColor(color);\n\tlet usePound = false;\n\tif (col[0] == \"#\") {\n\t\tcol = col.slice(1);\n\t\tusePound = true;\n\t}\n\tlet num = parseInt(col,16);\n\tlet r = limitColor((num >> 16) + amt);\n\tlet b = limitColor(((num >> 8) & 0x00FF) + amt);\n\tlet g = limitColor((num & 0x0000FF) + amt);\n\treturn (usePound?\"#\":\"\") + (g | (b << 8) | (r << 16)).toString(16);\n}\n\nexport function isValidColor(string) {\n\t// https://stackoverflow.com/a/32685393\n\tlet HEX_RE = /(^\\s*)(#)((?:[A-Fa-f0-9]{3}){1,2})$/i;\n\tlet RGB_RE = /(^\\s*)(rgb|hsl)(a?)[(]\\s*([\\d.]+\\s*%?)\\s*,\\s*([\\d.]+\\s*%?)\\s*,\\s*([\\d.]+\\s*%?)\\s*(?:,\\s*([\\d.]+)\\s*)?[)]$/i;\n\treturn HEX_RE.test(string) || RGB_RE.test(string);\n}\n\nexport const getColor = (color) => {\n\t// When RGB color, convert to hexadecimal (alpha value is omitted)\n\tif((/rgb[a]{0,1}\\([\\d, ]+\\)/gim).test(color)) {\n\t\treturn (/\\D+(\\d*)\\D+(\\d*)\\D+(\\d*)/gim).exec(color)\n\t\t\t.map((x, i) => (i !== 0 ? Number(x).toString(16) : '#'))\n\t\t\t.reduce((c, ch) => `${c}${ch}`);\n\t}\n\treturn PRESET_COLOR_MAP[color] || color;\n};\n","import { getBarHeightAndYAttr, truncateString, shortenLargeNumber, getSplineCurvePointsStr } from './draw-utils';\nimport { getStringWidth, isValidNumber } from './helpers';\nimport { DOT_OVERLAY_SIZE_INCR, PERCENTAGE_BAR_DEFAULT_DEPTH } from './constants';\nimport { lightenDarkenColor } from './colors';\n\nexport const AXIS_TICK_LENGTH = 6;\nconst LABEL_MARGIN = 4;\nconst LABEL_MAX_CHARS = 15;\nexport const FONT_SIZE = 10;\nconst BASE_LINE_COLOR = '#dadada';\nconst FONT_FILL = '#555b51';\n\nfunction $(expr, con) {\n\treturn typeof expr === \"string\"? (con || document).querySelector(expr) : expr || null;\n}\n\nexport function createSVG(tag, o) {\n\tvar element = document.createElementNS(\"http://www.w3.org/2000/svg\", tag);\n\n\tfor (var i in o) {\n\t\tvar val = o[i];\n\n\t\tif (i === \"inside\") {\n\t\t\t$(val).appendChild(element);\n\t\t}\n\t\telse if (i === \"around\") {\n\t\t\tvar ref = $(val);\n\t\t\tref.parentNode.insertBefore(element, ref);\n\t\t\telement.appendChild(ref);\n\n\t\t} else if (i === \"styles\") {\n\t\t\tif(typeof val === \"object\") {\n\t\t\t\tObject.keys(val).map(prop => {\n\t\t\t\t\telement.style[prop] = val[prop];\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tif(i === \"className\") { i = \"class\"; }\n\t\t\tif(i === \"innerHTML\") {\n\t\t\t\telement['textContent'] = val;\n\t\t\t} else {\n\t\t\t\telement.setAttribute(i, val);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn element;\n}\n\nfunction renderVerticalGradient(svgDefElem, gradientId) {\n\treturn createSVG('linearGradient', {\n\t\tinside: svgDefElem,\n\t\tid: gradientId,\n\t\tx1: 0,\n\t\tx2: 0,\n\t\ty1: 0,\n\t\ty2: 1\n\t});\n}\n\nfunction setGradientStop(gradElem, offset, color, opacity) {\n\treturn createSVG('stop', {\n\t\t'inside': gradElem,\n\t\t'style': `stop-color: ${color}`,\n\t\t'offset': offset,\n\t\t'stop-opacity': opacity\n\t});\n}\n\nexport function makeSVGContainer(parent, className, width, height) {\n\treturn createSVG('svg', {\n\t\tclassName: className,\n\t\tinside: parent,\n\t\twidth: width,\n\t\theight: height\n\t});\n}\n\nexport function makeSVGDefs(svgContainer) {\n\treturn createSVG('defs', {\n\t\tinside: svgContainer,\n\t});\n}\n\nexport function makeSVGGroup(className, transform='', parent=undefined) {\n\tlet args = {\n\t\tclassName: className,\n\t\ttransform: transform\n\t};\n\tif(parent) args.inside = parent;\n\treturn createSVG('g', args);\n}\n\nexport function wrapInSVGGroup(elements, className='') {\n\tlet g = createSVG('g', {\n\t\tclassName: className\n\t});\n\telements.forEach(e => g.appendChild(e));\n\treturn g;\n}\n\nexport function makePath(pathStr, className='', stroke='none', fill='none', strokeWidth=2) {\n\treturn createSVG('path', {\n\t\tclassName: className,\n\t\td: pathStr,\n\t\tstyles: {\n\t\t\tstroke: stroke,\n\t\t\tfill: fill,\n\t\t\t'stroke-width': strokeWidth\n\t\t}\n\t});\n}\n\nexport function makeArcPathStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, arcEndY] = [center.x + endPosition.x, center.y + endPosition.y];\n\treturn `M${center.x} ${center.y}\n\t\tL${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY} z`;\n}\n\nexport function makeCircleStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, midArc, arcEndY] = [center.x + endPosition.x, center.y * 2, center.y + endPosition.y];\n\treturn `M${center.x} ${center.y}\n\t\tL${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${midArc} z\n\t\tL${arcStartX} ${midArc}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY} z`;\n}\n\nexport function makeArcStrokePathStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, arcEndY] = [center.x + endPosition.x, center.y + endPosition.y];\n\n\treturn `M${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY}`;\n}\n\nexport function makeStrokeCircleStr(startPosition, endPosition, center, radius, clockWise=1, largeArc=0){\n\tlet [arcStartX, arcStartY] = [center.x + startPosition.x, center.y + startPosition.y];\n\tlet [arcEndX, midArc, arcEndY] = [center.x + endPosition.x, radius * 2 + arcStartY, center.y + startPosition.y];\n\n\treturn `M${arcStartX} ${arcStartY}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${midArc}\n\t\tM${arcStartX} ${midArc}\n\t\tA ${radius} ${radius} 0 ${largeArc} ${clockWise ? 1 : 0}\n\t\t${arcEndX} ${arcEndY}`;\n}\n\nexport function makeGradient(svgDefElem, color, lighter = false) {\n\tlet gradientId ='path-fill-gradient' + '-' + color + '-' +(lighter ? 'lighter' : 'default');\n\tlet gradientDef = renderVerticalGradient(svgDefElem, gradientId);\n\tlet opacities = [1, 0.6, 0.2];\n\tif(lighter) {\n\t\topacities = [0.4, 0.2, 0];\n\t}\n\n\tsetGradientStop(gradientDef, \"0%\", color, opacities[0]);\n\tsetGradientStop(gradientDef, \"50%\", color, opacities[1]);\n\tsetGradientStop(gradientDef, \"100%\", color, opacities[2]);\n\n\treturn gradientId;\n}\n\nexport function percentageBar(x, y, width, height,\n\tdepth=PERCENTAGE_BAR_DEFAULT_DEPTH, fill='none') {\n\n\tlet args = {\n\t\tclassName: 'percentage-bar',\n\t\tx: x,\n\t\ty: y,\n\t\twidth: width,\n\t\theight: height,\n\t\tfill: fill,\n\t\tstyles: {\n\t\t\t'stroke': lightenDarkenColor(fill, -25),\n\t\t\t// Diabolically good: https://stackoverflow.com/a/9000859\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n\t\t\t'stroke-dasharray': `0, ${height + width}, ${width}, ${height}`,\n\t\t\t'stroke-width': depth\n\t\t},\n\t};\n\n\treturn createSVG(\"rect\", args);\n}\n\nexport function heatSquare(className, x, y, size, radius, fill='none', data={}) {\n\tlet args = {\n\t\tclassName: className,\n\t\tx: x,\n\t\ty: y,\n\t\twidth: size,\n\t\theight: size,\n\t\trx: radius,\n\t\tfill: fill\n\t};\n\n\tObject.keys(data).map(key => {\n\t\targs[key] = data[key];\n\t});\n\n\treturn createSVG(\"rect\", args);\n}\n\nexport function legendBar(x, y, size, fill='none', label, truncate=false) {\n\tlabel = truncate ? truncateString(label, LABEL_MAX_CHARS) : label;\n\n\tlet args = {\n\t\tclassName: 'legend-bar',\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: size,\n\t\theight: '2px',\n\t\tfill: fill\n\t};\n\tlet text = createSVG('text', {\n\t\tclassName: 'legend-dataset-text',\n\t\tx: 0,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE * 2) + 'px',\n\t\t'font-size': (FONT_SIZE * 1.2) + 'px',\n\t\t'text-anchor': 'start',\n\t\tfill: FONT_FILL,\n\t\tinnerHTML: label\n\t});\n\n\tlet group = createSVG('g', {\n\t\ttransform: `translate(${x}, ${y})`\n\t});\n\tgroup.appendChild(createSVG(\"rect\", args));\n\tgroup.appendChild(text);\n\n\treturn group;\n}\n\nexport function legendDot(x, y, size, fill='none', label, truncate=false) {\n\tlabel = truncate ? truncateString(label, LABEL_MAX_CHARS) : label;\n\n\tlet args = {\n\t\tclassName: 'legend-dot',\n\t\tcx: 0,\n\t\tcy: 0,\n\t\tr: size,\n\t\tfill: fill\n\t};\n\tlet text = createSVG('text', {\n\t\tclassName: 'legend-dataset-text',\n\t\tx: 0,\n\t\ty: 0,\n\t\tdx: (FONT_SIZE) + 'px',\n\t\tdy: (FONT_SIZE/3) + 'px',\n\t\t'font-size': (FONT_SIZE * 1.2) + 'px',\n\t\t'text-anchor': 'start',\n\t\tfill: FONT_FILL,\n\t\tinnerHTML: label\n\t});\n\n\tlet group = createSVG('g', {\n\t\ttransform: `translate(${x}, ${y})`\n\t});\n\tgroup.appendChild(createSVG(\"circle\", args));\n\tgroup.appendChild(text);\n\n\treturn group;\n}\n\nexport function makeText(className, x, y, content, options = {}) {\n\tlet fontSize = options.fontSize || FONT_SIZE;\n\tlet dy = options.dy !== undefined ? options.dy : (fontSize / 2);\n\tlet fill = options.fill || FONT_FILL;\n\tlet textAnchor = options.textAnchor || 'start';\n\treturn createSVG('text', {\n\t\tclassName: className,\n\t\tx: x,\n\t\ty: y,\n\t\tdy: dy + 'px',\n\t\t'font-size': fontSize + 'px',\n\t\tfill: fill,\n\t\t'text-anchor': textAnchor,\n\t\tinnerHTML: content\n\t});\n}\n\nfunction makeVertLine(x, label, y1, y2, options={}) {\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tlet l = createSVG('line', {\n\t\tclassName: 'line-vertical ' + options.className,\n\t\tx1: 0,\n\t\tx2: 0,\n\t\ty1: y1,\n\t\ty2: y2,\n\t\tstyles: {\n\t\t\tstroke: options.stroke\n\t\t}\n\t});\n\n\tlet text = createSVG('text', {\n\t\tx: 0,\n\t\ty: y1 > y2 ? y1 + LABEL_MARGIN : y1 - LABEL_MARGIN - FONT_SIZE,\n\t\tdy: FONT_SIZE + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': 'middle',\n\t\tinnerHTML: label + \"\"\n\t});\n\n\tlet line = createSVG('g', {\n\t\ttransform: `translate(${ x }, 0)`\n\t});\n\n\tline.appendChild(l);\n\tline.appendChild(text);\n\n\treturn line;\n}\n\nfunction makeHoriLine(y, label, x1, x2, options={}) {\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tif(!options.lineType) options.lineType = '';\n\tif (options.shortenNumbers) label = shortenLargeNumber(label);\n\n\tlet className = 'line-horizontal ' + options.className +\n\t\t(options.lineType === \"dashed\" ? \"dashed\": \"\");\n\n\tlet l = createSVG('line', {\n\t\tclassName: className,\n\t\tx1: x1,\n\t\tx2: x2,\n\t\ty1: 0,\n\t\ty2: 0,\n\t\tstyles: {\n\t\t\tstroke: options.stroke\n\t\t}\n\t});\n\n\tlet text = createSVG('text', {\n\t\tx: x1 < x2 ? x1 - LABEL_MARGIN : x1 + LABEL_MARGIN,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE / 2 - 2) + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': x1 < x2 ? 'end' : 'start',\n\t\tinnerHTML: label+\"\"\n\t});\n\n\tlet line = createSVG('g', {\n\t\ttransform: `translate(0, ${y})`,\n\t\t'stroke-opacity': 1\n\t});\n\n\tif(text === 0 || text === '0') {\n\t\tline.style.stroke = \"rgba(27, 31, 35, 0.6)\";\n\t}\n\n\tline.appendChild(l);\n\tline.appendChild(text);\n\n\treturn line;\n}\n\nexport function yLine(y, label, width, options={}) {\n\tif (!isValidNumber(y)) y = 0;\n\n\tif(!options.pos) options.pos = 'left';\n\tif(!options.offset) options.offset = 0;\n\tif(!options.mode) options.mode = 'span';\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tif(!options.className) options.className = '';\n\n\tlet x1 = -1 * AXIS_TICK_LENGTH;\n\tlet x2 = options.mode === 'span' ? width + AXIS_TICK_LENGTH : 0;\n\n\tif(options.mode === 'tick' && options.pos === 'right') {\n\t\tx1 = width + AXIS_TICK_LENGTH;\n\t\tx2 = width;\n\t}\n\n\t// let offset = options.pos === 'left' ? -1 * options.offset : options.offset;\n\n\tx1 += options.offset;\n\tx2 += options.offset;\n\n\treturn makeHoriLine(y, label, x1, x2, {\n\t\tstroke: options.stroke,\n\t\tclassName: options.className,\n\t\tlineType: options.lineType,\n\t\tshortenNumbers: options.shortenNumbers\n\t});\n}\n\nexport function xLine(x, label, height, options={}) {\n\tif (!isValidNumber(x)) x = 0;\n\n\tif(!options.pos) options.pos = 'bottom';\n\tif(!options.offset) options.offset = 0;\n\tif(!options.mode) options.mode = 'span';\n\tif(!options.stroke) options.stroke = BASE_LINE_COLOR;\n\tif(!options.className) options.className = '';\n\n\t// Draw X axis line in span/tick mode with optional label\n\t// \ty2(span)\n\t// \t\t\t\t\t\t|\n\t// \t\t\t\t\t\t|\n\t//\t\t\t\tx line\t|\n\t//\t\t\t\t\t\t|\n\t// \t\t\t\t\t \t|\n\t// ---------------------+-- y2(tick)\n\t//\t\t\t\t\t\t|\n\t//\t\t\t\t\t\t\ty1\n\n\tlet y1 = height + AXIS_TICK_LENGTH;\n\tlet y2 = options.mode === 'span' ? -1 * AXIS_TICK_LENGTH : height;\n\n\tif(options.mode === 'tick' && options.pos === 'top') {\n\t\t// top axis ticks\n\t\ty1 = -1 * AXIS_TICK_LENGTH;\n\t\ty2 = 0;\n\t}\n\n\treturn makeVertLine(x, label, y1, y2, {\n\t\tstroke: options.stroke,\n\t\tclassName: options.className,\n\t\tlineType: options.lineType\n\t});\n}\n\nexport function yMarker(y, label, width, options={}) {\n\tif(!options.labelPos) options.labelPos = 'right';\n\tlet x = options.labelPos === 'left' ? LABEL_MARGIN\n\t\t: width - getStringWidth(label, 5) - LABEL_MARGIN;\n\n\tlet labelSvg = createSVG('text', {\n\t\tclassName: 'chart-label',\n\t\tx: x,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE / -2) + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': 'start',\n\t\tinnerHTML: label+\"\"\n\t});\n\n\tlet line = makeHoriLine(y, '', 0, width, {\n\t\tstroke: options.stroke || BASE_LINE_COLOR,\n\t\tclassName: options.className || '',\n\t\tlineType: options.lineType\n\t});\n\n\tline.appendChild(labelSvg);\n\n\treturn line;\n}\n\nexport function yRegion(y1, y2, width, label, options={}) {\n\t// return a group\n\tlet height = y1 - y2;\n\n\tlet rect = createSVG('rect', {\n\t\tclassName: `bar mini`, // remove class\n\t\tstyles: {\n\t\t\tfill: `rgba(228, 234, 239, 0.49)`,\n\t\t\tstroke: BASE_LINE_COLOR,\n\t\t\t'stroke-dasharray': `${width}, ${height}`\n\t\t},\n\t\t// 'data-point-index': index,\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: width,\n\t\theight: height\n\t});\n\n\tif(!options.labelPos) options.labelPos = 'right';\n\tlet x = options.labelPos === 'left' ? LABEL_MARGIN\n\t\t: width - getStringWidth(label+\"\", 4.5) - LABEL_MARGIN;\n\n\tlet labelSvg = createSVG('text', {\n\t\tclassName: 'chart-label',\n\t\tx: x,\n\t\ty: 0,\n\t\tdy: (FONT_SIZE / -2) + 'px',\n\t\t'font-size': FONT_SIZE + 'px',\n\t\t'text-anchor': 'start',\n\t\tinnerHTML: label+\"\"\n\t});\n\n\tlet region = createSVG('g', {\n\t\ttransform: `translate(0, ${y2})`\n\t});\n\n\tregion.appendChild(rect);\n\tregion.appendChild(labelSvg);\n\n\treturn region;\n}\n\nexport function datasetBar(x, yTop, width, color, label='', index=0, offset=0, meta={}) {\n\tlet [height, y] = getBarHeightAndYAttr(yTop, meta.zeroLine);\n\ty -= offset;\n\n\tif(height === 0) {\n\t\theight = meta.minHeight;\n\t\ty -= meta.minHeight;\n\t}\n\n\t// Preprocess numbers to avoid svg building errors\n\tif (!isValidNumber(x)) x = 0;\n\tif (!isValidNumber(y)) y = 0;\n\tif (!isValidNumber(height, true)) height = 0;\n\tif (!isValidNumber(width, true)) width = 0;\n\n\tlet rect = createSVG('rect', {\n\t\tclassName: `bar mini`,\n\t\tstyle: `fill: ${color}`,\n\t\t'data-point-index': index,\n\t\tx: x,\n\t\ty: y,\n\t\twidth: width,\n\t\theight: height\n\t});\n\n\tlabel += \"\";\n\n\tif(!label && !label.length) {\n\t\treturn rect;\n\t} else {\n\t\trect.setAttribute('y', 0);\n\t\trect.setAttribute('x', 0);\n\t\tlet text = createSVG('text', {\n\t\t\tclassName: 'data-point-value',\n\t\t\tx: width/2,\n\t\t\ty: 0,\n\t\t\tdy: (FONT_SIZE / 2 * -1) + 'px',\n\t\t\t'font-size': FONT_SIZE + 'px',\n\t\t\t'text-anchor': 'middle',\n\t\t\tinnerHTML: label\n\t\t});\n\n\t\tlet group = createSVG('g', {\n\t\t\t'data-point-index': index,\n\t\t\ttransform: `translate(${x}, ${y})`\n\t\t});\n\t\tgroup.appendChild(rect);\n\t\tgroup.appendChild(text);\n\n\t\treturn group;\n\t}\n}\n\nexport function datasetDot(x, y, radius, color, label='', index=0) {\n\tlet dot = createSVG('circle', {\n\t\tstyle: `fill: ${color}`,\n\t\t'data-point-index': index,\n\t\tcx: x,\n\t\tcy: y,\n\t\tr: radius\n\t});\n\n\tlabel += \"\";\n\n\tif(!label && !label.length) {\n\t\treturn dot;\n\t} else {\n\t\tdot.setAttribute('cy', 0);\n\t\tdot.setAttribute('cx', 0);\n\n\t\tlet text = createSVG('text', {\n\t\t\tclassName: 'data-point-value',\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\tdy: (FONT_SIZE / 2 * -1 - radius) + 'px',\n\t\t\t'font-size': FONT_SIZE + 'px',\n\t\t\t'text-anchor': 'middle',\n\t\t\tinnerHTML: label\n\t\t});\n\n\t\tlet group = createSVG('g', {\n\t\t\t'data-point-index': index,\n\t\t\ttransform: `translate(${x}, ${y})`\n\t\t});\n\t\tgroup.appendChild(dot);\n\t\tgroup.appendChild(text);\n\n\t\treturn group;\n\t}\n}\n\nexport function getPaths(xList, yList, color, options={}, meta={}) {\n\tlet pointsList = yList.map((y, i) => (xList[i] + ',' + y));\n\tlet pointsStr = pointsList.join(\"L\");\n\n\t// Spline\n\tif (options.spline)\n\t\tpointsStr = getSplineCurvePointsStr(xList, yList);\n\n\tlet path = makePath(\"M\"+pointsStr, 'line-graph-path', color);\n\n\t// HeatLine\n\tif(options.heatline) {\n\t\tlet gradient_id = makeGradient(meta.svgDefs, color);\n\t\tpath.style.stroke = `url(#${gradient_id})`;\n\t}\n\n\tlet paths = {\n\t\tpath: path\n\t};\n\n\t// Region\n\tif(options.regionFill) {\n\t\tlet gradient_id_region = makeGradient(meta.svgDefs, color, true);\n\n\t\tlet pathStr = \"M\" + `${xList[0]},${meta.zeroLine}L` + pointsStr + `L${xList.slice(-1)[0]},${meta.zeroLine}`;\n\t\tpaths.region = makePath(pathStr, `region-fill`, 'none', `url(#${gradient_id_region})`);\n\t}\n\n\treturn paths;\n}\n\nexport let makeOverlay = {\n\t'bar': (unit) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'rect') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet overlay = unit.cloneNode();\n\t\toverlay.style.fill = '#000000';\n\t\toverlay.style.opacity = '0.4';\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t\treturn overlay;\n\t},\n\n\t'dot': (unit) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet overlay = unit.cloneNode();\n\t\tlet radius = unit.getAttribute('r');\n\t\tlet fill = unit.getAttribute('fill');\n\t\toverlay.setAttribute('r', parseInt(radius) + DOT_OVERLAY_SIZE_INCR);\n\t\toverlay.setAttribute('fill', fill);\n\t\toverlay.style.opacity = '0.6';\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t\treturn overlay;\n\t},\n\n\t'heat_square': (unit) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet overlay = unit.cloneNode();\n\t\tlet radius = unit.getAttribute('r');\n\t\tlet fill = unit.getAttribute('fill');\n\t\toverlay.setAttribute('r', parseInt(radius) + DOT_OVERLAY_SIZE_INCR);\n\t\toverlay.setAttribute('fill', fill);\n\t\toverlay.style.opacity = '0.6';\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t\treturn overlay;\n\t}\n};\n\nexport let updateOverlay = {\n\t'bar': (unit, overlay) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'rect') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet attributes = ['x', 'y', 'width', 'height'];\n\t\tObject.values(unit.attributes)\n\t\t\t.filter(attr => attributes.includes(attr.name) && attr.specified)\n\t\t\t.map(attr => {\n\t\t\t\toverlay.setAttribute(attr.name, attr.nodeValue);\n\t\t\t});\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t},\n\n\t'dot': (unit, overlay) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet attributes = ['cx', 'cy'];\n\t\tObject.values(unit.attributes)\n\t\t\t.filter(attr => attributes.includes(attr.name) && attr.specified)\n\t\t\t.map(attr => {\n\t\t\t\toverlay.setAttribute(attr.name, attr.nodeValue);\n\t\t\t});\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t},\n\n\t'heat_square': (unit, overlay) => {\n\t\tlet transformValue;\n\t\tif(unit.nodeName !== 'circle') {\n\t\t\ttransformValue = unit.getAttribute('transform');\n\t\t\tunit = unit.childNodes[0];\n\t\t}\n\t\tlet attributes = ['cx', 'cy'];\n\t\tObject.values(unit.attributes)\n\t\t\t.filter(attr => attributes.includes(attr.name) && attr.specified)\n\t\t\t.map(attr => {\n\t\t\t\toverlay.setAttribute(attr.name, attr.nodeValue);\n\t\t\t});\n\n\t\tif(transformValue) {\n\t\t\toverlay.setAttribute('transform', transformValue);\n\t\t}\n\t},\n};\n","import { getBarHeightAndYAttr, getSplineCurvePointsStr } from './draw-utils';\n\nexport const UNIT_ANIM_DUR = 350;\nexport const PATH_ANIM_DUR = 350;\nexport const MARKER_LINE_ANIM_DUR = UNIT_ANIM_DUR;\nexport const REPLACE_ALL_NEW_DUR = 250;\n\nexport const STD_EASING = 'easein';\n\nexport function translate(unit, oldCoord, newCoord, duration) {\n\tlet old = typeof oldCoord === 'string' ? oldCoord : oldCoord.join(', ');\n\treturn [\n\t\tunit,\n\t\t{transform: newCoord.join(', ')},\n\t\tduration,\n\t\tSTD_EASING,\n\t\t\"translate\",\n\t\t{transform: old}\n\t];\n}\n\nexport function translateVertLine(xLine, newX, oldX) {\n\treturn translate(xLine, [oldX, 0], [newX, 0], MARKER_LINE_ANIM_DUR);\n}\n\nexport function translateHoriLine(yLine, newY, oldY) {\n\treturn translate(yLine, [0, oldY], [0, newY], MARKER_LINE_ANIM_DUR);\n}\n\nexport function animateRegion(rectGroup, newY1, newY2, oldY2) {\n\tlet newHeight = newY1 - newY2;\n\tlet rect = rectGroup.childNodes[0];\n\tlet width = rect.getAttribute(\"width\");\n\tlet rectAnim = [\n\t\trect,\n\t\t{ height: newHeight, 'stroke-dasharray': `${width}, ${newHeight}` },\n\t\tMARKER_LINE_ANIM_DUR,\n\t\tSTD_EASING\n\t];\n\n\tlet groupAnim = translate(rectGroup, [0, oldY2], [0, newY2], MARKER_LINE_ANIM_DUR);\n\treturn [rectAnim, groupAnim];\n}\n\nexport function animateBar(bar, x, yTop, width, offset=0, meta={}) {\n\tlet [height, y] = getBarHeightAndYAttr(yTop, meta.zeroLine);\n\ty -= offset;\n\tif(bar.nodeName !== 'rect') {\n\t\tlet rect = bar.childNodes[0];\n\t\tlet rectAnim = [\n\t\t\trect,\n\t\t\t{width: width, height: height},\n\t\t\tUNIT_ANIM_DUR,\n\t\t\tSTD_EASING\n\t\t];\n\n\t\tlet oldCoordStr = bar.getAttribute(\"transform\").split(\"(\")[1].slice(0, -1);\n\t\tlet groupAnim = translate(bar, oldCoordStr, [x, y], MARKER_LINE_ANIM_DUR);\n\t\treturn [rectAnim, groupAnim];\n\t} else {\n\t\treturn [[bar, {width: width, height: height, x: x, y: y}, UNIT_ANIM_DUR, STD_EASING]];\n\t}\n\t// bar.animate({height: args.newHeight, y: yTop}, UNIT_ANIM_DUR, mina.easein);\n}\n\nexport function animateDot(dot, x, y) {\n\tif(dot.nodeName !== 'circle') {\n\t\tlet oldCoordStr = dot.getAttribute(\"transform\").split(\"(\")[1].slice(0, -1);\n\t\tlet groupAnim = translate(dot, oldCoordStr, [x, y], MARKER_LINE_ANIM_DUR);\n\t\treturn [groupAnim];\n\t} else {\n\t\treturn [[dot, {cx: x, cy: y}, UNIT_ANIM_DUR, STD_EASING]];\n\t}\n\t// dot.animate({cy: yTop}, UNIT_ANIM_DUR, mina.easein);\n}\n\nexport function animatePath(paths, newXList, newYList, zeroLine, spline) {\n\tlet pathComponents = [];\n\tlet pointsStr = newYList.map((y, i) => (newXList[i] + ',' + y)).join(\"L\");\n\n\tif (spline)\n\t\tpointsStr = getSplineCurvePointsStr(newXList, newYList);\n\n\tconst animPath = [paths.path, {d:\"M\" + pointsStr}, PATH_ANIM_DUR, STD_EASING];\n\tpathComponents.push(animPath);\n\n\tif(paths.region) {\n\t\tlet regStartPt = `${newXList[0]},${zeroLine}L`;\n\t\tlet regEndPt = `L${newXList.slice(-1)[0]}, ${zeroLine}`;\n\n\t\tconst animRegion = [\n\t\t\tpaths.region,\n\t\t\t{d:\"M\" + regStartPt + pointsStr + regEndPt},\n\t\t\tPATH_ANIM_DUR,\n\t\t\tSTD_EASING\n\t\t];\n\t\tpathComponents.push(animRegion);\n\t}\n\n\treturn pathComponents;\n}\n\nexport function animatePathStr(oldPath, pathStr) {\n\treturn [oldPath, {d: pathStr}, UNIT_ANIM_DUR, STD_EASING];\n}\n","// Leveraging SMIL Animations\n\nimport { REPLACE_ALL_NEW_DUR } from './animate';\n\nconst EASING = {\n\tease: \"0.25 0.1 0.25 1\",\n\tlinear: \"0 0 1 1\",\n\t// easein: \"0.42 0 1 1\",\n\teasein: \"0.1 0.8 0.2 1\",\n\teaseout: \"0 0 0.58 1\",\n\teaseinout: \"0.42 0 0.58 1\"\n};\n\nfunction animateSVGElement(element, props, dur, easingType=\"linear\", type=undefined, oldValues={}) {\n\n\tlet animElement = element.cloneNode(true);\n\tlet newElement = element.cloneNode(true);\n\n\tfor(var attributeName in props) {\n\t\tlet animateElement;\n\t\tif(attributeName === 'transform') {\n\t\t\tanimateElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"animateTransform\");\n\t\t} else {\n\t\t\tanimateElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"animate\");\n\t\t}\n\t\tlet currentValue = oldValues[attributeName] || element.getAttribute(attributeName);\n\t\tlet value = props[attributeName];\n\n\t\tlet animAttr = {\n\t\t\tattributeName: attributeName,\n\t\t\tfrom: currentValue,\n\t\t\tto: value,\n\t\t\tbegin: \"0s\",\n\t\t\tdur: dur/1000 + \"s\",\n\t\t\tvalues: currentValue + \";\" + value,\n\t\t\tkeySplines: EASING[easingType],\n\t\t\tkeyTimes: \"0;1\",\n\t\t\tcalcMode: \"spline\",\n\t\t\tfill: 'freeze'\n\t\t};\n\n\t\tif(type) {\n\t\t\tanimAttr[\"type\"] = type;\n\t\t}\n\n\t\tfor (var i in animAttr) {\n\t\t\tanimateElement.setAttribute(i, animAttr[i]);\n\t\t}\n\n\t\tanimElement.appendChild(animateElement);\n\n\t\tif(type) {\n\t\t\tnewElement.setAttribute(attributeName, `translate(${value})`);\n\t\t} else {\n\t\t\tnewElement.setAttribute(attributeName, value);\n\t\t}\n\t}\n\n\treturn [animElement, newElement];\n}\n\nexport function transform(element, style) { // eslint-disable-line no-unused-vars\n\telement.style.transform = style;\n\telement.style.webkitTransform = style;\n\telement.style.msTransform = style;\n\telement.style.mozTransform = style;\n\telement.style.oTransform = style;\n}\n\nfunction animateSVG(svgContainer, elements) {\n\tlet newElements = [];\n\tlet animElements = [];\n\n\telements.map(element => {\n\t\tlet unit = element[0];\n\t\tlet parent = unit.parentNode;\n\n\t\tlet animElement, newElement;\n\n\t\telement[0] = unit;\n\t\t[animElement, newElement] = animateSVGElement(...element);\n\n\t\tnewElements.push(newElement);\n\t\tanimElements.push([animElement, parent]);\n\t\t\n\t\tif (parent) {\n\t\t\tparent.replaceChild(animElement, unit);\n\t\t}\n\t});\n\n\tlet animSvg = svgContainer.cloneNode(true);\n\n\tanimElements.map((animElement, i) => {\n\t\tif (animElement[1]) {\n\t\t\tanimElement[1].replaceChild(newElements[i], animElement[0]);\n\t\t\telements[i][0] = newElements[i];\n\t\t}\n\t});\n\n\treturn animSvg;\n}\n\nexport function runSMILAnimation(parent, svgElement, elementsToAnimate) {\n\tif(elementsToAnimate.length === 0) return;\n\n\tlet animSvgElement = animateSVG(svgElement, elementsToAnimate);\n\tif(svgElement.parentNode == parent) {\n\t\tparent.removeChild(svgElement);\n\t\tparent.appendChild(animSvgElement);\n\n\t}\n\n\t// Replace the new svgElement (data has already been replaced)\n\tsetTimeout(() => {\n\t\tif(animSvgElement.parentNode == parent) {\n\t\t\tparent.removeChild(animSvgElement);\n\t\t\tparent.appendChild(svgElement);\n\t\t}\n\t}, REPLACE_ALL_NEW_DUR);\n}\n","import { $ } from '../utils/dom';\nimport { CSSTEXT } from '../../css/chartsCss';\n\nexport function downloadFile(filename, data) {\n\tvar a = document.createElement('a');\n\ta.style = \"display: none\";\n\tvar blob = new Blob(data, {type: \"image/svg+xml; charset=utf-8\"});\n\tvar url = window.URL.createObjectURL(blob);\n\ta.href = url;\n\ta.download = filename;\n\tdocument.body.appendChild(a);\n\ta.click();\n\tsetTimeout(function(){\n\t\tdocument.body.removeChild(a);\n\t\twindow.URL.revokeObjectURL(url);\n\t}, 300);\n}\n\nexport function prepareForExport(svg) {\n\tlet clone = svg.cloneNode(true);\n\tclone.classList.add('chart-container');\n\tclone.setAttribute('xmlns', \"http://www.w3.org/2000/svg\");\n\tclone.setAttribute('xmlns:xlink', \"http://www.w3.org/1999/xlink\");\n\tlet styleEl = $.create('style', {\n\t\t'innerHTML': CSSTEXT\n\t});\n\tclone.insertBefore(styleEl, clone.firstChild);\n\n\tlet container = $.create('div');\n\tcontainer.appendChild(clone);\n\n\treturn container.innerHTML;\n}\n","// Playing around with dates\n\nexport const NO_OF_YEAR_MONTHS = 12;\nexport const NO_OF_DAYS_IN_WEEK = 7;\nexport const DAYS_IN_YEAR = 375;\nexport const NO_OF_MILLIS = 1000;\nexport const SEC_IN_DAY = 86400;\n\nexport const MONTH_NAMES = [\"January\", \"February\", \"March\", \"April\", \"May\",\n\t\"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nexport const MONTH_NAMES_SHORT = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n\t\"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\nexport const DAY_NAMES_SHORT = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nexport const DAY_NAMES = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\",\n\t\"Thursday\", \"Friday\", \"Saturday\"];\n\n// https://stackoverflow.com/a/11252167/6495043\nfunction treatAsUtc(date) {\n\tlet result = new Date(date);\n\tresult.setMinutes(result.getMinutes() - result.getTimezoneOffset());\n\treturn result;\n}\n\nexport function getYyyyMmDd(date) {\n\tlet dd = date.getDate();\n\tlet mm = date.getMonth() + 1; // getMonth() is zero-based\n\treturn [\n\t\tdate.getFullYear(),\n\t\t(mm>9 ? '' : '0') + mm,\n\t\t(dd>9 ? '' : '0') + dd\n\t].join('-');\n}\n\nexport function clone(date) {\n\treturn new Date(date.getTime());\n}\n\nexport function timestampSec(date) {\n\treturn date.getTime()/NO_OF_MILLIS;\n}\n\nexport function timestampToMidnight(timestamp, roundAhead = false) {\n\tlet midnightTs = Math.floor(timestamp - (timestamp % SEC_IN_DAY));\n\tif(roundAhead) {\n\t\treturn midnightTs + SEC_IN_DAY;\n\t}\n\treturn midnightTs;\n}\n\n// export function getMonthsBetween(startDate, endDate) {}\n\nexport function getWeeksBetween(startDate, endDate) {\n\tlet weekStartDate = setDayToSunday(startDate);\n\treturn Math.ceil(getDaysBetween(weekStartDate, endDate) / NO_OF_DAYS_IN_WEEK);\n}\n\nexport function getDaysBetween(startDate, endDate) {\n\tlet millisecondsPerDay = SEC_IN_DAY * NO_OF_MILLIS;\n\treturn (treatAsUtc(endDate) - treatAsUtc(startDate)) / millisecondsPerDay;\n}\n\nexport function areInSameMonth(startDate, endDate) {\n\treturn startDate.getMonth() === endDate.getMonth()\n\t\t&& startDate.getFullYear() === endDate.getFullYear();\n}\n\nexport function getMonthName(i, short=false) {\n\tlet monthName = MONTH_NAMES[i];\n\treturn short ? monthName.slice(0, 3) : monthName;\n}\n\nexport function getLastDateInMonth (month, year) {\n\treturn new Date(year, month + 1, 0); // 0: last day in previous month\n}\n\n// mutates\nexport function setDayToSunday(date) {\n\tlet newDate = clone(date);\n\tconst day = newDate.getDay();\n\tif(day !== 0) {\n\t\taddDays(newDate, (-1) * day);\n\t}\n\treturn newDate;\n}\n\n// mutates\nexport function addDays(date, numberOfDays) {\n\tdate.setDate(date.getDate() + numberOfDays);\n}\n","import { makeSVGGroup } from '../utils/draw';\nimport { makeText, makePath, xLine, yLine, yMarker, yRegion, datasetBar, datasetDot, percentageBar, getPaths, heatSquare } from '../utils/draw';\nimport { equilizeNoOfElements } from '../utils/draw-utils';\nimport { translateHoriLine, translateVertLine, animateRegion, animateBar,\n\tanimateDot, animatePath, animatePathStr } from '../utils/animate';\nimport { getMonthName } from '../utils/date-utils';\n\nclass ChartComponent {\n\tconstructor({\n\t\tlayerClass = '',\n\t\tlayerTransform = '',\n\t\tconstants,\n\n\t\tgetData,\n\t\tmakeElements,\n\t\tanimateElements\n\t}) {\n\t\tthis.layerTransform = layerTransform;\n\t\tthis.constants = constants;\n\n\t\tthis.makeElements = makeElements;\n\t\tthis.getData = getData;\n\n\t\tthis.animateElements = animateElements;\n\n\t\tthis.store = [];\n\t\tthis.labels = [];\n\n\t\tthis.layerClass = layerClass;\n\t\tthis.layerClass = typeof(this.layerClass) === 'function'\n\t\t\t? this.layerClass() : this.layerClass;\n\n\t\tthis.refresh();\n\t}\n\n\trefresh(data) {\n\t\tthis.data = data || this.getData();\n\t}\n\n\tsetup(parent) {\n\t\tthis.layer = makeSVGGroup(this.layerClass, this.layerTransform, parent);\n\t}\n\n\tmake() {\n\t\tthis.render(this.data);\n\t\tthis.oldData = this.data;\n\t}\n\n\trender(data) {\n\t\tthis.store = this.makeElements(data);\n\n\t\tthis.layer.textContent = '';\n\t\tthis.store.forEach(element => {\n\t\t\tthis.layer.appendChild(element);\n\t\t});\n\t\tthis.labels.forEach(element => {\n\t\t\tthis.layer.appendChild(element);\n\t\t});\n\t}\n\n\tupdate(animate = true) {\n\t\tthis.refresh();\n\t\tlet animateElements = [];\n\t\tif(animate) {\n\t\t\tanimateElements = this.animateElements(this.data) || [];\n\t\t}\n\t\treturn animateElements;\n\t}\n}\n\nlet componentConfigs = {\n\tdonutSlices: {\n\t\tlayerClass: 'donut-slices',\n\t\tmakeElements(data) {\n\t\t\treturn data.sliceStrings.map((s, i) => {\n\t\t\t\tlet slice = makePath(s, 'donut-path', data.colors[i], 'none', data.strokeWidth);\n\t\t\t\tslice.style.transition = 'transform .3s;';\n\t\t\t\treturn slice;\n\t\t\t});\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\treturn this.store.map((slice, i) => animatePathStr(slice, newData.sliceStrings[i]));\n\t\t},\n\t},\n\tpieSlices: {\n\t\tlayerClass: 'pie-slices',\n\t\tmakeElements(data) {\n\t\t\treturn data.sliceStrings.map((s, i) =>{\n\t\t\t\tlet slice = makePath(s, 'pie-path', 'none', data.colors[i]);\n\t\t\t\tslice.style.transition = 'transform .3s;';\n\t\t\t\treturn slice;\n\t\t\t});\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\treturn this.store.map((slice, i) =>\n\t\t\t\tanimatePathStr(slice, newData.sliceStrings[i])\n\t\t\t);\n\t\t}\n\t},\n\tpercentageBars: {\n\t\tlayerClass: 'percentage-bars',\n\t\tmakeElements(data) {\n\t\t\treturn data.xPositions.map((x, i) =>{\n\t\t\t\tlet y = 0;\n\t\t\t\tlet bar = percentageBar(x, y, data.widths[i],\n\t\t\t\t\tthis.constants.barHeight, this.constants.barDepth, data.colors[i]);\n\t\t\t\treturn bar;\n\t\t\t});\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tif(newData) return [];\n\t\t}\n\t},\n\tyAxis: {\n\t\tlayerClass: 'y axis',\n\t\tmakeElements(data) {\n\t\t\treturn data.positions.map((position, i) =>\n\t\t\t\tyLine(position, data.labels[i], this.constants.width,\n\t\t\t\t\t{mode: this.constants.mode, pos: this.constants.pos, shortenNumbers: this.constants.shortenNumbers})\n\t\t\t);\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tlet newPos = newData.positions;\n\t\t\tlet newLabels = newData.labels;\n\t\t\tlet oldPos = this.oldData.positions;\n\t\t\tlet oldLabels = this.oldData.labels;\n\n\t\t\t[oldPos, newPos] = equilizeNoOfElements(oldPos, newPos);\n\t\t\t[oldLabels, newLabels] = equilizeNoOfElements(oldLabels, newLabels);\n\n\t\t\tthis.render({\n\t\t\t\tpositions: oldPos,\n\t\t\t\tlabels: newLabels\n\t\t\t});\n\n\t\t\treturn this.store.map((line, i) => {\n\t\t\t\treturn translateHoriLine(\n\t\t\t\t\tline, newPos[i], oldPos[i]\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t},\n\n\txAxis: {\n\t\tlayerClass: 'x axis',\n\t\tmakeElements(data) {\n\t\t\treturn data.positions.map((position, i) =>\n\t\t\t\txLine(position, data.calcLabels[i], this.constants.height,\n\t\t\t\t\t{mode: this.constants.mode, pos: this.constants.pos})\n\t\t\t);\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tlet newPos = newData.positions;\n\t\t\tlet newLabels = newData.calcLabels;\n\t\t\tlet oldPos = this.oldData.positions;\n\t\t\tlet oldLabels = this.oldData.calcLabels;\n\n\t\t\t[oldPos, newPos] = equilizeNoOfElements(oldPos, newPos);\n\t\t\t[oldLabels, newLabels] = equilizeNoOfElements(oldLabels, newLabels);\n\n\t\t\tthis.render({\n\t\t\t\tpositions: oldPos,\n\t\t\t\tcalcLabels: newLabels\n\t\t\t});\n\n\t\t\treturn this.store.map((line, i) => {\n\t\t\t\treturn translateVertLine(\n\t\t\t\t\tline, newPos[i], oldPos[i]\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t},\n\n\tyMarkers: {\n\t\tlayerClass: 'y-markers',\n\t\tmakeElements(data) {\n\t\t\treturn data.map(m =>\n\t\t\t\tyMarker(m.position, m.label, this.constants.width,\n\t\t\t\t\t{labelPos: m.options.labelPos, mode: 'span', lineType: 'dashed'})\n\t\t\t);\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\t[this.oldData, newData] = equilizeNoOfElements(this.oldData, newData);\n\n\t\t\tlet newPos = newData.map(d => d.position);\n\t\t\tlet newLabels = newData.map(d => d.label);\n\t\t\tlet newOptions = newData.map(d => d.options);\n\n\t\t\tlet oldPos = this.oldData.map(d => d.position);\n\n\t\t\tthis.render(oldPos.map((pos, i) => {\n\t\t\t\treturn {\n\t\t\t\t\tposition: oldPos[i],\n\t\t\t\t\tlabel: newLabels[i],\n\t\t\t\t\toptions: newOptions[i]\n\t\t\t\t};\n\t\t\t}));\n\n\t\t\treturn this.store.map((line, i) => {\n\t\t\t\treturn translateHoriLine(\n\t\t\t\t\tline, newPos[i], oldPos[i]\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t},\n\n\tyRegions: {\n\t\tlayerClass: 'y-regions',\n\t\tmakeElements(data) {\n\t\t\treturn data.map(r =>\n\t\t\t\tyRegion(r.startPos, r.endPos, this.constants.width,\n\t\t\t\t\tr.label, {labelPos: r.options.labelPos})\n\t\t\t);\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\t[this.oldData, newData] = equilizeNoOfElements(this.oldData, newData);\n\n\t\t\tlet newPos = newData.map(d => d.endPos);\n\t\t\tlet newLabels = newData.map(d => d.label);\n\t\t\tlet newStarts = newData.map(d => d.startPos);\n\t\t\tlet newOptions = newData.map(d => d.options);\n\n\t\t\tlet oldPos = this.oldData.map(d => d.endPos);\n\t\t\tlet oldStarts = this.oldData.map(d => d.startPos);\n\n\t\t\tthis.render(oldPos.map((pos, i) => {\n\t\t\t\treturn {\n\t\t\t\t\tstartPos: oldStarts[i],\n\t\t\t\t\tendPos: oldPos[i],\n\t\t\t\t\tlabel: newLabels[i],\n\t\t\t\t\toptions: newOptions[i]\n\t\t\t\t};\n\t\t\t}));\n\n\t\t\tlet animateElements = [];\n\n\t\t\tthis.store.map((rectGroup, i) => {\n\t\t\t\tanimateElements = animateElements.concat(animateRegion(\n\t\t\t\t\trectGroup, newStarts[i], newPos[i], oldPos[i]\n\t\t\t\t));\n\t\t\t});\n\n\t\t\treturn animateElements;\n\t\t}\n\t},\n\n\theatDomain: {\n\t\tlayerClass: function() { return 'heat-domain domain-' + this.constants.index; },\n\t\tmakeElements(data) {\n\t\t\tlet {index, colWidth, rowHeight, squareSize, radius, xTranslate} = this.constants;\n\t\t\tlet monthNameHeight = -12;\n\t\t\tlet x = xTranslate, y = 0;\n\n\t\t\tthis.serializedSubDomains = [];\n\n\t\t\tdata.cols.map((week, weekNo) => {\n\t\t\t\tif(weekNo === 1) {\n\t\t\t\t\tthis.labels.push(\n\t\t\t\t\t\tmakeText('domain-name', x, monthNameHeight, getMonthName(index, true).toUpperCase(),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfontSize: 9\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tweek.map((day, i) => {\n\t\t\t\t\tif(day.fill) {\n\t\t\t\t\t\tlet data = {\n\t\t\t\t\t\t\t'data-date': day.yyyyMmDd,\n\t\t\t\t\t\t\t'data-value': day.dataValue,\n\t\t\t\t\t\t\t'data-day': i\n\t\t\t\t\t\t};\n\t\t\t\t\t\tlet square = heatSquare('day', x, y, squareSize, radius, day.fill, data);\n\t\t\t\t\t\tthis.serializedSubDomains.push(square);\n\t\t\t\t\t}\n\t\t\t\t\ty += rowHeight;\n\t\t\t\t});\n\t\t\t\ty = 0;\n\t\t\t\tx += colWidth;\n\t\t\t});\n\n\t\t\treturn this.serializedSubDomains;\n\t\t},\n\n\t\tanimateElements(newData) {\n\t\t\tif(newData) return [];\n\t\t}\n\t},\n\n\tbarGraph: {\n\t\tlayerClass: function() { return 'dataset-units dataset-bars dataset-' + this.constants.index; },\n\t\tmakeElements(data) {\n\t\t\tlet c = this.constants;\n\t\t\tthis.unitType = 'bar';\n\t\t\tthis.units = data.yPositions.map((y, j) => {\n\t\t\t\treturn datasetBar(\n\t\t\t\t\tdata.xPositions[j],\n\t\t\t\t\ty,\n\t\t\t\t\tdata.barWidth,\n\t\t\t\t\tc.color,\n\t\t\t\t\tdata.labels[j],\n\t\t\t\t\tj,\n\t\t\t\t\tdata.offsets[j],\n\t\t\t\t\t{\n\t\t\t\t\t\tzeroLine: data.zeroLine,\n\t\t\t\t\t\tbarsWidth: data.barsWidth,\n\t\t\t\t\t\tminHeight: c.minHeight\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t\treturn this.units;\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\tlet newXPos = newData.xPositions;\n\t\t\tlet newYPos = newData.yPositions;\n\t\t\tlet newOffsets = newData.offsets;\n\t\t\tlet newLabels = newData.labels;\n\n\t\t\tlet oldXPos = this.oldData.xPositions;\n\t\t\tlet oldYPos = this.oldData.yPositions;\n\t\t\tlet oldOffsets = this.oldData.offsets;\n\t\t\tlet oldLabels = this.oldData.labels;\n\n\t\t\t[oldXPos, newXPos] = equilizeNoOfElements(oldXPos, newXPos);\n\t\t\t[oldYPos, newYPos] = equilizeNoOfElements(oldYPos, newYPos);\n\t\t\t[oldOffsets, newOffsets] = equilizeNoOfElements(oldOffsets, newOffsets);\n\t\t\t[oldLabels, newLabels] = equilizeNoOfElements(oldLabels, newLabels);\n\n\t\t\tthis.render({\n\t\t\t\txPositions: oldXPos,\n\t\t\t\tyPositions: oldYPos,\n\t\t\t\toffsets: oldOffsets,\n\t\t\t\tlabels: newLabels,\n\n\t\t\t\tzeroLine: this.oldData.zeroLine,\n\t\t\t\tbarsWidth: this.oldData.barsWidth,\n\t\t\t\tbarWidth: this.oldData.barWidth,\n\t\t\t});\n\n\t\t\tlet animateElements = [];\n\n\t\t\tthis.store.map((bar, i) => {\n\t\t\t\tanimateElements = animateElements.concat(animateBar(\n\t\t\t\t\tbar, newXPos[i], newYPos[i], newData.barWidth, newOffsets[i],\n\t\t\t\t\t{zeroLine: newData.zeroLine}\n\t\t\t\t));\n\t\t\t});\n\n\t\t\treturn animateElements;\n\t\t}\n\t},\n\n\tlineGraph: {\n\t\tlayerClass: function() { return 'dataset-units dataset-line dataset-' + this.constants.index; },\n\t\tmakeElements(data) {\n\t\t\tlet c = this.constants;\n\t\t\tthis.unitType = 'dot';\n\t\t\tthis.paths = {};\n\t\t\tif(!c.hideLine) {\n\t\t\t\tthis.paths = getPaths(\n\t\t\t\t\tdata.xPositions,\n\t\t\t\t\tdata.yPositions,\n\t\t\t\t\tc.color,\n\t\t\t\t\t{\n\t\t\t\t\t\theatline: c.heatline,\n\t\t\t\t\t\tregionFill: c.regionFill,\n\t\t\t\t\t\tspline: c.spline\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tsvgDefs: c.svgDefs,\n\t\t\t\t\t\tzeroLine: data.zeroLine\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.units = [];\n\t\t\tif(!c.hideDots) {\n\t\t\t\tthis.units = data.yPositions.map((y, j) => {\n\t\t\t\t\treturn datasetDot(\n\t\t\t\t\t\tdata.xPositions[j],\n\t\t\t\t\t\ty,\n\t\t\t\t\t\tdata.radius,\n\t\t\t\t\t\tc.color,\n\t\t\t\t\t\t(c.valuesOverPoints ? data.values[j] : ''),\n\t\t\t\t\t\tj\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn Object.values(this.paths).concat(this.units);\n\t\t},\n\t\tanimateElements(newData) {\n\t\t\tlet newXPos = newData.xPositions;\n\t\t\tlet newYPos = newData.yPositions;\n\t\t\tlet newValues = newData.values;\n\n\t\t\tlet oldXPos = this.oldData.xPositions;\n\t\t\tlet oldYPos = this.oldData.yPositions;\n\t\t\tlet oldValues = this.oldData.values;\n\n\t\t\t[oldXPos, newXPos] = equilizeNoOfElements(oldXPos, newXPos);\n\t\t\t[oldYPos, newYPos] = equilizeNoOfElements(oldYPos, newYPos);\n\t\t\t[oldValues, newValues] = equilizeNoOfElements(oldValues, newValues);\n\n\t\t\tthis.render({\n\t\t\t\txPositions: oldXPos,\n\t\t\t\tyPositions: oldYPos,\n\t\t\t\tvalues: newValues,\n\n\t\t\t\tzeroLine: this.oldData.zeroLine,\n\t\t\t\tradius: this.oldData.radius,\n\t\t\t});\n\n\t\t\tlet animateElements = [];\n\n\t\t\tif(Object.keys(this.paths).length) {\n\t\t\t\tanimateElements = animateElements.concat(animatePath(\n\t\t\t\t\tthis.paths, newXPos, newYPos, newData.zeroLine, this.constants.spline));\n\t\t\t}\n\n\t\t\tif(this.units.length) {\n\t\t\t\tthis.units.map((dot, i) => {\n\t\t\t\t\tanimateElements = animateElements.concat(animateDot(\n\t\t\t\t\t\tdot, newXPos[i], newYPos[i]));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn animateElements;\n\t\t}\n\t}\n};\n\nexport function getComponent(name, constants, getData) {\n\tlet keys = Object.keys(componentConfigs).filter(k => name.includes(k));\n\tlet config = componentConfigs[keys[0]];\n\tObject.assign(config, {\n\t\tconstants: constants,\n\t\tgetData: getData\n\t});\n\treturn new ChartComponent(config);\n}\n","import { floatTwo } from './helpers';\n\nfunction normalize(x) {\n\t// Calculates mantissa and exponent of a number\n\t// Returns normalized number and exponent\n\t// https://stackoverflow.com/q/9383593/6495043\n\n\tif(x===0) {\n\t\treturn [0, 0];\n\t}\n\tif(isNaN(x)) {\n\t\treturn {mantissa: -6755399441055744, exponent: 972};\n\t}\n\tvar sig = x > 0 ? 1 : -1;\n\tif(!isFinite(x)) {\n\t\treturn {mantissa: sig * 4503599627370496, exponent: 972};\n\t}\n\n\tx = Math.abs(x);\n\tvar exp = Math.floor(Math.log10(x));\n\tvar man = x/Math.pow(10, exp);\n\n\treturn [sig * man, exp];\n}\n\nfunction getChartRangeIntervals(max, min=0) {\n\tlet upperBound = Math.ceil(max);\n\tlet lowerBound = Math.floor(min);\n\tlet range = upperBound - lowerBound;\n\n\tlet noOfParts = range;\n\tlet partSize = 1;\n\n\t// To avoid too many partitions\n\tif(range > 5) {\n\t\tif(range % 2 !== 0) {\n\t\t\tupperBound++;\n\t\t\t// Recalc range\n\t\t\trange = upperBound - lowerBound;\n\t\t}\n\t\tnoOfParts = range/2;\n\t\tpartSize = 2;\n\t}\n\n\t// Special case: 1 and 2\n\tif(range <= 2) {\n\t\tnoOfParts = 4;\n\t\tpartSize = range/noOfParts;\n\t}\n\n\t// Special case: 0\n\tif(range === 0) {\n\t\tnoOfParts = 5;\n\t\tpartSize = 1;\n\t}\n\n\tlet intervals = [];\n\tfor(var i = 0; i <= noOfParts; i++){\n\t\tintervals.push(lowerBound + partSize * i);\n\t}\n\treturn intervals;\n}\n\nfunction getChartIntervals(maxValue, minValue=0) {\n\tlet [normalMaxValue, exponent] = normalize(maxValue);\n\tlet normalMinValue = minValue ? minValue/Math.pow(10, exponent): 0;\n\n\t// Allow only 7 significant digits\n\tnormalMaxValue = normalMaxValue.toFixed(6);\n\n\tlet intervals = getChartRangeIntervals(normalMaxValue, normalMinValue);\n\tintervals = intervals.map(value => value * Math.pow(10, exponent));\n\treturn intervals;\n}\n\nexport function calcChartIntervals(values, withMinimum=false) {\n\t//*** Where the magic happens ***\n\n\t// Calculates best-fit y intervals from given values\n\t// and returns the interval array\n\n\tlet maxValue = Math.max(...values);\n\tlet minValue = Math.min(...values);\n\n\t// Exponent to be used for pretty print\n\tlet exponent = 0, intervals = []; // eslint-disable-line no-unused-vars\n\n\tfunction getPositiveFirstIntervals(maxValue, absMinValue) {\n\t\tlet intervals = getChartIntervals(maxValue);\n\n\t\tlet intervalSize = intervals[1] - intervals[0];\n\n\t\t// Then unshift the negative values\n\t\tlet value = 0;\n\t\tfor(var i = 1; value < absMinValue; i++) {\n\t\t\tvalue += intervalSize;\n\t\t\tintervals.unshift((-1) * value);\n\t\t}\n\t\treturn intervals;\n\t}\n\n\t// CASE I: Both non-negative\n\n\tif(maxValue >= 0 && minValue >= 0) {\n\t\texponent = normalize(maxValue)[1];\n\t\tif(!withMinimum) {\n\t\t\tintervals = getChartIntervals(maxValue);\n\t\t} else {\n\t\t\tintervals = getChartIntervals(maxValue, minValue);\n\t\t}\n\t}\n\n\t// CASE II: Only minValue negative\n\n\telse if(maxValue > 0 && minValue < 0) {\n\t\t// `withMinimum` irrelevant in this case,\n\t\t// We'll be handling both sides of zero separately\n\t\t// (both starting from zero)\n\t\t// Because ceil() and floor() behave differently\n\t\t// in those two regions\n\n\t\tlet absMinValue = Math.abs(minValue);\n\n\t\tif(maxValue >= absMinValue) {\n\t\t\texponent = normalize(maxValue)[1];\n\t\t\tintervals = getPositiveFirstIntervals(maxValue, absMinValue);\n\t\t} else {\n\t\t\t// Mirror: maxValue => absMinValue, then change sign\n\t\t\texponent = normalize(absMinValue)[1];\n\t\t\tlet posIntervals = getPositiveFirstIntervals(absMinValue, maxValue);\n\t\t\tintervals = posIntervals.reverse().map(d => d * (-1));\n\t\t}\n\n\t}\n\n\t// CASE III: Both non-positive\n\n\telse if(maxValue <= 0 && minValue <= 0) {\n\t\t// Mirrored Case I:\n\t\t// Work with positives, then reverse the sign and array\n\n\t\tlet pseudoMaxValue = Math.abs(minValue);\n\t\tlet pseudoMinValue = Math.abs(maxValue);\n\n\t\texponent = normalize(pseudoMaxValue)[1];\n\t\tif(!withMinimum) {\n\t\t\tintervals = getChartIntervals(pseudoMaxValue);\n\t\t} else {\n\t\t\tintervals = getChartIntervals(pseudoMaxValue, pseudoMinValue);\n\t\t}\n\n\t\tintervals = intervals.reverse().map(d => d * (-1));\n\t}\n\n\treturn intervals;\n}\n\nexport function getZeroIndex(yPts) {\n\tlet zeroIndex;\n\tlet interval = getIntervalSize(yPts);\n\tif(yPts.indexOf(0) >= 0) {\n\t\t// the range has a given zero\n\t\t// zero-line on the chart\n\t\tzeroIndex = yPts.indexOf(0);\n\t} else if(yPts[0] > 0) {\n\t\t// Minimum value is positive\n\t\t// zero-line is off the chart: below\n\t\tlet min = yPts[0];\n\t\tzeroIndex = (-1) * min / interval;\n\t} else {\n\t\t// Maximum value is negative\n\t\t// zero-line is off the chart: above\n\t\tlet max = yPts[yPts.length - 1];\n\t\tzeroIndex = (-1) * max / interval + (yPts.length - 1);\n\t}\n\treturn zeroIndex;\n}\n\nexport function getRealIntervals(max, noOfIntervals, min = 0, asc = 1) {\n\tlet range = max - min;\n\tlet part = range * 1.0 / noOfIntervals;\n\tlet intervals = [];\n\n\tfor(var i = 0; i <= noOfIntervals; i++) {\n\t\tintervals.push(min + part * i);\n\t}\n\n\treturn asc ? intervals : intervals.reverse();\n}\n\nexport function getIntervalSize(orderedArray) {\n\treturn orderedArray[1] - orderedArray[0];\n}\n\nexport function getValueRange(orderedArray) {\n\treturn orderedArray[orderedArray.length-1] - orderedArray[0];\n}\n\nexport function scale(val, yAxis) {\n\treturn floatTwo(yAxis.zeroLine - val * yAxis.scaleMultiplier);\n}\n\nexport function isInRange(val, min, max) {\n\treturn val > min && val < max;\n}\n\nexport function isInRange2D(coord, minCoord, maxCoord) {\n\treturn isInRange(coord[0], minCoord[0], maxCoord[0])\n\t\t&& isInRange(coord[1], minCoord[1], maxCoord[1]);\n}\n\nexport function getClosestInArray(goal, arr, index = false) {\n\tlet closest = arr.reduce(function(prev, curr) {\n\t\treturn (Math.abs(curr - goal) < Math.abs(prev - goal) ? curr : prev);\n\t}, []);\n\n\treturn index ? arr.indexOf(closest) : closest;\n}\n\nexport function calcDistribution(values, distributionSize) {\n\t// Assume non-negative values,\n\t// implying distribution minimum at zero\n\n\tlet dataMaxValue = Math.max(...values);\n\n\tlet distributionStep = 1 / (distributionSize - 1);\n\tlet distribution = [];\n\n\tfor(var i = 0; i < distributionSize; i++) {\n\t\tlet checkpoint = dataMaxValue * (distributionStep * i);\n\t\tdistribution.push(checkpoint);\n\t}\n\n\treturn distribution;\n}\n\nexport function getMaxCheckpoint(value, distribution) {\n\treturn distribution.filter(d => d < value).length;\n}\n","import { fillArray } from '../utils/helpers';\nimport { DEFAULT_AXIS_CHART_TYPE, AXIS_DATASET_CHART_TYPES, DEFAULT_CHAR_WIDTH } from '../utils/constants';\n\nexport function dataPrep(data, type) {\n\tdata.labels = data.labels || [];\n\n\tlet datasetLength = data.labels.length;\n\n\t// Datasets\n\tlet datasets = data.datasets;\n\tlet zeroArray = new Array(datasetLength).fill(0);\n\tif(!datasets) {\n\t\t// default\n\t\tdatasets = [{\n\t\t\tvalues: zeroArray\n\t\t}];\n\t}\n\n\tdatasets.map(d=> {\n\t\t// Set values\n\t\tif(!d.values) {\n\t\t\td.values = zeroArray;\n\t\t} else {\n\t\t\t// Check for non values\n\t\t\tlet vals = d.values;\n\t\t\tvals = vals.map(val => (!isNaN(val) ? val : 0));\n\n\t\t\t// Trim or extend\n\t\t\tif(vals.length > datasetLength) {\n\t\t\t\tvals = vals.slice(0, datasetLength);\n\t\t\t} else {\n\t\t\t\tvals = fillArray(vals, datasetLength - vals.length, 0);\n\t\t\t}\n\t\t\td.values = vals;\n\t\t}\n\n\t\t// Set type\n\t\tif(!d.chartType ) {\n\t\t\tif(!AXIS_DATASET_CHART_TYPES.includes(type)) type === DEFAULT_AXIS_CHART_TYPE;\n\t\t\td.chartType = type;\n\t\t}\n\n\t});\n\n\t// Markers\n\n\t// Regions\n\t// data.yRegions = data.yRegions || [];\n\tif(data.yRegions) {\n\t\tdata.yRegions.map(d => {\n\t\t\tif(d.end < d.start) {\n\t\t\t\t[d.start, d.end] = [d.end, d.start];\n\t\t\t}\n\t\t});\n\t}\n\n\treturn data;\n}\n\nexport function zeroDataPrep(realData) {\n\tlet datasetLength = realData.labels.length;\n\tlet zeroArray = new Array(datasetLength).fill(0);\n\n\tlet zeroData = {\n\t\tlabels: realData.labels.slice(0, -1),\n\t\tdatasets: realData.datasets.map(d => {\n\t\t\treturn {\n\t\t\t\tname: '',\n\t\t\t\tvalues: zeroArray.slice(0, -1),\n\t\t\t\tchartType: d.chartType\n\t\t\t};\n\t\t}),\n\t};\n\n\tif(realData.yMarkers) {\n\t\tzeroData.yMarkers = [\n\t\t\t{\n\t\t\t\tvalue: 0,\n\t\t\t\tlabel: ''\n\t\t\t}\n\t\t];\n\t}\n\n\tif(realData.yRegions) {\n\t\tzeroData.yRegions = [\n\t\t\t{\n\t\t\t\tstart: 0,\n\t\t\t\tend: 0,\n\t\t\t\tlabel: ''\n\t\t\t}\n\t\t];\n\t}\n\n\treturn zeroData;\n}\n\nexport function getShortenedLabels(chartWidth, labels=[], isSeries=true) {\n\tlet allowedSpace = chartWidth / labels.length;\n\tif(allowedSpace <= 0) allowedSpace = 1;\n\tlet allowedLetters = allowedSpace / DEFAULT_CHAR_WIDTH;\n\n\tlet seriesMultiple;\n\tif(isSeries) {\n\t\t// Find the maximum label length for spacing calculations\n\t\tlet maxLabelLength = Math.max(...labels.map(label => label.length));\n\t\tseriesMultiple = Math.ceil(maxLabelLength/allowedLetters);\n\t}\n\n\tlet calcLabels = labels.map((label, i) => {\n\t\tlabel += \"\";\n\t\tif(label.length > allowedLetters) {\n\n\t\t\tif(!isSeries) {\n\t\t\t\tif(allowedLetters-3 > 0) {\n\t\t\t\t\tlabel = label.slice(0, allowedLetters-3) + \" ...\";\n\t\t\t\t} else {\n\t\t\t\t\tlabel = label.slice(0, allowedLetters) + '..';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(i % seriesMultiple !== 0) {\n\t\t\t\t\tlabel = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn label;\n\t});\n\n\treturn calcLabels;\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { $ } from '../utils/dom';\nimport { TOOLTIP_POINTER_TRIANGLE_HEIGHT } from '../utils/constants';\n\nexport default class SvgTip {\n\tconstructor({\n\t\tparent = null,\n\t\tcolors = []\n\t}) {\n\t\tthis.parent = parent;\n\t\tthis.colors = colors;\n\t\tthis.titleName = '';\n\t\tthis.titleValue = '';\n\t\tthis.listValues = [];\n\t\tthis.titleValueFirst = 0;\n\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\n\t\tthis.top = 0;\n\t\tthis.left = 0;\n\n\t\tthis.setup();\n\t}\n\n\tsetup() {\n\t\tthis.makeTooltip();\n\t}\n\n\trefresh() {\n\t\tthis.fill();\n\t\tthis.calcPosition();\n\t}\n\n\tmakeTooltip() {\n\t\tthis.container = $.create('div', {\n\t\t\tinside: this.parent,\n\t\t\tclassName: 'graph-svg-tip comparison',\n\t\t\tinnerHTML: `\n\t\t\t\t
          \n\t\t\t\t
          `\n\t\t});\n\t\tthis.hideTip();\n\n\t\tthis.title = this.container.querySelector('.title');\n\t\tthis.dataPointList = this.container.querySelector('.data-point-list');\n\n\t\tthis.parent.addEventListener('mouseleave', () => {\n\t\t\tthis.hideTip();\n\t\t});\n\t}\n\n\tfill() {\n\t\tlet title;\n\t\tif(this.index) {\n\t\t\tthis.container.setAttribute('data-point-index', this.index);\n\t\t}\n\t\tif(this.titleValueFirst) {\n\t\t\ttitle = `${this.titleValue}${this.titleName}`;\n\t\t} else {\n\t\t\ttitle = `${this.titleName}${this.titleValue}`;\n\t\t}\n\t\tthis.title.innerHTML = title;\n\t\tthis.dataPointList.innerHTML = '';\n\n\t\tthis.listValues.map((set, i) => {\n\t\t\tconst color = this.colors[i] || 'black';\n\t\t\tlet value = set.formatted === 0 || set.formatted ? set.formatted : set.value;\n\n\t\t\tlet li = $.create('li', {\n\t\t\t\tstyles: {\n\t\t\t\t\t'border-top': `3px solid ${color}`\n\t\t\t\t},\n\t\t\t\tinnerHTML: `${ value === 0 || value ? value : '' }\n\t\t\t\t\t${set.title ? set.title : '' }`\n\t\t\t});\n\n\t\t\tthis.dataPointList.appendChild(li);\n\t\t});\n\t}\n\n\tcalcPosition() {\n\t\tlet width = this.container.offsetWidth;\n\n\t\tthis.top = this.y - this.container.offsetHeight\n\t\t\t- TOOLTIP_POINTER_TRIANGLE_HEIGHT;\n\t\tthis.left = this.x - width/2;\n\t\tlet maxLeft = this.parent.offsetWidth - width;\n\n\t\tlet pointer = this.container.querySelector('.svg-pointer');\n\n\t\tif(this.left < 0) {\n\t\t\tpointer.style.left = `calc(50% - ${-1 * this.left}px)`;\n\t\t\tthis.left = 0;\n\t\t} else if(this.left > maxLeft) {\n\t\t\tlet delta = this.left - maxLeft;\n\t\t\tlet pointerOffset = `calc(50% + ${delta}px)`;\n\t\t\tpointer.style.left = pointerOffset;\n\n\t\t\tthis.left = maxLeft;\n\t\t} else {\n\t\t\tpointer.style.left = `50%`;\n\t\t}\n\t}\n\n\tsetValues(x, y, title = {}, listValues = [], index = -1) {\n\t\tthis.titleName = title.name;\n\t\tthis.titleValue = title.value;\n\t\tthis.listValues = listValues;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.titleValueFirst = title.valueFirst || 0;\n\t\tthis.index = index;\n\t\tthis.refresh();\n\t}\n\n\thideTip() {\n\t\tthis.container.style.top = '0px';\n\t\tthis.container.style.left = '0px';\n\t\tthis.container.style.opacity = '0';\n\t}\n\n\tshowTip() {\n\t\tthis.container.style.top = this.top + 'px';\n\t\tthis.container.style.left = this.left + 'px';\n\t\tthis.container.style.opacity = '1';\n\t}\n}\n","export const CSSTEXT = \".chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Cantarell','Fira Sans','Droid Sans','Helvetica Neue',sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ul{padding-left:0;display:flex}.graph-svg-tip ol{padding-left:0;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:' ';border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}\";","import SvgTip from '../objects/SvgTip';\nimport { $, isElementInViewport, getElementContentWidth, isHidden } from '../utils/dom';\nimport { makeSVGContainer, makeSVGDefs, makeSVGGroup, makeText } from '../utils/draw';\nimport { BASE_MEASURES, getExtraHeight, getExtraWidth, getTopOffset, getLeftOffset,\n\tINIT_CHART_UPDATE_TIMEOUT, CHART_POST_ANIMATE_TIMEOUT, DEFAULT_COLORS} from '../utils/constants';\nimport { getColor, isValidColor } from '../utils/colors';\nimport { runSMILAnimation } from '../utils/animation';\nimport { downloadFile, prepareForExport } from '../utils/export';\nimport { deepClone } from '../utils/helpers';\n\nexport default class BaseChart {\n\tconstructor(parent, options) {\n\t\t// deepclone options to avoid making changes to orignal object\n\t\toptions = deepClone(options);\n\n\t\tthis.parent = typeof parent === 'string'\n\t\t\t? document.querySelector(parent)\n\t\t\t: parent;\n\n\t\tif (!(this.parent instanceof HTMLElement)) {\n\t\t\tthrow new Error('No `parent` element to render on was provided.');\n\t\t}\n\n\t\tthis.rawChartArgs = options;\n\n\t\tthis.title = options.title || '';\n\t\tthis.type = options.type || '';\n\n\t\tthis.realData = this.prepareData(options.data);\n\t\tthis.data = this.prepareFirstData(this.realData);\n\n\t\tthis.colors = this.validateColors(options.colors, this.type);\n\n\t\tthis.config = {\n\t\t\tshowTooltip: 1, // calculate\n\t\t\tshowLegend: 1, // calculate\n\t\t\tisNavigable: options.isNavigable || 0,\n\t\t\tanimate: (typeof options.animate !== 'undefined') ? options.animate : 1,\n\t\t\ttruncateLegends: options.truncateLegends || 1\n\t\t};\n\n\t\tthis.measures = JSON.parse(JSON.stringify(BASE_MEASURES));\n\t\tlet m = this.measures;\n\t\tthis.setMeasures(options);\n\t\tif(!this.title.length) { m.titleHeight = 0; }\n\t\tif(!this.config.showLegend) m.legendHeight = 0;\n\t\tthis.argHeight = options.height || m.baseHeight;\n\n\t\tthis.state = {};\n\t\tthis.options = {};\n\n\t\tthis.initTimeout = INIT_CHART_UPDATE_TIMEOUT;\n\n\t\tif(this.config.isNavigable) {\n\t\t\tthis.overlays = [];\n\t\t}\n\n\t\tthis.configure(options);\n\t}\n\n\tprepareData(data) {\n\t\treturn data;\n\t}\n\n\tprepareFirstData(data) {\n\t\treturn data;\n\t}\n\n\tvalidateColors(colors, type) {\n\t\tconst validColors = [];\n\t\tcolors = (colors || []).concat(DEFAULT_COLORS[type]);\n\t\tcolors.forEach((string) => {\n\t\t\tconst color = getColor(string);\n\t\t\tif(!isValidColor(color)) {\n\t\t\t\tconsole.warn('\"' + string + '\" is not a valid color.');\n\t\t\t} else {\n\t\t\t\tvalidColors.push(color);\n\t\t\t}\n\t\t});\n\t\treturn validColors;\n\t}\n\n\tsetMeasures() {\n\t\t// Override measures, including those for title and legend\n\t\t// set config for legend and title\n\t}\n\n\tconfigure() {\n\t\tlet height = this.argHeight;\n\t\tthis.baseHeight = height;\n\t\tthis.height = height - getExtraHeight(this.measures);\n\n\t\t// Bind window events\n\t\tthis.boundDrawFn = () => this.draw(true);\n\t\tif (ResizeObserver) {\n\t\t\tthis.resizeObserver = new ResizeObserver(this.boundDrawFn);\n\t\t\tthis.resizeObserver.observe(this.parent);\n\t\t}\n\t\twindow.addEventListener('resize', this.boundDrawFn);\n\t\twindow.addEventListener('orientationchange', this.boundDrawFn);\n\t}\n\n\tdestroy() {\n\t\tif (this.resizeObserver) this.resizeObserver.disconnect();\n\t\twindow.removeEventListener('resize', this.boundDrawFn);\n\t\twindow.removeEventListener('orientationchange', this.boundDrawFn);\n\t}\n\n\t// Has to be called manually\n\tsetup() {\n\t\tthis.makeContainer();\n\t\tthis.updateWidth();\n\t\tthis.makeTooltip();\n\n\t\tthis.draw(false, true);\n\t}\n\n\tmakeContainer() {\n\t\t// Chart needs a dedicated parent element\n\t\tthis.parent.innerHTML = '';\n\n\t\tlet args = {\n\t\t\tinside: this.parent,\n\t\t\tclassName: 'chart-container'\n\t\t};\n\n\t\tif(this.independentWidth) {\n\t\t\targs.styles = { width: this.independentWidth + 'px' };\n\t\t}\n\n\t\tthis.container = $.create('div', args);\n\t}\n\n\tmakeTooltip() {\n\t\tthis.tip = new SvgTip({\n\t\t\tparent: this.container,\n\t\t\tcolors: this.colors\n\t\t});\n\t\tthis.bindTooltip();\n\t}\n\n\tbindTooltip() {}\n\n\tdraw(onlyWidthChange=false, init=false) {\n\t\tif (onlyWidthChange && isHidden(this.parent)) {\n\t\t\t// Don't update anything if the chart is hidden\n\t\t\treturn;\n\t\t}\n\t\tthis.updateWidth();\n\n\t\tthis.calc(onlyWidthChange);\n\t\tthis.makeChartArea();\n\t\tthis.setupComponents();\n\n\t\tthis.components.forEach(c => c.setup(this.drawArea));\n\t\t// this.components.forEach(c => c.make());\n\t\tthis.render(this.components, false);\n\n\t\tif(init) {\n\t\t\tthis.data = this.realData;\n\t\t\tsetTimeout(() => {this.update(this.data);}, this.initTimeout);\n\t\t}\n\n\t\tthis.renderLegend();\n\n\t\tthis.setupNavigation(init);\n\t}\n\n\tcalc() {} // builds state\n\n\tupdateWidth() {\n\t\tthis.baseWidth = getElementContentWidth(this.parent);\n\t\tthis.width = this.baseWidth - getExtraWidth(this.measures);\n\t}\n\n\tmakeChartArea() {\n\t\tif(this.svg) {\n\t\t\tthis.container.removeChild(this.svg);\n\t\t}\n\t\tlet m = this.measures;\n\n\t\tthis.svg = makeSVGContainer(\n\t\t\tthis.container,\n\t\t\t'frappe-chart chart',\n\t\t\tthis.baseWidth,\n\t\t\tthis.baseHeight\n\t\t);\n\t\tthis.svgDefs = makeSVGDefs(this.svg);\n\n\t\tif(this.title.length) {\n\t\t\tthis.titleEL = makeText(\n\t\t\t\t'title',\n\t\t\t\tm.margins.left,\n\t\t\t\tm.margins.top,\n\t\t\t\tthis.title,\n\t\t\t\t{\n\t\t\t\t\tfontSize: m.titleFontSize,\n\t\t\t\t\tfill: '#666666',\n\t\t\t\t\tdy: m.titleFontSize\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tlet top = getTopOffset(m);\n\t\tthis.drawArea = makeSVGGroup(\n\t\t\tthis.type + '-chart chart-draw-area',\n\t\t\t`translate(${getLeftOffset(m)}, ${top})`\n\t\t);\n\n\t\tif(this.config.showLegend) {\n\t\t\ttop += this.height + m.paddings.bottom;\n\t\t\tthis.legendArea = makeSVGGroup(\n\t\t\t\t'chart-legend',\n\t\t\t\t`translate(${getLeftOffset(m)}, ${top})`\n\t\t\t);\n\t\t}\n\n\t\tif(this.title.length) { this.svg.appendChild(this.titleEL); }\n\t\tthis.svg.appendChild(this.drawArea);\n\t\tif(this.config.showLegend) { this.svg.appendChild(this.legendArea); }\n\n\t\tthis.updateTipOffset(getLeftOffset(m), getTopOffset(m));\n\t}\n\n\tupdateTipOffset(x, y) {\n\t\tthis.tip.offset = {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t}\n\n\tsetupComponents() { this.components = new Map(); }\n\n\tupdate(data) {\n\t\tif(!data) {\n\t\t\tconsole.error('No data to update.');\n\t\t}\n\t\tthis.data = this.prepareData(data);\n\t\tthis.calc(); // builds state\n\t\tthis.render(this.components, this.config.animate);\n\t\tthis.renderLegend();\n\t}\n\n\trender(components=this.components, animate=true) {\n\t\tif(this.config.isNavigable) {\n\t\t\t// Remove all existing overlays\n\t\t\tthis.overlays.map(o => o.parentNode.removeChild(o));\n\t\t\t// ref.parentNode.insertBefore(element, ref);\n\t\t}\n\t\tlet elementsToAnimate = [];\n\t\t// Can decouple to this.refreshComponents() first to save animation timeout\n\t\tcomponents.forEach(c => {\n\t\t\telementsToAnimate = elementsToAnimate.concat(c.update(animate));\n\t\t});\n\t\tif(elementsToAnimate.length > 0) {\n\t\t\trunSMILAnimation(this.container, this.svg, elementsToAnimate);\n\t\t\tsetTimeout(() => {\n\t\t\t\tcomponents.forEach(c => c.make());\n\t\t\t\tthis.updateNav();\n\t\t\t}, CHART_POST_ANIMATE_TIMEOUT);\n\t\t} else {\n\t\t\tcomponents.forEach(c => c.make());\n\t\t\tthis.updateNav();\n\t\t}\n\t}\n\n\tupdateNav() {\n\t\tif(this.config.isNavigable) {\n\t\t\tthis.makeOverlay();\n\t\t\tthis.bindUnits();\n\t\t}\n\t}\n\n\trenderLegend() {}\n\n\tsetupNavigation(init=false) {\n\t\tif(!this.config.isNavigable) return;\n\n\t\tif(init) {\n\t\t\tthis.bindOverlay();\n\n\t\t\tthis.keyActions = {\n\t\t\t\t'13': this.onEnterKey.bind(this),\n\t\t\t\t'37': this.onLeftArrow.bind(this),\n\t\t\t\t'38': this.onUpArrow.bind(this),\n\t\t\t\t'39': this.onRightArrow.bind(this),\n\t\t\t\t'40': this.onDownArrow.bind(this),\n\t\t\t};\n\n\t\t\tdocument.addEventListener('keydown', (e) => {\n\t\t\t\tif(isElementInViewport(this.container)) {\n\t\t\t\t\te = e || window.event;\n\t\t\t\t\tif(this.keyActions[e.keyCode]) {\n\t\t\t\t\t\tthis.keyActions[e.keyCode]();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tmakeOverlay() {}\n\tupdateOverlay() {}\n\tbindOverlay() {}\n\tbindUnits() {}\n\n\tonLeftArrow() {}\n\tonRightArrow() {}\n\tonUpArrow() {}\n\tonDownArrow() {}\n\tonEnterKey() {}\n\n\taddDataPoint() {}\n\tremoveDataPoint() {}\n\n\tgetDataPoint() {}\n\tsetCurrentDataPoint() {}\n\n\tupdateDataset() {}\n\n\texport() {\n\t\tlet chartSvg = prepareForExport(this.svg);\n\t\tdownloadFile(this.title || 'Chart', [chartSvg]);\n\t}\n}\n","import BaseChart from './BaseChart';\nimport { truncateString } from '../utils/draw-utils';\nimport { legendDot } from '../utils/draw';\nimport { round } from '../utils/helpers';\nimport { getExtraWidth } from '../utils/constants';\n\nexport default class AggregationChart extends BaseChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t}\n\n\tconfigure(args) {\n\t\tsuper.configure(args);\n\n\t\tthis.config.formatTooltipY = (args.tooltipOptions || {}).formatTooltipY;\n\t\tthis.config.maxSlices = args.maxSlices || 20;\n\t\tthis.config.maxLegendPoints = args.maxLegendPoints || 20;\n\t}\n\n\tcalc() {\n\t\tlet s = this.state;\n\t\tlet maxSlices = this.config.maxSlices;\n\t\ts.sliceTotals = [];\n\n\t\tlet allTotals = this.data.labels.map((label, i) => {\n\t\t\tlet total = 0;\n\t\t\tthis.data.datasets.map(e => {\n\t\t\t\ttotal += e.values[i];\n\t\t\t});\n\t\t\treturn [total, label];\n\t\t}).filter(d => { return d[0] >= 0; }); // keep only positive results\n\n\t\tlet totals = allTotals;\n\t\tif(allTotals.length > maxSlices) {\n\t\t\t// Prune and keep a grey area for rest as per maxSlices\n\t\t\tallTotals.sort((a, b) => { return b[0] - a[0]; });\n\n\t\t\ttotals = allTotals.slice(0, maxSlices-1);\n\t\t\tlet remaining = allTotals.slice(maxSlices-1);\n\n\t\t\tlet sumOfRemaining = 0;\n\t\t\tremaining.map(d => {sumOfRemaining += d[0];});\n\t\t\ttotals.push([sumOfRemaining, 'Rest']);\n\t\t\tthis.colors[maxSlices-1] = 'grey';\n\t\t}\n\n\t\ts.labels = [];\n\t\ttotals.map(d => {\n\t\t\ts.sliceTotals.push(round(d[0]));\n\t\t\ts.labels.push(d[1]);\n\t\t});\n\n\t\ts.grandTotal = s.sliceTotals.reduce((a, b) => a + b, 0);\n\n\t\tthis.center = {\n\t\t\tx: this.width / 2,\n\t\t\ty: this.height / 2\n\t\t};\n\t}\n\n\trenderLegend() {\n\t\tlet s = this.state;\n\t\tthis.legendArea.textContent = '';\n\t\tthis.legendTotals = s.sliceTotals.slice(0, this.config.maxLegendPoints);\n\n\t\tlet count = 0;\n\t\tlet y = 0;\n\t\tthis.legendTotals.map((d, i) => {\n\t\t\tlet barWidth = 150;\n\t\t\tlet divisor = Math.floor(\n\t\t\t\t(this.width - getExtraWidth(this.measures))/barWidth\n\t\t\t);\n\t\t\tif (this.legendTotals.length < divisor) {\n\t\t\t\tbarWidth = this.width/this.legendTotals.length;\n\t\t\t}\n\t\t\tif(count > divisor) {\n\t\t\t\tcount = 0;\n\t\t\t\ty += 20;\n\t\t\t}\n\t\t\tlet x = barWidth * count + 5;\n\t\t\tlet label = this.config.truncateLegends ? truncateString(s.labels[i], barWidth/10) : s.labels[i];\n\t\t\tlet formatted = this.config.formatTooltipY ? this.config.formatTooltipY(d) : d;\n\t\t\tlet dot = legendDot(\n\t\t\t\tx,\n\t\t\t\ty,\n\t\t\t\t5,\n\t\t\t\tthis.colors[i],\n\t\t\t\t`${label}: ${formatted}`,\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tthis.legendArea.appendChild(dot);\n\t\t\tcount++;\n\t\t});\n\t}\n}\n","import AggregationChart from './AggregationChart';\nimport { getOffset } from '../utils/dom';\nimport { getComponent } from '../objects/ChartComponents';\nimport { PERCENTAGE_BAR_DEFAULT_HEIGHT, PERCENTAGE_BAR_DEFAULT_DEPTH } from '../utils/constants';\n\nexport default class PercentageChart extends AggregationChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t\tthis.type = 'percentage';\n\t\tthis.setup();\n\t}\n\n\tsetMeasures(options) {\n\t\tlet m = this.measures;\n\t\tthis.barOptions = options.barOptions || {};\n\n\t\tlet b = this.barOptions;\n\t\tb.height = b.height || PERCENTAGE_BAR_DEFAULT_HEIGHT;\n\t\tb.depth = b.depth || PERCENTAGE_BAR_DEFAULT_DEPTH;\n\n\t\tm.paddings.right = 30;\n\t\tm.legendHeight = 60;\n\t\tm.baseHeight = (b.height + b.depth * 0.5) * 8;\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'percentageBars',\n\t\t\t\t{\n\t\t\t\t\tbarHeight: this.barOptions.height,\n\t\t\t\t\tbarDepth: this.barOptions.depth,\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\txPositions: s.xPositions,\n\t\t\t\t\t\twidths: s.widths,\n\t\t\t\t\t\tcolors: this.colors\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tcalc() {\n\t\tsuper.calc();\n\t\tlet s = this.state;\n\n\t\ts.xPositions = [];\n\t\ts.widths = [];\n\n\t\tlet xPos = 0;\n\t\ts.sliceTotals.map((value) => {\n\t\t\tlet width = this.width * value / s.grandTotal;\n\t\t\ts.widths.push(width);\n\t\t\ts.xPositions.push(xPos);\n\t\t\txPos += width;\n\t\t});\n\t}\n\n\tmakeDataByIndex() { }\n\n\tbindTooltip() {\n\t\tlet s = this.state;\n\t\tthis.container.addEventListener('mousemove', (e) => {\n\t\t\tlet bars = this.components.get('percentageBars').store;\n\t\t\tlet bar = e.target;\n\t\t\tif(bars.includes(bar)) {\n\n\t\t\t\tlet i = bars.indexOf(bar);\n\t\t\t\tlet gOff = getOffset(this.container), pOff = getOffset(bar);\n\n\t\t\t\tlet x = pOff.left - gOff.left + parseInt(bar.getAttribute('width'))/2;\n\t\t\t\tlet y = pOff.top - gOff.top;\n\t\t\t\tlet title = (this.formattedLabels && this.formattedLabels.length>0\n\t\t\t\t\t? this.formattedLabels[i] : this.state.labels[i]) + ': ';\n\t\t\t\tlet fraction = s.sliceTotals[i]/s.grandTotal;\n\n\t\t\t\tthis.tip.setValues(x, y, {name: title, value: (fraction*100).toFixed(1) + \"%\"});\n\t\t\t\tthis.tip.showTip();\n\t\t\t}\n\t\t});\n\t}\n}\n","import AggregationChart from './AggregationChart';\nimport { getComponent } from '../objects/ChartComponents';\nimport { getOffset } from '../utils/dom';\nimport { getPositionByAngle } from '../utils/helpers';\nimport { makeArcPathStr, makeCircleStr } from '../utils/draw';\nimport { lightenDarkenColor } from '../utils/colors';\nimport { transform } from '../utils/animation';\nimport { FULL_ANGLE } from '../utils/constants';\n\nexport default class PieChart extends AggregationChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t\tthis.type = 'pie';\n\t\tthis.initTimeout = 0;\n\t\tthis.init = 1;\n\n\t\tthis.setup();\n\t}\n\n\tconfigure(args) {\n\t\tsuper.configure(args);\n\t\tthis.mouseMove = this.mouseMove.bind(this);\n\t\tthis.mouseLeave = this.mouseLeave.bind(this);\n\n\t\tthis.hoverRadio = args.hoverRadio || 0.1;\n\t\tthis.config.startAngle = args.startAngle || 0;\n\n\t\tthis.clockWise = args.clockWise || false;\n\t}\n\n\tcalc() {\n\t\tsuper.calc();\n\t\tlet s = this.state;\n\t\tthis.radius = (this.height > this.width ? this.center.x : this.center.y);\n\n\t\tconst { radius, clockWise } = this;\n\n\t\tconst prevSlicesProperties = s.slicesProperties || [];\n\t\ts.sliceStrings = [];\n\t\ts.slicesProperties = [];\n\t\tlet curAngle = 180 - this.config.startAngle;\n\t\ts.sliceTotals.map((total, i) => {\n\t\t\tconst startAngle = curAngle;\n\t\t\tconst originDiffAngle = (total / s.grandTotal) * FULL_ANGLE;\n\t\t\tconst largeArc = originDiffAngle > 180 ? 1: 0;\n\t\t\tconst diffAngle = clockWise ? -originDiffAngle : originDiffAngle;\n\t\t\tconst endAngle = curAngle = curAngle + diffAngle;\n\t\t\tconst startPosition = getPositionByAngle(startAngle, radius);\n\t\t\tconst endPosition = getPositionByAngle(endAngle, radius);\n\n\t\t\tconst prevProperty = this.init && prevSlicesProperties[i];\n\n\t\t\tlet curStart,curEnd;\n\t\t\tif(this.init) {\n\t\t\t\tcurStart = prevProperty ? prevProperty.startPosition : startPosition;\n\t\t\t\tcurEnd = prevProperty ? prevProperty.endPosition : startPosition;\n\t\t\t} else {\n\t\t\t\tcurStart = startPosition;\n\t\t\t\tcurEnd = endPosition;\n\t\t\t}\n\t\t\tconst curPath =\n\t\t\t\toriginDiffAngle === 360\n\t\t\t\t\t? makeCircleStr(curStart, curEnd, this.center, this.radius, clockWise, largeArc)\n\t\t\t\t\t: makeArcPathStr(curStart, curEnd, this.center, this.radius, clockWise, largeArc);\n\n\t\t\ts.sliceStrings.push(curPath);\n\t\t\ts.slicesProperties.push({\n\t\t\t\tstartPosition,\n\t\t\t\tendPosition,\n\t\t\t\tvalue: total,\n\t\t\t\ttotal: s.grandTotal,\n\t\t\t\tstartAngle,\n\t\t\t\tendAngle,\n\t\t\t\tangle: diffAngle\n\t\t\t});\n\n\t\t});\n\t\tthis.init = 0;\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'pieSlices',\n\t\t\t\t{ },\n\t\t\t\tfunction() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsliceStrings: s.sliceStrings,\n\t\t\t\t\t\tcolors: this.colors\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tcalTranslateByAngle(property){\n\t\tconst{radius,hoverRadio} = this;\n\t\tconst position = getPositionByAngle(property.startAngle+(property.angle / 2),radius);\n\t\treturn `translate3d(${(position.x) * hoverRadio}px,${(position.y) * hoverRadio}px,0)`;\n\t}\n\n\thoverSlice(path,i,flag,e){\n\t\tif(!path) return;\n\t\tconst color = this.colors[i];\n\t\tif(flag) {\n\t\t\ttransform(path, this.calTranslateByAngle(this.state.slicesProperties[i]));\n\t\t\tpath.style.fill = lightenDarkenColor(color, 50);\n\t\t\tlet g_off = getOffset(this.svg);\n\t\t\tlet x = e.pageX - g_off.left + 10;\n\t\t\tlet y = e.pageY - g_off.top - 10;\n\t\t\tlet title = (this.formatted_labels && this.formatted_labels.length > 0\n\t\t\t\t? this.formatted_labels[i] : this.state.labels[i]) + ': ';\n\t\t\tlet percent = (this.state.sliceTotals[i] * 100 / this.state.grandTotal).toFixed(1);\n\t\t\tthis.tip.setValues(x, y, {name: title, value: percent + \"%\"});\n\t\t\tthis.tip.showTip();\n\t\t} else {\n\t\t\ttransform(path,'translate3d(0,0,0)');\n\t\t\tthis.tip.hideTip();\n\t\t\tpath.style.fill = color;\n\t\t}\n\t}\n\n\tbindTooltip() {\n\t\tthis.container.addEventListener('mousemove', this.mouseMove);\n\t\tthis.container.addEventListener('mouseleave', this.mouseLeave);\n\t}\n\n\tmouseMove(e){\n\t\tconst target = e.target;\n\t\tlet slices = this.components.get('pieSlices').store;\n\t\tlet prevIndex = this.curActiveSliceIndex;\n\t\tlet prevAcitve = this.curActiveSlice;\n\t\tif(slices.includes(target)) {\n\t\t\tlet i = slices.indexOf(target);\n\t\t\tthis.hoverSlice(prevAcitve, prevIndex,false);\n\t\t\tthis.curActiveSlice = target;\n\t\t\tthis.curActiveSliceIndex = i;\n\t\t\tthis.hoverSlice(target, i, true, e);\n\t\t} else {\n\t\t\tthis.mouseLeave();\n\t\t}\n\t}\n\n\tmouseLeave(){\n\t\tthis.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,false);\n\t}\n}\n","import BaseChart from './BaseChart';\nimport { getComponent } from '../objects/ChartComponents';\nimport { makeText, heatSquare } from '../utils/draw';\nimport { DAY_NAMES_SHORT, addDays, areInSameMonth, getLastDateInMonth, setDayToSunday, getYyyyMmDd, getWeeksBetween, getMonthName, clone,\n\tNO_OF_MILLIS, NO_OF_YEAR_MONTHS, NO_OF_DAYS_IN_WEEK } from '../utils/date-utils';\nimport { calcDistribution, getMaxCheckpoint } from '../utils/intervals';\nimport { getExtraHeight, getExtraWidth, HEATMAP_DISTRIBUTION_SIZE, HEATMAP_SQUARE_SIZE,\n\tHEATMAP_GUTTER_SIZE } from '../utils/constants';\n\nconst COL_WIDTH = HEATMAP_SQUARE_SIZE + HEATMAP_GUTTER_SIZE;\nconst ROW_HEIGHT = COL_WIDTH;\n// const DAY_INCR = 1;\n\nexport default class Heatmap extends BaseChart {\n\tconstructor(parent, options) {\n\t\tsuper(parent, options);\n\t\tthis.type = 'heatmap';\n\n\t\tthis.countLabel = options.countLabel || '';\n\n\t\tlet validStarts = ['Sunday', 'Monday'];\n\t\tlet startSubDomain = validStarts.includes(options.startSubDomain)\n\t\t\t? options.startSubDomain : 'Sunday';\n\t\tthis.startSubDomainIndex = validStarts.indexOf(startSubDomain);\n\n\t\tthis.setup();\n\t}\n\n\tsetMeasures(options) {\n\t\tlet m = this.measures;\n\t\tthis.discreteDomains = options.discreteDomains === 0 ? 0 : 1;\n\n\t\tm.paddings.top = ROW_HEIGHT * 3;\n\t\tm.paddings.bottom = 0;\n\t\tm.legendHeight = ROW_HEIGHT * 2;\n\t\tm.baseHeight = ROW_HEIGHT * NO_OF_DAYS_IN_WEEK\n\t\t\t+ getExtraHeight(m);\n\n\t\tlet d = this.data;\n\t\tlet spacing = this.discreteDomains ? NO_OF_YEAR_MONTHS : 0;\n\t\tthis.independentWidth = (getWeeksBetween(d.start, d.end)\n\t\t\t+ spacing) * COL_WIDTH + getExtraWidth(m);\n\t}\n\n\tupdateWidth() {\n\t\tlet spacing = this.discreteDomains ? NO_OF_YEAR_MONTHS : 0;\n\t\tlet noOfWeeks = this.state.noOfWeeks ? this.state.noOfWeeks : 52;\n\t\tthis.baseWidth = (noOfWeeks + spacing) * COL_WIDTH\n\t\t\t+ getExtraWidth(this.measures);\n\t}\n\n\tprepareData(data=this.data) {\n\t\tif(data.start && data.end && data.start > data.end) {\n\t\t\tthrow new Error('Start date cannot be greater than end date.');\n\t\t}\n\n\t\tif(!data.start) {\n\t\t\tdata.start = new Date();\n\t\t\tdata.start.setFullYear( data.start.getFullYear() - 1 );\n\t\t}\n\t\tif(!data.end) { data.end = new Date(); }\n\t\tdata.dataPoints = data.dataPoints || {};\n\n\t\tif(parseInt(Object.keys(data.dataPoints)[0]) > 100000) {\n\t\t\tlet points = {};\n\t\t\tObject.keys(data.dataPoints).forEach(timestampSec => {\n\t\t\t\tlet date = new Date(timestampSec * NO_OF_MILLIS);\n\t\t\t\tpoints[getYyyyMmDd(date)] = data.dataPoints[timestampSec];\n\t\t\t});\n\t\t\tdata.dataPoints = points;\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tcalc() {\n\t\tlet s = this.state;\n\n\t\ts.start = clone(this.data.start);\n\t\ts.end = clone(this.data.end);\n\n\t\ts.firstWeekStart = clone(s.start);\n\t\ts.noOfWeeks = getWeeksBetween(s.start, s.end);\n\t\ts.distribution = calcDistribution(\n\t\t\tObject.values(this.data.dataPoints), HEATMAP_DISTRIBUTION_SIZE);\n\n\t\ts.domainConfigs = this.getDomains();\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\t\tlet lessCol = this.discreteDomains ? 0 : 1;\n\n\t\tlet componentConfigs = s.domainConfigs.map((config, i) => [\n\t\t\t'heatDomain',\n\t\t\t{\n\t\t\t\tindex: config.index,\n\t\t\t\tcolWidth: COL_WIDTH,\n\t\t\t\trowHeight: ROW_HEIGHT,\n\t\t\t\tsquareSize: HEATMAP_SQUARE_SIZE,\n\t\t\t\tradius: this.rawChartArgs.radius || 0,\n\t\t\t\txTranslate: s.domainConfigs\n\t\t\t\t\t.filter((config, j) => j < i)\n\t\t\t\t\t.map(config => config.cols.length - lessCol)\n\t\t\t\t\t.reduce((a, b) => a + b, 0)\n\t\t\t\t\t* COL_WIDTH\n\t\t\t},\n\t\t\tfunction() {\n\t\t\t\treturn s.domainConfigs[i];\n\t\t\t}.bind(this)\n\n\t\t]);\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map((args, i) => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0] + '-' + i, component];\n\t\t\t})\n\t\t);\n\n\t\tlet y = 0;\n\t\tDAY_NAMES_SHORT.forEach((dayName, i) => {\n\t\t\tif([1, 3, 5].includes(i)) {\n\t\t\t\tlet dayText = makeText('subdomain-name', -COL_WIDTH/2, y, dayName,\n\t\t\t\t\t{\n\t\t\t\t\t\tfontSize: HEATMAP_SQUARE_SIZE,\n\t\t\t\t\t\tdy: 8,\n\t\t\t\t\t\ttextAnchor: 'end'\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tthis.drawArea.appendChild(dayText);\n\t\t\t}\n\t\t\ty += ROW_HEIGHT;\n\t\t});\n\t}\n\n\tupdate(data) {\n\t\tif(!data) {\n\t\t\tconsole.error('No data to update.');\n\t\t}\n\n\t\tthis.data = this.prepareData(data);\n\t\tthis.draw();\n\t\tthis.bindTooltip();\n\t}\n\n\tbindTooltip() {\n\t\tthis.container.addEventListener('mousemove', (e) => {\n\t\t\tthis.components.forEach(comp => {\n\t\t\t\tlet daySquares = comp.store;\n\t\t\t\tlet daySquare = e.target;\n\t\t\t\tif(daySquares.includes(daySquare)) {\n\n\t\t\t\t\tlet count = daySquare.getAttribute('data-value');\n\t\t\t\t\tlet dateParts = daySquare.getAttribute('data-date').split('-');\n\n\t\t\t\t\tlet month = getMonthName(parseInt(dateParts[1])-1, true);\n\n\t\t\t\t\tlet gOff = this.container.getBoundingClientRect(), pOff = daySquare.getBoundingClientRect();\n\n\t\t\t\t\tlet width = parseInt(e.target.getAttribute('width'));\n\t\t\t\t\tlet x = pOff.left - gOff.left + width/2;\n\t\t\t\t\tlet y = pOff.top - gOff.top;\n\t\t\t\t\tlet value = count + ' ' + this.countLabel;\n\t\t\t\t\tlet name = ' on ' + month + ' ' + dateParts[0] + ', ' + dateParts[2];\n\n\t\t\t\t\tthis.tip.setValues(x, y, {name: name, value: value, valueFirst: 1}, []);\n\t\t\t\t\tthis.tip.showTip();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\trenderLegend() {\n\t\tthis.legendArea.textContent = '';\n\t\tlet x = 0;\n\t\tlet y = ROW_HEIGHT;\n\t\tlet radius = this.rawChartArgs.radius || 0;\n\n\t\tlet lessText = makeText('subdomain-name', x, y, 'Less',\n\t\t\t{\n\t\t\t\tfontSize: HEATMAP_SQUARE_SIZE + 1,\n\t\t\t\tdy: 9\n\t\t\t}\n\t\t);\n\t\tx = (COL_WIDTH * 2) + COL_WIDTH/2;\n\t\tthis.legendArea.appendChild(lessText);\n\n\t\tthis.colors.slice(0, HEATMAP_DISTRIBUTION_SIZE).map((color, i) => {\n\t\t\tconst square = heatSquare('heatmap-legend-unit', x + (COL_WIDTH + 3) * i,\n\t\t\t\ty, HEATMAP_SQUARE_SIZE, radius, color);\n\t\t\tthis.legendArea.appendChild(square);\n\t\t});\n\n\t\tlet moreTextX = x + HEATMAP_DISTRIBUTION_SIZE * (COL_WIDTH + 3) + COL_WIDTH/4;\n\t\tlet moreText = makeText('subdomain-name', moreTextX, y, 'More',\n\t\t\t{\n\t\t\t\tfontSize: HEATMAP_SQUARE_SIZE + 1,\n\t\t\t\tdy: 9\n\t\t\t}\n\t\t);\n\t\tthis.legendArea.appendChild(moreText);\n\t}\n\n\tgetDomains() {\n\t\tlet s = this.state;\n\t\tconst [startMonth, startYear] = [s.start.getMonth(), s.start.getFullYear()];\n\t\tconst [endMonth, endYear] = [s.end.getMonth(), s.end.getFullYear()];\n\n\t\tconst noOfMonths = (endMonth - startMonth + 1) + (endYear - startYear) * 12;\n\n\t\tlet domainConfigs = [];\n\n\t\tlet startOfMonth = clone(s.start);\n\t\tfor(var i = 0; i < noOfMonths; i++) {\n\t\t\tlet endDate = s.end;\n\t\t\tif(!areInSameMonth(startOfMonth, s.end)) {\n\t\t\t\tlet [month, year] = [startOfMonth.getMonth(), startOfMonth.getFullYear()];\n\t\t\t\tendDate = getLastDateInMonth(month, year);\n\t\t\t}\n\t\t\tdomainConfigs.push(this.getDomainConfig(startOfMonth, endDate));\n\n\t\t\taddDays(endDate, 1);\n\t\t\tstartOfMonth = endDate;\n\t\t}\n\n\t\treturn domainConfigs;\n\t}\n\n\tgetDomainConfig(startDate, endDate='') {\n\t\tlet [month, year] = [startDate.getMonth(), startDate.getFullYear()];\n\t\tlet startOfWeek = setDayToSunday(startDate); // TODO: Monday as well\n\t\tendDate = clone(endDate) || getLastDateInMonth(month, year);\n\n\t\tlet domainConfig = {\n\t\t\tindex: month,\n\t\t\tcols: []\n\t\t};\n\n\t\taddDays(endDate, 1);\n\t\tlet noOfMonthWeeks = getWeeksBetween(startOfWeek, endDate);\n\n\t\tlet cols = [], col;\n\t\tfor(var i = 0; i < noOfMonthWeeks; i++) {\n\t\t\tcol = this.getCol(startOfWeek, month);\n\t\t\tcols.push(col);\n\n\t\t\tstartOfWeek = new Date(col[NO_OF_DAYS_IN_WEEK - 1].yyyyMmDd);\n\t\t\taddDays(startOfWeek, 1);\n\t\t}\n\n\t\tif(col[NO_OF_DAYS_IN_WEEK - 1].dataValue !== undefined) {\n\t\t\taddDays(startOfWeek, 1);\n\t\t\tcols.push(this.getCol(startOfWeek, month, true));\n\t\t}\n\n\t\tdomainConfig.cols = cols;\n\n\t\treturn domainConfig;\n\t}\n\n\tgetCol(startDate, month, empty = false) {\n\t\tlet s = this.state;\n\n\t\t// startDate is the start of week\n\t\tlet currentDate = clone(startDate);\n\t\tlet col = [];\n\n\t\tfor(var i = 0; i < NO_OF_DAYS_IN_WEEK; i++, addDays(currentDate, 1)) {\n\t\t\tlet config = {};\n\n\t\t\t// Non-generic adjustment for entire heatmap, needs state\n\t\t\tlet currentDateWithinData = currentDate >= s.start && currentDate <= s.end;\n\n\t\t\tif(empty || currentDate.getMonth() !== month || !currentDateWithinData) {\n\t\t\t\tconfig.yyyyMmDd = getYyyyMmDd(currentDate);\n\t\t\t} else {\n\t\t\t\tconfig = this.getSubDomainConfig(currentDate);\n\t\t\t}\n\t\t\tcol.push(config);\n\t\t}\n\n\t\treturn col;\n\t}\n\n\tgetSubDomainConfig(date) {\n\t\tlet yyyyMmDd = getYyyyMmDd(date);\n\t\tlet dataValue = this.data.dataPoints[yyyyMmDd];\n\t\tlet config = {\n\t\t\tyyyyMmDd: yyyyMmDd,\n\t\t\tdataValue: dataValue || 0,\n\t\t\tfill: this.colors[getMaxCheckpoint(dataValue, this.state.distribution)]\n\t\t};\n\t\treturn config;\n\t}\n}\n","import BaseChart from './BaseChart';\nimport { dataPrep, zeroDataPrep, getShortenedLabels } from '../utils/axis-chart-utils';\nimport { AXIS_LEGEND_BAR_SIZE } from '../utils/constants';\nimport { getComponent } from '../objects/ChartComponents';\nimport { getOffset, fire } from '../utils/dom';\nimport { calcChartIntervals, getIntervalSize, getValueRange, getZeroIndex, scale, getClosestInArray } from '../utils/intervals';\nimport { floatTwo } from '../utils/helpers';\nimport { makeOverlay, updateOverlay, legendBar } from '../utils/draw';\nimport { getTopOffset, getLeftOffset, MIN_BAR_PERCENT_HEIGHT, BAR_CHART_SPACE_RATIO,\n\tLINE_CHART_DOT_SIZE } from '../utils/constants';\n\nexport default class AxisChart extends BaseChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\n\t\tthis.barOptions = args.barOptions || {};\n\t\tthis.lineOptions = args.lineOptions || {};\n\n\t\tthis.type = args.type || 'line';\n\t\tthis.init = 1;\n\n\t\tthis.setup();\n\t}\n\n\tsetMeasures() {\n\t\tif(this.data.datasets.length <= 1) {\n\t\t\tthis.config.showLegend = 0;\n\t\t\tthis.measures.paddings.bottom = 30;\n\t\t}\n\t}\n\n\tconfigure(options) {\n\t\tsuper.configure(options);\n\n\t\toptions.axisOptions = options.axisOptions || {};\n\t\toptions.tooltipOptions = options.tooltipOptions || {};\n\n\t\tthis.config.xAxisMode = options.axisOptions.xAxisMode || 'span';\n\t\tthis.config.yAxisMode = options.axisOptions.yAxisMode || 'span';\n\t\tthis.config.xIsSeries = options.axisOptions.xIsSeries || 0;\n\t\tthis.config.shortenYAxisNumbers = options.axisOptions.shortenYAxisNumbers || 0;\n\n\t\tthis.config.formatTooltipX = options.tooltipOptions.formatTooltipX;\n\t\tthis.config.formatTooltipY = options.tooltipOptions.formatTooltipY;\n\n\t\tthis.config.valuesOverPoints = options.valuesOverPoints;\n\t}\n\n\tprepareData(data=this.data) {\n\t\treturn dataPrep(data, this.type);\n\t}\n\n\tprepareFirstData(data=this.data) {\n\t\treturn zeroDataPrep(data);\n\t}\n\n\tcalc(onlyWidthChange = false) {\n\t\tthis.calcXPositions();\n\t\tif(!onlyWidthChange) {\n\t\t\tthis.calcYAxisParameters(this.getAllYValues(), this.type === 'line');\n\t\t}\n\t\tthis.makeDataByIndex();\n\t}\n\n\tcalcXPositions() {\n\t\tlet s = this.state;\n\t\tlet labels = this.data.labels;\n\t\ts.datasetLength = labels.length;\n\n\t\ts.unitWidth = this.width/(s.datasetLength);\n\t\t// Default, as per bar, and mixed. Only line will be a special case\n\t\ts.xOffset = s.unitWidth/2;\n\n\t\t// // For a pure Line Chart\n\t\t// s.unitWidth = this.width/(s.datasetLength - 1);\n\t\t// s.xOffset = 0;\n\n\t\ts.xAxis = {\n\t\t\tlabels: labels,\n\t\t\tpositions: labels.map((d, i) =>\n\t\t\t\tfloatTwo(s.xOffset + i * s.unitWidth)\n\t\t\t)\n\t\t};\n\t}\n\n\tcalcYAxisParameters(dataValues, withMinimum = 'false') {\n\t\tconst yPts = calcChartIntervals(dataValues, withMinimum);\n\t\tconst scaleMultiplier = this.height / getValueRange(yPts);\n\t\tconst intervalHeight = getIntervalSize(yPts) * scaleMultiplier;\n\t\tconst zeroLine = this.height - (getZeroIndex(yPts) * intervalHeight);\n\n\t\tthis.state.yAxis = {\n\t\t\tlabels: yPts,\n\t\t\tpositions: yPts.map(d => zeroLine - d * scaleMultiplier),\n\t\t\tscaleMultiplier: scaleMultiplier,\n\t\t\tzeroLine: zeroLine,\n\t\t};\n\n\t\t// Dependent if above changes\n\t\tthis.calcDatasetPoints();\n\t\tthis.calcYExtremes();\n\t\tthis.calcYRegions();\n\t}\n\n\tcalcDatasetPoints() {\n\t\tlet s = this.state;\n\t\tlet scaleAll = values => values.map(val => scale(val, s.yAxis));\n\n\t\ts.datasets = this.data.datasets.map((d, i) => {\n\t\t\tlet values = d.values;\n\t\t\tlet cumulativeYs = d.cumulativeYs || [];\n\t\t\treturn {\n\t\t\t\tname: d.name && d.name.replace(/<|>|&/g, (char) => char == '&' ? '&' : char == '<' ? '<' : '>'),\n\t\t\t\tindex: i,\n\t\t\t\tchartType: d.chartType,\n\n\t\t\t\tvalues: values,\n\t\t\t\tyPositions: scaleAll(values),\n\n\t\t\t\tcumulativeYs: cumulativeYs,\n\t\t\t\tcumulativeYPos: scaleAll(cumulativeYs),\n\t\t\t};\n\t\t});\n\t}\n\n\tcalcYExtremes() {\n\t\tlet s = this.state;\n\t\tif(this.barOptions.stacked) {\n\t\t\ts.yExtremes = s.datasets[s.datasets.length - 1].cumulativeYPos;\n\t\t\treturn;\n\t\t}\n\t\ts.yExtremes = new Array(s.datasetLength).fill(9999);\n\t\ts.datasets.map(d => {\n\t\t\td.yPositions.map((pos, j) => {\n\t\t\t\tif(pos < s.yExtremes[j]) {\n\t\t\t\t\ts.yExtremes[j] = pos;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tcalcYRegions() {\n\t\tlet s = this.state;\n\t\tif(this.data.yMarkers) {\n\t\t\tthis.state.yMarkers = this.data.yMarkers.map(d => {\n\t\t\t\td.position = scale(d.value, s.yAxis);\n\t\t\t\tif(!d.options) d.options = {};\n\t\t\t\t// if(!d.label.includes(':')) {\n\t\t\t\t// \td.label += ': ' + d.value;\n\t\t\t\t// }\n\t\t\t\treturn d;\n\t\t\t});\n\t\t}\n\t\tif(this.data.yRegions) {\n\t\t\tthis.state.yRegions = this.data.yRegions.map(d => {\n\t\t\t\td.startPos = scale(d.start, s.yAxis);\n\t\t\t\td.endPos = scale(d.end, s.yAxis);\n\t\t\t\tif(!d.options) d.options = {};\n\t\t\t\treturn d;\n\t\t\t});\n\t\t}\n\t}\n\n\tgetAllYValues() {\n\t\tlet key = 'values';\n\n\t\tif(this.barOptions.stacked) {\n\t\t\tkey = 'cumulativeYs';\n\t\t\tlet cumulative = new Array(this.state.datasetLength).fill(0);\n\t\t\tthis.data.datasets.map((d, i) => {\n\t\t\t\tlet values = this.data.datasets[i].values;\n\t\t\t\td[key] = cumulative = cumulative.map((c, i) => c + values[i]);\n\t\t\t});\n\t\t}\n\n\t\tlet allValueLists = this.data.datasets.map(d => d[key]);\n\t\tif(this.data.yMarkers) {\n\t\t\tallValueLists.push(this.data.yMarkers.map(d => d.value));\n\t\t}\n\t\tif(this.data.yRegions) {\n\t\t\tthis.data.yRegions.map(d => {\n\t\t\t\tallValueLists.push([d.end, d.start]);\n\t\t\t});\n\t\t}\n\n\t\treturn [].concat(...allValueLists);\n\t}\n\n\tsetupComponents() {\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'yAxis',\n\t\t\t\t{\n\t\t\t\t\tmode: this.config.yAxisMode,\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\tshortenNumbers: this.config.shortenYAxisNumbers\n\t\t\t\t\t// pos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn this.state.yAxis;\n\t\t\t\t}.bind(this)\n\t\t\t],\n\n\t\t\t[\n\t\t\t\t'xAxis',\n\t\t\t\t{\n\t\t\t\t\tmode: this.config.xAxisMode,\n\t\t\t\t\theight: this.height,\n\t\t\t\t\t// pos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\tlet s = this.state;\n\t\t\t\t\ts.xAxis.calcLabels = getShortenedLabels(this.width,\n\t\t\t\t\t\ts.xAxis.labels, this.config.xIsSeries);\n\n\t\t\t\t\treturn s.xAxis;\n\t\t\t\t}.bind(this)\n\t\t\t],\n\n\t\t\t[\n\t\t\t\t'yRegions',\n\t\t\t\t{\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\tpos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn this.state.yRegions;\n\t\t\t\t}.bind(this)\n\t\t\t],\n\t\t];\n\n\t\tlet barDatasets = this.state.datasets.filter(d => d.chartType === 'bar');\n\t\tlet lineDatasets = this.state.datasets.filter(d => d.chartType === 'line');\n\n\t\tlet barsConfigs = barDatasets.map(d => {\n\t\t\tlet index = d.index;\n\t\t\treturn [\n\t\t\t\t'barGraph' + '-' + d.index,\n\t\t\t\t{\n\t\t\t\t\tindex: index,\n\t\t\t\t\tcolor: this.colors[index],\n\t\t\t\t\tstacked: this.barOptions.stacked,\n\n\t\t\t\t\t// same for all datasets\n\t\t\t\t\tvaluesOverPoints: this.config.valuesOverPoints,\n\t\t\t\t\tminHeight: this.height * MIN_BAR_PERCENT_HEIGHT,\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\tlet s = this.state;\n\t\t\t\t\tlet d = s.datasets[index];\n\t\t\t\t\tlet stacked = this.barOptions.stacked;\n\n\t\t\t\t\tlet spaceRatio = this.barOptions.spaceRatio || BAR_CHART_SPACE_RATIO;\n\t\t\t\t\tlet barsWidth = s.unitWidth * (1 - spaceRatio);\n\t\t\t\t\tlet barWidth = barsWidth/(stacked ? 1 : barDatasets.length);\n\n\t\t\t\t\tlet xPositions = s.xAxis.positions.map(x => x - barsWidth/2);\n\t\t\t\t\tif(!stacked) {\n\t\t\t\t\t\txPositions = xPositions.map(p => p + barWidth * index);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet labels = new Array(s.datasetLength).fill('');\n\t\t\t\t\tif(this.config.valuesOverPoints) {\n\t\t\t\t\t\tif(stacked && d.index === s.datasets.length - 1) {\n\t\t\t\t\t\t\tlabels = d.cumulativeYs;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlabels = d.values;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet offsets = new Array(s.datasetLength).fill(0);\n\t\t\t\t\tif(stacked) {\n\t\t\t\t\t\toffsets = d.yPositions.map((y, j) => y - d.cumulativeYPos[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\txPositions: xPositions,\n\t\t\t\t\t\tyPositions: d.yPositions,\n\t\t\t\t\t\toffsets: offsets,\n\t\t\t\t\t\t// values: d.values,\n\t\t\t\t\t\tlabels: labels,\n\n\t\t\t\t\t\tzeroLine: s.yAxis.zeroLine,\n\t\t\t\t\t\tbarsWidth: barsWidth,\n\t\t\t\t\t\tbarWidth: barWidth,\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t];\n\t\t});\n\n\t\tlet lineConfigs = lineDatasets.map(d => {\n\t\t\tlet index = d.index;\n\t\t\treturn [\n\t\t\t\t'lineGraph' + '-' + d.index,\n\t\t\t\t{\n\t\t\t\t\tindex: index,\n\t\t\t\t\tcolor: this.colors[index],\n\t\t\t\t\tsvgDefs: this.svgDefs,\n\t\t\t\t\theatline: this.lineOptions.heatline,\n\t\t\t\t\tregionFill: this.lineOptions.regionFill,\n\t\t\t\t\tspline: this.lineOptions.spline,\n\t\t\t\t\thideDots: this.lineOptions.hideDots,\n\t\t\t\t\thideLine: this.lineOptions.hideLine,\n\n\t\t\t\t\t// same for all datasets\n\t\t\t\t\tvaluesOverPoints: this.config.valuesOverPoints,\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\tlet s = this.state;\n\t\t\t\t\tlet d = s.datasets[index];\n\t\t\t\t\tlet minLine = s.yAxis.positions[0] < s.yAxis.zeroLine\n\t\t\t\t\t\t? s.yAxis.positions[0] : s.yAxis.zeroLine;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\txPositions: s.xAxis.positions,\n\t\t\t\t\t\tyPositions: d.yPositions,\n\n\t\t\t\t\t\tvalues: d.values,\n\n\t\t\t\t\t\tzeroLine: minLine,\n\t\t\t\t\t\tradius: this.lineOptions.dotSize || LINE_CHART_DOT_SIZE,\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t];\n\t\t});\n\n\t\tlet markerConfigs = [\n\t\t\t[\n\t\t\t\t'yMarkers',\n\t\t\t\t{\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\tpos: 'right'\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\treturn this.state.yMarkers;\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tcomponentConfigs = componentConfigs.concat(barsConfigs, lineConfigs, markerConfigs);\n\n\t\tlet optionals = ['yMarkers', 'yRegions'];\n\t\tthis.dataUnitComponents = [];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.filter(args => !optionals.includes(args[0]) || this.state[args[0]])\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\tif(args[0].includes('lineGraph') || args[0].includes('barGraph')) {\n\t\t\t\t\tthis.dataUnitComponents.push(component);\n\t\t\t\t}\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tmakeDataByIndex() {\n\t\tthis.dataByIndex = {};\n\n\t\tlet s = this.state;\n\t\tlet formatX = this.config.formatTooltipX;\n\t\tlet formatY = this.config.formatTooltipY;\n\t\tlet titles = s.xAxis.labels;\n\n\t\ttitles.map((label, index) => {\n\t\t\tlet values = this.state.datasets.map((set, i) => {\n\t\t\t\tlet value = set.values[index];\n\t\t\t\treturn {\n\t\t\t\t\ttitle: set.name,\n\t\t\t\t\tvalue: value,\n\t\t\t\t\tyPos: set.yPositions[index],\n\t\t\t\t\tcolor: this.colors[i],\n\t\t\t\t\tformatted: formatY ? formatY(value) : value,\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tthis.dataByIndex[index] = {\n\t\t\t\tlabel: label,\n\t\t\t\tformattedLabel: formatX ? formatX(label) : label,\n\t\t\t\txPos: s.xAxis.positions[index],\n\t\t\t\tvalues: values,\n\t\t\t\tyExtreme: s.yExtremes[index],\n\t\t\t};\n\t\t});\n\t}\n\n\tbindTooltip() {\n\t\t// NOTE: could be in tooltip itself, as it is a given functionality for its parent\n\t\tthis.container.addEventListener('mousemove', (e) => {\n\t\t\tlet m = this.measures;\n\t\t\tlet o = getOffset(this.container);\n\t\t\tlet relX = e.pageX - o.left - getLeftOffset(m);\n\t\t\tlet relY = e.pageY - o.top;\n\n\t\t\tif(relY < this.height + getTopOffset(m)\n\t\t\t\t&& relY > getTopOffset(m)) {\n\t\t\t\tthis.mapTooltipXPosition(relX);\n\t\t\t} else {\n\t\t\t\tthis.tip.hideTip();\n\t\t\t}\n\t\t});\n\t}\n\n\tmapTooltipXPosition(relX) {\n\t\tlet s = this.state;\n\t\tif(!s.yExtremes) return;\n\n\t\tlet index = getClosestInArray(relX, s.xAxis.positions, true);\n\t\tif (index >= 0) {\n\t\t\tlet dbi = this.dataByIndex[index];\n\n\t\t\tthis.tip.setValues(\n\t\t\t\tdbi.xPos + this.tip.offset.x,\n\t\t\t\tdbi.yExtreme + this.tip.offset.y,\n\t\t\t\t{name: dbi.formattedLabel, value: ''},\n\t\t\t\tdbi.values,\n\t\t\t\tindex\n\t\t\t);\n\n\t\t\tthis.tip.showTip();\n\t\t}\n\t}\n\n\trenderLegend() {\n\t\tlet s = this.data;\n\t\tif(s.datasets.length > 1) {\n\t\t\tthis.legendArea.textContent = '';\n\t\t\ts.datasets.map((d, i) => {\n\t\t\t\tlet barWidth = AXIS_LEGEND_BAR_SIZE;\n\t\t\t\t// let rightEndPoint = this.baseWidth - this.measures.margins.left - this.measures.margins.right;\n\t\t\t\t// let multiplier = s.datasets.length - i;\n\t\t\t\tlet rect = legendBar(\n\t\t\t\t\t// rightEndPoint - multiplier * barWidth,\t// To right align\n\t\t\t\t\tbarWidth * i,\n\t\t\t\t\t'0',\n\t\t\t\t\tbarWidth,\n\t\t\t\t\tthis.colors[i],\n\t\t\t\t\td.name,\n\t\t\t\t\tthis.config.truncateLegends);\n\t\t\t\tthis.legendArea.appendChild(rect);\n\t\t\t});\n\t\t}\n\t}\n\n\n\n\t// Overlay\n\tmakeOverlay() {\n\t\tif(this.init) {\n\t\t\tthis.init = 0;\n\t\t\treturn;\n\t\t}\n\t\tif(this.overlayGuides) {\n\t\t\tthis.overlayGuides.forEach(g => {\n\t\t\t\tlet o = g.overlay;\n\t\t\t\to.parentNode.removeChild(o);\n\t\t\t});\n\t\t}\n\n\t\tthis.overlayGuides = this.dataUnitComponents.map(c => {\n\t\t\treturn {\n\t\t\t\ttype: c.unitType,\n\t\t\t\toverlay: undefined,\n\t\t\t\tunits: c.units,\n\t\t\t};\n\t\t});\n\n\t\tif(this.state.currentIndex === undefined) {\n\t\t\tthis.state.currentIndex = this.state.datasetLength - 1;\n\t\t}\n\n\t\t// Render overlays\n\t\tthis.overlayGuides.map(d => {\n\t\t\tlet currentUnit = d.units[this.state.currentIndex];\n\n\t\t\td.overlay = makeOverlay[d.type](currentUnit);\n\t\t\tthis.drawArea.appendChild(d.overlay);\n\t\t});\n\t}\n\n\tupdateOverlayGuides() {\n\t\tif(this.overlayGuides) {\n\t\t\tthis.overlayGuides.forEach(g => {\n\t\t\t\tlet o = g.overlay;\n\t\t\t\to.parentNode.removeChild(o);\n\t\t\t});\n\t\t}\n\t}\n\n\tbindOverlay() {\n\t\tthis.parent.addEventListener('data-select', () => {\n\t\t\tthis.updateOverlay();\n\t\t});\n\t}\n\n\tbindUnits() {\n\t\tthis.dataUnitComponents.map(c => {\n\t\t\tc.units.map(unit => {\n\t\t\t\tunit.addEventListener('click', () => {\n\t\t\t\t\tlet index = unit.getAttribute('data-point-index');\n\t\t\t\t\tthis.setCurrentDataPoint(index);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\t// Note: Doesn't work as tooltip is absolutely positioned\n\t\tthis.tip.container.addEventListener('click', () => {\n\t\t\tlet index = this.tip.container.getAttribute('data-point-index');\n\t\t\tthis.setCurrentDataPoint(index);\n\t\t});\n\t}\n\n\tupdateOverlay() {\n\t\tthis.overlayGuides.map(d => {\n\t\t\tlet currentUnit = d.units[this.state.currentIndex];\n\t\t\tupdateOverlay[d.type](currentUnit, d.overlay);\n\t\t});\n\t}\n\n\tonLeftArrow() {\n\t\tthis.setCurrentDataPoint(this.state.currentIndex - 1);\n\t}\n\n\tonRightArrow() {\n\t\tthis.setCurrentDataPoint(this.state.currentIndex + 1);\n\t}\n\n\tgetDataPoint(index=this.state.currentIndex) {\n\t\tlet s = this.state;\n\t\tlet data_point = {\n\t\t\tindex: index,\n\t\t\tlabel: s.xAxis.labels[index],\n\t\t\tvalues: s.datasets.map(d => d.values[index])\n\t\t};\n\t\treturn data_point;\n\t}\n\n\tsetCurrentDataPoint(index) {\n\t\tlet s = this.state;\n\t\tindex = parseInt(index);\n\t\tif(index < 0) index = 0;\n\t\tif(index >= s.xAxis.labels.length) index = s.xAxis.labels.length - 1;\n\t\tif(index === s.currentIndex) return;\n\t\ts.currentIndex = index;\n\t\tfire(this.parent, \"data-select\", this.getDataPoint());\n\t}\n\n\n\n\t// API\n\taddDataPoint(label, datasetValues, index=this.state.datasetLength) {\n\t\tsuper.addDataPoint(label, datasetValues, index);\n\t\tthis.data.labels.splice(index, 0, label);\n\t\tthis.data.datasets.map((d, i) => {\n\t\t\td.values.splice(index, 0, datasetValues[i]);\n\t\t});\n\t\tthis.update(this.data);\n\t}\n\n\tremoveDataPoint(index = this.state.datasetLength-1) {\n\t\tif (this.data.labels.length <= 1) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.removeDataPoint(index);\n\t\tthis.data.labels.splice(index, 1);\n\t\tthis.data.datasets.map(d => {\n\t\t\td.values.splice(index, 1);\n\t\t});\n\t\tthis.update(this.data);\n\t}\n\n\tupdateDataset(datasetValues, index=0) {\n\t\tthis.data.datasets[index].values = datasetValues;\n\t\tthis.update(this.data);\n\t}\n\t// addDataset(dataset, index) {}\n\t// removeDataset(index = 0) {}\n\n\tupdateDatasets(datasets) {\n\t\tthis.data.datasets.map((d, i) => {\n\t\t\tif(datasets[i]) {\n\t\t\t\td.values = datasets[i];\n\t\t\t}\n\t\t});\n\t\tthis.update(this.data);\n\t}\n\n\t// updateDataPoint(dataPoint, index = 0) {}\n\t// addDataPoint(dataPoint, index = 0) {}\n\t// removeDataPoint(index = 0) {}\n}\n","import AggregationChart from './AggregationChart';\nimport { getComponent } from '../objects/ChartComponents';\nimport { getOffset } from '../utils/dom';\nimport { getPositionByAngle } from '../utils/helpers';\nimport { makeArcStrokePathStr, makeStrokeCircleStr } from '../utils/draw';\nimport { lightenDarkenColor } from '../utils/colors';\nimport { transform } from '../utils/animation';\nimport { FULL_ANGLE } from '../utils/constants';\n\nexport default class DonutChart extends AggregationChart {\n\tconstructor(parent, args) {\n\t\tsuper(parent, args);\n\t\tthis.type = 'donut';\n\t\tthis.initTimeout = 0;\n\t\tthis.init = 1;\n\n\t\tthis.setup();\n\t}\n\n\tconfigure(args) {\n\t\tsuper.configure(args);\n\t\tthis.mouseMove = this.mouseMove.bind(this);\n\t\tthis.mouseLeave = this.mouseLeave.bind(this);\n\n\t\tthis.hoverRadio = args.hoverRadio || 0.1;\n\t\tthis.config.startAngle = args.startAngle || 0;\n\n\t\tthis.clockWise = args.clockWise || false;\n\t\tthis.strokeWidth = args.strokeWidth || 30;\n\t}\n\n\tcalc() {\n\t\tsuper.calc();\n\t\tlet s = this.state;\n\t\tthis.radius =\n\t\t\tthis.height > this.width\n\t\t\t\t? this.center.x - this.strokeWidth / 2\n\t\t\t\t: this.center.y - this.strokeWidth / 2;\n\n\t\tconst { radius, clockWise } = this;\n\n\t\tconst prevSlicesProperties = s.slicesProperties || [];\n\t\ts.sliceStrings = [];\n\t\ts.slicesProperties = [];\n\t\tlet curAngle = 180 - this.config.startAngle;\n\n\t\ts.sliceTotals.map((total, i) => {\n\t\t\tconst startAngle = curAngle;\n\t\t\tconst originDiffAngle = (total / s.grandTotal) * FULL_ANGLE;\n\t\t\tconst largeArc = originDiffAngle > 180 ? 1: 0;\n\t\t\tconst diffAngle = clockWise ? -originDiffAngle : originDiffAngle;\n\t\t\tconst endAngle = curAngle = curAngle + diffAngle;\n\t\t\tconst startPosition = getPositionByAngle(startAngle, radius);\n\t\t\tconst endPosition = getPositionByAngle(endAngle, radius);\n\n\t\t\tconst prevProperty = this.init && prevSlicesProperties[i];\n\n\t\t\tlet curStart,curEnd;\n\t\t\tif(this.init) {\n\t\t\t\tcurStart = prevProperty ? prevProperty.startPosition : startPosition;\n\t\t\t\tcurEnd = prevProperty ? prevProperty.endPosition : startPosition;\n\t\t\t} else {\n\t\t\t\tcurStart = startPosition;\n\t\t\t\tcurEnd = endPosition;\n\t\t\t}\n\t\t\tconst curPath =\n\t\t\t\toriginDiffAngle === 360\n\t\t\t\t\t? makeStrokeCircleStr(curStart, curEnd, this.center, this.radius, this.clockWise, largeArc)\n\t\t\t\t\t: makeArcStrokePathStr(curStart, curEnd, this.center, this.radius, this.clockWise, largeArc);\n\n\t\t\ts.sliceStrings.push(curPath);\n\t\t\ts.slicesProperties.push({\n\t\t\t\tstartPosition,\n\t\t\t\tendPosition,\n\t\t\t\tvalue: total,\n\t\t\t\ttotal: s.grandTotal,\n\t\t\t\tstartAngle,\n\t\t\t\tendAngle,\n\t\t\t\tangle: diffAngle\n\t\t\t});\n\n\t\t});\n\t\tthis.init = 0;\n\t}\n\n\tsetupComponents() {\n\t\tlet s = this.state;\n\n\t\tlet componentConfigs = [\n\t\t\t[\n\t\t\t\t'donutSlices',\n\t\t\t\t{ },\n\t\t\t\tfunction() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsliceStrings: s.sliceStrings,\n\t\t\t\t\t\tcolors: this.colors,\n\t\t\t\t\t\tstrokeWidth: this.strokeWidth,\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t]\n\t\t];\n\n\t\tthis.components = new Map(componentConfigs\n\t\t\t.map(args => {\n\t\t\t\tlet component = getComponent(...args);\n\t\t\t\treturn [args[0], component];\n\t\t\t}));\n\t}\n\n\tcalTranslateByAngle(property){\n\t\tconst{ radius, hoverRadio } = this;\n\t\tconst position = getPositionByAngle(property.startAngle+(property.angle / 2),radius);\n\t\treturn `translate3d(${(position.x) * hoverRadio}px,${(position.y) * hoverRadio}px,0)`;\n\t}\n\n\thoverSlice(path,i,flag,e){\n\t\tif(!path) return;\n\t\tconst color = this.colors[i];\n\t\tif(flag) {\n\t\t\ttransform(path, this.calTranslateByAngle(this.state.slicesProperties[i]));\n\t\t\tpath.style.stroke = lightenDarkenColor(color, 50);\n\t\t\tlet g_off = getOffset(this.svg);\n\t\t\tlet x = e.pageX - g_off.left + 10;\n\t\t\tlet y = e.pageY - g_off.top - 10;\n\t\t\tlet title = (this.formatted_labels && this.formatted_labels.length > 0\n\t\t\t\t? this.formatted_labels[i] : this.state.labels[i]) + ': ';\n\t\t\tlet percent = (this.state.sliceTotals[i] * 100 / this.state.grandTotal).toFixed(1);\n\t\t\tthis.tip.setValues(x, y, {name: title, value: percent + \"%\"});\n\t\t\tthis.tip.showTip();\n\t\t} else {\n\t\t\ttransform(path,'translate3d(0,0,0)');\n\t\t\tthis.tip.hideTip();\n\t\t\tpath.style.stroke = color;\n\t\t}\n\t}\n\n\tbindTooltip() {\n\t\tthis.container.addEventListener('mousemove', this.mouseMove);\n\t\tthis.container.addEventListener('mouseleave', this.mouseLeave);\n\t}\n\n\tmouseMove(e){\n\t\tconst target = e.target;\n\t\tlet slices = this.components.get('donutSlices').store;\n\t\tlet prevIndex = this.curActiveSliceIndex;\n\t\tlet prevAcitve = this.curActiveSlice;\n\t\tif(slices.includes(target)) {\n\t\t\tlet i = slices.indexOf(target);\n\t\t\tthis.hoverSlice(prevAcitve, prevIndex,false);\n\t\t\tthis.curActiveSlice = target;\n\t\t\tthis.curActiveSliceIndex = i;\n\t\t\tthis.hoverSlice(target, i, true, e);\n\t\t} else {\n\t\t\tthis.mouseLeave();\n\t\t}\n\t}\n\n\tmouseLeave(){\n\t\tthis.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,false);\n\t}\n}\n","import '../css/charts.scss';\n\n// import MultiAxisChart from './charts/MultiAxisChart';\nimport PercentageChart from './charts/PercentageChart';\nimport PieChart from './charts/PieChart';\nimport Heatmap from './charts/Heatmap';\nimport AxisChart from './charts/AxisChart';\nimport DonutChart from './charts/DonutChart';\n\nconst chartTypes = {\n\tbar: AxisChart,\n\tline: AxisChart,\n\t// multiaxis: MultiAxisChart,\n\tpercentage: PercentageChart,\n\theatmap: Heatmap,\n\tpie: PieChart,\n\tdonut: DonutChart,\n};\n\nfunction getChartByType(chartType = 'line', parent, options) {\n\tif (chartType === 'axis-mixed') {\n\t\toptions.type = 'line';\n\t\treturn new AxisChart(parent, options);\n\t}\n\n\tif (!chartTypes[chartType]) {\n\t\tconsole.error(\"Undefined chart type: \" + chartType);\n\t\treturn;\n\t}\n\n\treturn new chartTypes[chartType](parent, options);\n}\n\nclass Chart {\n\tconstructor(parent, options) {\n\t\treturn getChartByType(options.type, parent, options);\n\t}\n}\n\nexport { Chart, PercentageChart, PieChart, Heatmap, AxisChart };","import * as Charts from './chart';\n\nlet frappe = { };\n\nfrappe.NAME = 'Frappe Charts';\nfrappe.VERSION = '1.6.2';\n\nfrappe = Object.assign({ }, frappe, Charts);\n\nexport default frappe;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/DashboardPage'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/DashboardWidget'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/abbreviateNumber'];","import app from 'flarum/admin/app';\n\nimport DashboardWidget, { IDashboardWidgetAttrs } from 'flarum/admin/components/DashboardWidget';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Link from 'flarum/common/components/Link';\n\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\n\nimport type Mithril from 'mithril';\n\nexport default class MiniStatisticsWidget extends DashboardWidget {\n entities = ['users', 'discussions', 'posts'];\n\n lifetimeData: any;\n\n loadingLifetime = true;\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.loadLifetimeData();\n }\n\n async loadLifetimeData() {\n this.loadingLifetime = true;\n m.redraw();\n\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'lifetime',\n },\n });\n\n this.lifetimeData = data;\n this.loadingLifetime = false;\n\n m.redraw();\n }\n\n className() {\n return 'StatisticsWidget StatisticsWidget--mini';\n }\n\n content() {\n return (\n
          \n

          {app.translator.trans('flarum-statistics.admin.statistics.mini_heading')}

          \n\n
          \n
          \n
          {app.translator.trans('flarum-statistics.admin.statistics.total_label')}
          \n
          \n\n {this.entities.map((entity) => {\n const totalCount = this.loadingLifetime ? app.translator.trans('flarum-statistics.admin.statistics.loading') : this.getTotalCount(entity);\n\n return (\n
          \n

          {app.translator.trans('flarum-statistics.admin.statistics.' + entity + '_heading')}

          \n
          \n {this.loadingLifetime ? : abbreviateNumber(totalCount as number)}\n
          \n
          \n );\n })}\n
          \n\n
          \n \n {app.translator.trans('flarum-statistics.admin.statistics.view_full')}\n \n
          \n
          \n );\n }\n\n getTotalCount(entity: string): number {\n return this.lifetimeData[entity];\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/SelectDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Placeholder'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/utils/generateElementId'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","import app from 'flarum/admin/app';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport generateElementId from 'flarum/admin/utils/generateElementId';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\n\nimport Mithril from 'mithril';\nimport Button from 'flarum/common/components/Button';\n\nimport dayjs from 'dayjs';\nimport dayjsUtc from 'dayjs/plugin/utc';\n\ndayjs.extend(dayjsUtc);\n\nexport interface IDateSelection {\n /**\n * Timestamp (seconds, not ms) for start date\n */\n start: number;\n /**\n * Timestamp (seconds, not ms) for end date\n */\n end: number;\n}\n\nexport interface IStatisticsWidgetDateSelectionModalAttrs extends IInternalModalAttrs {\n onModalSubmit: (dates: IDateSelection) => void;\n value?: IDateSelection;\n}\n\ninterface IStatisticsWidgetDateSelectionModalState {\n inputs: {\n startDateVal: string;\n endDateVal: string;\n };\n ids: {\n startDate: string;\n endDate: string;\n };\n}\n\nexport default class StatisticsWidgetDateSelectionModal extends Modal {\n /* @ts-expect-error core typings don't allow us to set the type of the state attr :( */\n state: IStatisticsWidgetDateSelectionModalState = {\n inputs: {\n startDateVal: dayjs().format('YYYY-MM-DD'),\n endDateVal: dayjs().format('YYYY-MM-DD'),\n },\n ids: {\n startDate: generateElementId(),\n endDate: generateElementId(),\n },\n };\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (this.attrs.value) {\n this.state.inputs = {\n startDateVal: dayjs.utc(this.attrs.value.start * 1000).format('YYYY-MM-DD'),\n endDateVal: dayjs.utc(this.attrs.value.end * 1000).format('YYYY-MM-DD'),\n };\n }\n }\n\n className(): string {\n return 'StatisticsWidgetDateSelectionModal Modal--small';\n }\n\n title(): Mithril.Children {\n return app.translator.trans('flarum-statistics.admin.date_selection_modal.title');\n }\n\n content(): Mithril.Children {\n return
          {this.items().toArray()}
          ;\n }\n\n items(): ItemList {\n const items = new ItemList();\n\n items.add('intro',

          {app.translator.trans('flarum-statistics.admin.date_selection_modal.description')}

          , 100);\n\n items.add(\n 'date_start',\n
          \n \n \n
          ,\n 90\n );\n\n items.add(\n 'date_end',\n
          \n \n \n
          ,\n 80\n );\n\n items.add(\n 'submit',\n ,\n 0\n );\n\n return items;\n }\n\n updateState(field: keyof IStatisticsWidgetDateSelectionModalState['inputs']): (e: InputEvent) => void {\n return (e: InputEvent) => {\n this.state.inputs[field] = (e.currentTarget as HTMLInputElement).value;\n };\n }\n\n submitData(): IDateSelection {\n // We force 'zulu' time (UTC)\n return {\n start: Math.floor(+dayjs.utc(this.state.inputs.startDateVal + 'Z') / 1000),\n // Ensures that the end date is the end of the day\n end: Math.floor(\n +dayjs\n .utc(this.state.inputs.endDateVal + 'Z')\n .hour(23)\n .minute(59)\n .second(59)\n .millisecond(999) / 1000\n ),\n };\n }\n\n onsubmit(e: SubmitEvent): void {\n e.preventDefault();\n\n const data = this.submitData();\n\n if (data.end < data.start) {\n this.alertAttrs = {\n type: 'error',\n controls: app.translator.trans('flarum-statistics.admin.date_selection_modal.errors.end_before_start'),\n };\n return;\n }\n\n this.attrs.onModalSubmit(data);\n this.hide();\n }\n}\n","import app from 'flarum/admin/app';\n\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport Button from 'flarum/common/components/Button';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\nimport extractText from 'flarum/common/utils/extractText';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\n\nimport DashboardWidget, { IDashboardWidgetAttrs } from 'flarum/admin/components/DashboardWidget';\n\nimport StatisticsWidgetDateSelectionModal, { IDateSelection, IStatisticsWidgetDateSelectionModalAttrs } from './StatisticsWidgetDateSelectionModal';\n\nimport type Mithril from 'mithril';\n\nimport dayjs from 'dayjs';\nimport dayjsUtc from 'dayjs/plugin/utc';\nimport dayjsLocalizedFormat from 'dayjs/plugin/localizedFormat';\n// @ts-expect-error No typings available\nimport { Chart } from 'frappe-charts';\n\ndayjs.extend(dayjsUtc);\ndayjs.extend(dayjsLocalizedFormat);\n\ninterface IPeriodDeclaration {\n start: number;\n end: number;\n step: number;\n}\n\nexport default class StatisticsWidget extends DashboardWidget {\n entities = ['users', 'discussions', 'posts'];\n periods: undefined | Record;\n\n chart: any;\n\n customPeriod: IDateSelection | null = null;\n\n timedData: Record = {};\n lifetimeData: any;\n customPeriodData: Record = {};\n\n noData: boolean = false;\n\n loadingLifetime = true;\n loadingTimed: Record = this.entities.reduce((acc, curr) => {\n acc[curr] = 'unloaded';\n return acc;\n }, {} as Record);\n loadingCustom: Record = this.entities.reduce((acc, curr) => {\n acc[curr] = 'unloaded';\n return acc;\n }, {} as Record);\n\n selectedEntity = 'users';\n selectedPeriod: undefined | string;\n\n chartEntity?: string;\n chartPeriod?: string;\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.loadLifetimeData();\n }\n\n async loadLifetimeData() {\n this.loadingLifetime = true;\n m.redraw();\n\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'lifetime',\n },\n });\n\n this.lifetimeData = data;\n this.loadingLifetime = false;\n\n m.redraw();\n }\n\n async loadTimedData(model: string) {\n this.loadingTimed[model] = 'loading';\n m.redraw();\n\n try {\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'timed',\n model,\n },\n });\n\n this.timedData[model] = data;\n this.loadingTimed[model] = 'loaded';\n\n // Create a Date object which represents the start of the day.\n let todayDate = new Date();\n todayDate.setUTCHours(0, 0, 0, 0);\n\n const today = todayDate.getTime() / 1000;\n\n this.periods = {\n today: { start: today, end: today + 86400, step: 3600 },\n last_7_days: { start: today - 86400 * 7, end: today, step: 86400 },\n previous_7_days: { start: today - 86400 * 14, end: today - 86400 * 7, step: 86400 },\n last_28_days: { start: today - 86400 * 28, end: today, step: 86400 },\n previous_28_days: { start: today - 86400 * 28 * 2, end: today - 86400 * 28, step: 86400 },\n last_12_months: { start: today - 86400 * 364, end: today, step: 86400 * 7 },\n };\n\n this.selectedPeriod = 'last_7_days';\n } catch (e) {\n console.error(e);\n this.loadingTimed[model] = 'fail';\n }\n\n m.redraw();\n }\n\n async loadCustomRangeData(model: string): Promise {\n this.loadingCustom[model] = 'loading';\n m.redraw();\n\n // We clone so we can check that the same period is still selected\n // once the HTTP request is complete and the data is to be displayed\n const range = { ...this.customPeriod };\n try {\n const data = await app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/statistics',\n params: {\n period: 'custom',\n model,\n dateRange: {\n start: range.start,\n end: range.end,\n },\n },\n });\n\n if (JSON.stringify(range) !== JSON.stringify(this.customPeriod)) {\n // The range this method was called with is no longer the selected.\n // Bail out here.\n return;\n }\n\n this.customPeriodData[model] = data;\n this.loadingCustom[model] = 'loaded';\n\n m.redraw();\n } catch (e) {\n if (JSON.stringify(range) !== JSON.stringify(this.customPeriod)) {\n // The range this method was called with is no longer the selected.\n // Bail out here.\n return;\n }\n\n console.error(e);\n this.loadingCustom[model] = 'fail';\n }\n }\n\n className() {\n return 'StatisticsWidget';\n }\n\n content() {\n const loadingSelectedEntity = (this.selectedPeriod === 'custom' ? this.loadingCustom : this.loadingTimed)[this.selectedEntity] !== 'loaded';\n\n const thisPeriod = loadingSelectedEntity\n ? null\n : this.selectedPeriod === 'custom'\n ? {\n start: this.customPeriod?.end!,\n end: this.customPeriod?.end!,\n step: 86400,\n }\n : this.periods![this.selectedPeriod!];\n\n if (this.selectedPeriod === 'custom') {\n if (!this.customPeriodData[this.selectedEntity] && this.loadingCustom[this.selectedEntity] === 'unloaded') {\n this.loadCustomRangeData(this.selectedEntity);\n }\n } else {\n if (!this.timedData[this.selectedEntity] && this.loadingTimed[this.selectedEntity] === 'unloaded') {\n this.loadTimedData(this.selectedEntity);\n }\n }\n\n return (\n
          \n
          \n
          \n
          {app.translator.trans('flarum-statistics.admin.statistics.total_label')}
          \n
          \n {loadingSelectedEntity ? (\n \n ) : (\n \n {Object.keys(this.periods!)\n .map((period) => (\n \n {app.translator.trans(`flarum-statistics.admin.statistics.${period}_label`)}\n \n ))\n .concat([\n {\n const attrs: IStatisticsWidgetDateSelectionModalAttrs = {\n onModalSubmit: (dates: IDateSelection) => {\n if (JSON.stringify(dates) === JSON.stringify(this.customPeriod)) {\n // If same period is selected, don't reload data\n return;\n }\n\n this.customPeriodData = {};\n Object.keys(this.loadingCustom).forEach((k) => (this.loadingCustom[k] = 'unloaded'));\n this.customPeriod = dates;\n this.changePeriod('custom');\n },\n } as any;\n\n // If we have a custom period set already,\n // let's prefill the modal with it\n if (this.customPeriod) {\n attrs.value = this.customPeriod;\n }\n\n app.modal.show(StatisticsWidgetDateSelectionModal as any, attrs as any);\n }}\n icon={this.selectedPeriod === 'custom' ? 'fas fa-check' : true}\n >\n {this.selectedPeriod === 'custom'\n ? extractText(\n app.translator.trans(`flarum-statistics.admin.statistics.custom_label_specified`, {\n fromDate: dayjs.utc(this.customPeriod!.start! * 1000).format('ll'),\n toDate: dayjs.utc(this.customPeriod!.end! * 1000).format('ll'),\n })\n )\n : app.translator.trans(`flarum-statistics.admin.statistics.custom_label`)}\n ,\n ])}\n \n )}\n
          \n
          \n\n {this.entities.map((entity) => {\n const totalCount = this.loadingLifetime ? app.translator.trans('flarum-statistics.admin.statistics.loading') : this.getTotalCount(entity);\n const thisPeriodCount = loadingSelectedEntity\n ? app.translator.trans('flarum-statistics.admin.statistics.loading')\n : this.getPeriodCount(entity, thisPeriod!);\n const lastPeriodCount =\n this.selectedPeriod === 'custom'\n ? null\n : loadingSelectedEntity\n ? app.translator.trans('flarum-statistics.admin.statistics.loading')\n : this.getPeriodCount(entity, this.getLastPeriod(thisPeriod!));\n const periodChange =\n loadingSelectedEntity || lastPeriodCount === 0 || lastPeriodCount === null\n ? 0\n : (((thisPeriodCount as number) - (lastPeriodCount as number)) / (lastPeriodCount as number)) * 100;\n\n return (\n \n

          {app.translator.trans('flarum-statistics.admin.statistics.' + entity + '_heading')}

          \n
          \n {this.loadingLifetime ? : abbreviateNumber(totalCount as number)}\n
          \n
          \n {loadingSelectedEntity ? : abbreviateNumber(thisPeriodCount as number)}\n {periodChange !== 0 && (\n <>\n {' '}\n 0 ? 'up' : 'down')}>\n {icon('fas fa-arrow-' + (periodChange > 0 ? 'up' : 'down'))}\n {Math.abs(periodChange).toFixed(1)}%\n \n \n )}\n
          \n \n );\n })}\n
          \n\n <>\n {loadingSelectedEntity ? (\n
          \n \n
          \n ) : (\n \n )}\n \n\n {this.noData && }\n\n {!this.noData && !!this.chart && (\n {\n this.chart.export();\n }}\n >\n {app.translator.trans('flarum-statistics.admin.statistics.export_chart_button')}\n \n )}\n
          \n );\n }\n\n drawChart(vnode: Mithril.VnodeDOM) {\n if (this.chart && this.chartEntity === this.selectedEntity && this.chartPeriod === this.selectedPeriod) {\n return;\n }\n\n const period =\n this.selectedPeriod === 'custom'\n ? {\n start: this.customPeriod?.start!,\n end: this.customPeriod?.end!,\n step: 86400,\n }\n : this.periods![this.selectedPeriod!];\n const periodLength = period.end - period.start;\n const labels: string[] = [];\n const thisPeriod = [];\n const lastPeriod = [];\n\n for (let i = period.start; i < period.end; i += period.step) {\n let label;\n\n if (period.step < 86400) {\n label = dayjs.unix(i).utc().format('h A');\n } else {\n label = dayjs.unix(i).utc().format('D MMM');\n\n if (period.step > 86400) {\n label +=\n ' - ' +\n dayjs\n .unix(i + period.step - 1)\n .utc()\n .format('D MMM');\n }\n }\n\n labels.push(label);\n\n thisPeriod.push(this.getPeriodCount(this.selectedEntity, { start: i, end: i + period.step }));\n lastPeriod.push(this.getPeriodCount(this.selectedEntity, { start: i - periodLength, end: i - periodLength }));\n }\n\n if (thisPeriod.length === 0) {\n this.noData = true;\n m.redraw();\n return;\n } else {\n this.noData = false;\n m.redraw();\n }\n\n const datasets = [\n {\n name: extractText(app.translator.trans('flarum-statistics.admin.statistics.current_period')),\n values: thisPeriod,\n },\n {\n name: extractText(app.translator.trans('flarum-statistics.admin.statistics.previous_period')),\n values: lastPeriod,\n },\n ];\n const data = {\n labels,\n datasets,\n };\n\n // If the dom element no longer exists, recreate the chart\n // https://stackoverflow.com/a/2620373/11091039\n if (!this.chart || !(document.compareDocumentPosition(this.chart.parent) & 16)) {\n this.chart = new Chart(vnode.dom, {\n data,\n type: 'line',\n height: 280,\n axisOptions: {\n xAxisMode: 'tick',\n yAxisMode: 'span',\n xIsSeries: true,\n },\n lineOptions: {\n hideDots: 1,\n regionFill: 1,\n },\n colors: [app.forum.attribute('themePrimaryColor'), 'black'],\n });\n } else {\n this.chart.update(data);\n }\n\n this.chartEntity = this.selectedEntity;\n this.chartPeriod = this.selectedPeriod;\n }\n\n changeEntity(entity: string) {\n this.selectedEntity = entity;\n }\n\n changePeriod(period: string) {\n this.selectedPeriod = period;\n }\n\n getTotalCount(entity: string): number {\n return this.lifetimeData[entity];\n }\n\n getPeriodCount(entity: string, period: { start: number; end: number }) {\n const timed: Record = (this.selectedPeriod === 'custom' ? this.customPeriodData : this.timedData)[entity];\n let count = 0;\n\n for (const t in timed) {\n const time = parseInt(t);\n\n if (time >= period.start && time < period.end) {\n count += timed[time];\n }\n }\n\n return count;\n }\n\n getLastPeriod(thisPeriod: { start: number; end: number }) {\n return {\n start: thisPeriod.start - (thisPeriod.end - thisPeriod.start),\n end: thisPeriod.start,\n };\n }\n}\n","import ExtensionPage from 'flarum/admin/components/ExtensionPage';\n\nimport StatisticsWidget from './StatisticsWidget';\n\nexport default class StatisticsPage extends ExtensionPage {\n content() {\n return (\n
          \n
          \n \n
          \n
          \n );\n }\n}\n","import app from 'flarum/admin/app';\nimport { extend } from 'flarum/common/extend';\n\nimport DashboardPage from 'flarum/admin/components/DashboardPage';\n\nimport MiniStatisticsWidget from './components/MiniStatisticsWidget';\nimport StatisticsPage from './components/StatisticsPage';\n\napp.initializers.add('flarum-statistics', () => {\n extend(DashboardPage.prototype, 'availableWidgets', function (widgets) {\n widgets.add('statistics', , 20);\n });\n\n app.extensionData.for('flarum-statistics').registerPage(StatisticsPage);\n});\n"],"names":["module","exports","e","n","r","i","s","u","a","o","f","h","c","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","_","S","args","arguments","O","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","forEach","extend","$i","isDayjs","en","Ls","LTS","LT","L","LL","LLL","LLLL","formats","toUpperCase","call","local","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","expr","con","document","querySelector","getOffset","element","rect","getBoundingClientRect","top","documentElement","scrollTop","body","left","scrollLeft","isHidden","el","offsetParent","isElementInViewport","bottom","window","innerHeight","clientHeight","right","innerWidth","clientWidth","getTopOffset","titleHeight","margins","paddings","getLeftOffset","getExtraHeight","legendHeight","getExtraWidth","floatTwo","parseFloat","toFixed","fillArray","array","count","start","fillerArray","fill","concat","getStringWidth","string","charWidth","getPositionByAngle","angle","radius","sin","ANGLE_RATIO","cos","isValidNumber","candidate","nonNegative","isNaN","isFinite","deepClone","cloned","value","key","isArray","getBarHeightAndYAttr","yTop","zeroLine","height","equilizeNoOfElements","array1","array2","extraCount","truncateString","txt","len","shortenLargeNumber","label","number","log10","shortened","pow","getSplineCurvePointsStr","xList","yList","points","push","controlPoint","current","previous","next","reverse","pointA","pointB","lengthX","lengthY","sqrt","atan2","line","PI","command","reduce","acc","point","cps","cpe","limitColor","lightenDarkenColor","color","amt","col","getColor","usePound","num","parseInt","b","createSVG","tag","createElementNS","val","appendChild","ref","parentNode","insertBefore","keys","map","style","prop","textContent","setAttribute","renderVerticalGradient","svgDefElem","gradientId","inside","x2","y1","y2","setGradientStop","gradElem","offset","opacity","makeSVGGroup","className","parent","transform","makePath","pathStr","makeGradient","lighter","gradientDef","opacities","heatSquare","size","data","makeText","content","options","fontSize","FONT_SIZE","dy","FONT_FILL","textAnchor","innerHTML","makeVertLine","stroke","BASE_LINE_COLOR","text","LABEL_MARGIN","makeHoriLine","x1","lineType","shortenNumbers","styles","translate","unit","oldCoord","newCoord","duration","old","STD_EASING","translateHoriLine","yLine","newY","oldY","MARKER_LINE_ANIM_DUR","animateBar","bar","width","nodeName","childNodes","UNIT_ANIM_DUR","getAttribute","animatePathStr","oldPath","animateSVGElement","props","dur","easingType","type","oldValues","animElement","cloneNode","newElement","attributeName","animateElement","currentValue","animAttr","values","EASING","calcMode","webkitTransform","msTransform","mozTransform","oTransform","animateSVG","svgContainer","elements","newElements","animElements","replaceChild","animSvg","runSMILAnimation","svgElement","elementsToAnimate","animSvgElement","removeChild","REPLACE_ALL_NEW_DUR","prepareForExport","svg","classList","styleEl","create","CSSTEXT","firstChild","container","treatAsUtc","result","setMinutes","getYyyyMmDd","getWeeksBetween","startDate","endDate","weekStartDate","setDayToSunday","millisecondsPerDay","SEC_IN_DAY","NO_OF_MILLIS","getDaysBetween","NO_OF_DAYS_IN_WEEK","areInSameMonth","getMonthName","short","monthName","MONTH_NAMES","getLastDateInMonth","newDate","day","addDays","numberOfDays","setDate","getComponent","constants","getData","Object","componentConfigs","filter","includes","k","config","assign","ChartComponent","normalize","mantissa","exponent","sig","exp","getChartRangeIntervals","max","upperBound","lowerBound","range","noOfParts","partSize","intervals","getChartIntervals","maxValue","minValue","normalMaxValue","normalMinValue","calcChartIntervals","getPositiveFirstIntervals","absMinValue","intervalSize","unshift","withMinimum","pseudoMaxValue","pseudoMinValue","getZeroIndex","yPts","interval","getIntervalSize","indexOf","orderedArray","getValueRange","scale","yAxis","scaleMultiplier","getMaxCheckpoint","distribution","dataPrep","labels","datasetLength","datasets","zeroArray","vals","chartType","AXIS_DATASET_CHART_TYPES","yRegions","end","zeroDataPrep","realData","zeroData","yMarkers","css","insertAt","head","getElementsByTagName","createElement","styleSheet","cssText","createTextNode","BASE_MEASURES","baseHeight","titleFontSize","PERCENTAGE_BAR_DEFAULT_DEPTH","DEFAULT_CHAR_WIDTH","DEFAULT_CHART_COLORS","DEFAULT_COLORS","donut","SvgTip","colors","titleName","titleValue","listValues","titleValueFirst","setup","makeTooltip","calcPosition","hideTip","title","dataPointList","addEventListener","index","_this2","formatted","li","offsetWidth","offsetHeight","maxLeft","pointer","pointerOffset","valueFirst","refresh","PRESET_COLOR_MAP","blue","violet","red","orange","yellow","green","purple","magenta","black","grey","exec","ch","AXIS_TICK_LENGTH","LABEL_MAX_CHARS","makeOverlay","transformValue","overlay","updateOverlay","attributes","attr","specified","nodeValue","PATH_ANIM_DUR","linear","easein","easeout","easeinout","BaseChart","HTMLElement","Error","rawChartArgs","prepareData","prepareFirstData","validateColors","showLegend","isNavigable","animate","truncateLegends","measures","JSON","stringify","setMeasures","argHeight","state","initTimeout","overlays","configure","validColors","isValidColor","warn","boundDrawFn","_this","draw","ResizeObserver","resizeObserver","observe","disconnect","removeEventListener","makeContainer","updateWidth","independentWidth","tip","bindTooltip","onlyWidthChange","calc","makeChartArea","setupComponents","components","drawArea","render","update","renderLegend","setupNavigation","baseWidth","getComputedStyle","padding","paddingLeft","paddingRight","getElementContentWidth","makeSVGContainer","svgDefs","makeSVGDefs","titleEL","legendArea","updateTipOffset","Map","error","make","updateNav","bindUnits","bindOverlay","keyActions","onEnterKey","bind","onLeftArrow","onUpArrow","onRightArrow","onDownArrow","_this4","event","keyCode","chartSvg","filename","blob","Blob","url","URL","createObjectURL","href","download","click","revokeObjectURL","AggregationChart","formatTooltipY","tooltipOptions","maxSlices","maxLegendPoints","sliceTotals","allTotals","total","totals","sort","sumOfRemaining","grandTotal","center","legendTotals","barWidth","divisor","_this3","dot","cx","cy","dx","group","legendDot","DAY_NAMES_SHORT","layerClass","layerTransform","makeElements","animateElements","store","layer","oldData","sliceStrings","strokeWidth","transition","newData","xPositions","depth","percentageBar","widths","barHeight","barDepth","positions","position","pos","mode","newPos","newLabels","oldPos","oldLabels","xLine","calcLabels","newX","oldX","translateVertLine","labelPos","labelSvg","yMarker","_this5","newOptions","region","yRegion","startPos","endPos","_this6","newStarts","oldStarts","rectGroup","newY1","newY2","oldY2","newHeight","stroke-dasharray","animateRegion","colWidth","rowHeight","squareSize","xTranslate","serializedSubDomains","cols","week","weekNo","yyyyMmDd","dataValue","square","barGraph","unitType","units","yPositions","j","meta","minHeight","datasetBar","offsets","barsWidth","newXPos","newYPos","newOffsets","oldXPos","oldYPos","oldOffsets","paths","hideLine","pointsStr","spline","path","heatline","gradient_id","regionFill","gradient_id_region","getPaths","hideDots","datasetDot","valuesOverPoints","newValues","newXList","newYList","pathComponents","animPath","regStartPt","regEndPt","animRegion","animatePath","animateDot","PercentageChart","barOptions","component","xPos","bars","target","gOff","pOff","formattedLabels","fraction","setValues","showTip","PieChart","mouseMove","mouseLeave","hoverRadio","startAngle","clockWise","Rt","prevSlicesProperties","slicesProperties","curAngle","originDiffAngle","largeArc","diffAngle","endAngle","startPosition","endPosition","prevProperty","curStart","curEnd","curPath","arcStartX","arcStartY","arcEndX","midArc","arcEndY","makeCircleStr","makeArcPathStr","property","flag","ot","calTranslateByAngle","g_off","pageX","pageY","formatted_labels","percent","slices","prevIndex","curActiveSliceIndex","prevAcitve","curActiveSlice","hoverSlice","Heatmap","countLabel","validStarts","startSubDomain","startSubDomainIndex","discreteDomains","ROW_HEIGHT","HEATMAP_SQUARE_SIZE","spacing","noOfWeeks","setFullYear","dataPoints","timestampSec","firstWeekStart","distributionSize","dataMaxValue","distributionStep","checkpoint","calcDistribution","domainConfigs","getDomains","lessCol","Pe","dayName","dayText","daySquares","comp","daySquare","dateParts","lessText","COL_WIDTH","moreText","HEATMAP_DISTRIBUTION_SIZE","startMonth","startYear","noOfMonths","startOfMonth","getDomainConfig","startOfWeek","domainConfig","noOfMonthWeeks","getCol","empty","currentDate","currentDateWithinData","getSubDomainConfig","AxisChart","lineOptions","axisOptions","xAxisMode","yAxisMode","xIsSeries","shortenYAxisNumbers","formatTooltipX","calcXPositions","calcYAxisParameters","getAllYValues","makeDataByIndex","unitWidth","xOffset","xAxis","dataValues","intervalHeight","calcDatasetPoints","calcYExtremes","calcYRegions","scaleAll","cumulativeYs","char","stacked","yExtremes","cumulativeYPos","cumulative","allValueLists","chartWidth","isSeries","allowedSpace","allowedLetters","seriesMultiple","maxLabelLength","getShortenedLabels","barDatasets","lineDatasets","barsConfigs","spaceRatio","lineConfigs","minLine","dotSize","markerConfigs","optionals","dataUnitComponents","dataByIndex","formatX","formatY","relX","relY","mapTooltipXPosition","goal","arr","closest","prev","curr","getClosestInArray","dbi","yExtreme","formattedLabel","legendBar","overlayGuides","undefined","currentIndex","currentUnit","_this7","setCurrentDataPoint","_this9","_this10","properties","evt","createEvent","initEvent","dispatchEvent","getDataPoint","datasetValues","splice","DonutChart","makeStrokeCircleStr","makeArcStrokePathStr","chartTypes","getChartByType","frappe","Charts","_typeof","require","_regeneratorRuntime","__esModule","Op","hasOwn","hasOwnProperty","defineProperty","obj","desc","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","makeInvokeMethod","tryCatch","fn","arg","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","object","pop","skipTempReset","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","definition","flarum","core","compat","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","_setPrototypeOf","_inheritsLoose","subClass","superClass","MiniStatisticsWidget","entities","lifetimeData","loadingLifetime","oncreate","vnode","loadLifetimeData","redraw","app","params","period","entity","totalCount","getTotalCount","display","abbreviateNumber","id","DashboardWidget","_extends","source","dayjs","dayjsUtc","StatisticsWidgetDateSelectionModal","inputs","startDateVal","endDateVal","ids","generateElementId","oninit","attrs","items","toArray","ItemList","htmlFor","onchange","updateState","field","currentTarget","submitData","hour","minute","second","millisecond","onsubmit","preventDefault","alertAttrs","controls","onModalSubmit","hide","Modal","dayjsLocalizedFormat","StatisticsWidget","periods","chart","customPeriod","timedData","customPeriodData","noData","loadingTimed","loadingCustom","selectedEntity","selectedPeriod","chartEntity","chartPeriod","loadTimedData","model","todayDate","setUTCHours","today","step","last_7_days","previous_7_days","last_28_days","previous_28_days","last_12_months","console","loadCustomRangeData","dateRange","loadingSelectedEntity","thisPeriod","disabled","buttonClassName","caretIcon","active","onclick","changePeriod","icon","dates","extractText","fromDate","thisPeriodCount","getPeriodCount","lastPeriodCount","getLastPeriod","periodChange","changeEntity","drawChart","onupdate","periodLength","lastPeriod","compareDocumentPosition","Chart","dom","timed","time","StatisticsPage","ExtensionPage","DashboardPage","widgets","registerPage"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/sticky/js/dist/forum.js b/extensions/sticky/js/dist/forum.js index df07973f93..b83fe33161 100644 --- a/extensions/sticky/js/dist/forum.js +++ b/extensions/sticky/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:o=>{var s=o&&o.__esModule?()=>o.default:()=>o;return t.d(s,{a:s}),s},d:(o,s)=>{for(var n in s)t.o(s,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:s[n]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>L});const s=flarum.core.compat["forum/app"];var n=t.n(s);const e=flarum.core.compat["common/extend"],r=flarum.core.compat["common/models/Discussion"];var c=t.n(r);const i=flarum.core.compat["common/components/Badge"];var a=t.n(i);const u=flarum.core.compat["forum/utils/DiscussionControls"];var f=t.n(u);const p=flarum.core.compat["forum/components/DiscussionPage"];var l=t.n(p);const d=flarum.core.compat["common/components/Button"];var y=t.n(d);const k=flarum.core.compat["forum/states/DiscussionListState"];var v=t.n(k);const b=flarum.core.compat["forum/components/DiscussionListItem"];var h=t.n(b);const _=flarum.core.compat["forum/components/IndexPage"];var S=t.n(_);const P=flarum.core.compat["common/utils/string"],x=flarum.core.compat["common/utils/classList"];var g=t.n(x);const O=flarum.core.compat["common/extenders"];var j=t.n(O);function D(t,o){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},D(t,o)}const w=flarum.core.compat["forum/components/EventPost"];var I=function(t){var o,s;function n(){return t.apply(this,arguments)||this}s=t,(o=n).prototype=Object.create(s.prototype),o.prototype.constructor=o,D(o,s);var e=n.prototype;return e.icon=function(){return"fas fa-thumbtack"},e.descriptionKey=function(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"},n}(t.n(w)());const L=[(new(j().PostTypes)).add("discussionStickied",I),new(j().Model)(c()).attribute("isSticky").attribute("canSticky")];n().initializers.add("flarum-sticky",(function(){(0,e.extend)(c().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",a().component({type:"sticky",label:n().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,e.extend)(f(),"moderationControls",(function(t,o){o.canSticky()&&t.add("sticky",y().component({icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(o)},n().translator.trans(o.isSticky()?"flarum-sticky.forum.discussion_controls.unsticky_button":"flarum-sticky.forum.discussion_controls.sticky_button")))})),f().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((function(){n().current.matches(l())&&n().current.get("stream").update(),m.redraw()}))},(0,e.extend)(v().prototype,"requestParams",(function(t){(n().current.matches(S())||n().current.matches(l()))&&t.include.push("firstPost")})),(0,e.extend)(h().prototype,"infoItems",(function(t){var o=this.attrs.discussion;if(o.isSticky()&&!this.attrs.params.q&&!o.lastReadPostNumber()){var s=o.firstPost();if(s){var n=(0,P.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,n),-100)}}})),(0,e.extend)(h().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=g()(t.className,"DiscussionListItem--sticky"))}))}))})(),module.exports=o})(); +(()=>{var t={n:o=>{var s=o&&o.__esModule?()=>o.default:()=>o;return t.d(s,{a:s}),s},d:(o,s)=>{for(var n in s)t.o(s,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:s[n]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>L});const s=flarum.core.compat["forum/app"];var n=t.n(s);const e=flarum.core.compat["common/extend"],r=flarum.core.compat["common/models/Discussion"];var c=t.n(r);const i=flarum.core.compat["common/components/Badge"];var a=t.n(i);const u=flarum.core.compat["forum/utils/DiscussionControls"];var f=t.n(u);const p=flarum.core.compat["forum/components/DiscussionPage"];var l=t.n(p);const d=flarum.core.compat["common/components/Button"];var y=t.n(d);const k=flarum.core.compat["forum/states/DiscussionListState"];var v=t.n(k);const b=flarum.core.compat["forum/components/DiscussionListItem"];var h=t.n(b);const _=flarum.core.compat["forum/components/IndexPage"];var S=t.n(_);const P=flarum.core.compat["common/utils/string"],x=flarum.core.compat["common/utils/classList"];var g=t.n(x);const O=flarum.core.compat["common/extenders"];var j=t.n(O);function D(t,o){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},D(t,o)}const w=flarum.core.compat["forum/components/EventPost"];var I=function(t){var o,s;function n(){return t.apply(this,arguments)||this}s=t,(o=n).prototype=Object.create(s.prototype),o.prototype.constructor=o,D(o,s);var e=n.prototype;return e.icon=function(){return"fas fa-thumbtack"},e.descriptionKey=function(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"},n}(t.n(w)());const L=[(new(j().PostTypes)).add("discussionStickied",I),new(j().Model)(c()).attribute("isSticky").attribute("canSticky")];n().initializers.add("flarum-sticky",(function(){(0,e.extend)(c().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",m(a(),{type:"sticky",label:n().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,e.extend)(f(),"moderationControls",(function(t,o){o.canSticky()&&t.add("sticky",m(y(),{icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(o)},n().translator.trans("flarum-sticky.forum.discussion_controls."+(o.isSticky()?"unsticky":"sticky")+"_button")))})),f().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((function(){n().current.matches(l())&&n().current.get("stream").update(),m.redraw()}))},(0,e.extend)(v().prototype,"requestParams",(function(t){(n().current.matches(S())||n().current.matches(l()))&&t.include.push("firstPost")})),(0,e.extend)(h().prototype,"infoItems",(function(t){var o=this.attrs.discussion;if(o.isSticky()&&!this.attrs.params.q&&!o.lastReadPostNumber()){var s=o.firstPost();if(s){var n=(0,P.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,n),-100)}}})),(0,e.extend)(h().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=g()(t.className,"DiscussionListItem--sticky"))}))}))})(),module.exports=o})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/sticky/js/dist/forum.js.map b/extensions/sticky/js/dist/forum.js.map index 6a99fd7318..e410313b4e 100644 --- a/extensions/sticky/js/dist/forum.js.map +++ b/extensions/sticky/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAK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SACNC,MAAON,IAAAA,WAAAA,MAAqB,4CAC5BZ,KAAM,qBAER,GAGN,KCXAa,EAAAA,EAAAA,QAAOM,IAAoB,sBAAsB,SAAUC,EAAOC,GAC5DA,EAAWC,aACbF,EAAMX,IACJ,SACAc,IAAAA,UACE,CACEvB,KAAM,mBACNwB,QAAStB,KAAKuB,aAAahC,KAAK4B,IAElCT,IAAAA,WAAAA,MACES,EAAWN,WACP,0DACA,0DAKd,IAEAI,IAAAA,aAAkC,WAChCjB,KAAKwB,KAAK,CAAEX,UAAWb,KAAKa,aAAcY,MAAK,WACzCf,IAAAA,QAAAA,QAAoBgB,MACtBhB,IAAAA,QAAAA,IAAgB,UAAUiB,SAG5BC,EAAEC,QACJ,GACF,GCzBAlB,EAAAA,EAAAA,QAAOmB,IAAAA,UAA+B,iBAAiB,SAAUC,IAC3DrB,IAAAA,QAAAA,QAAoBsB,MAActB,IAAAA,QAAAA,QAAoBgB,OACxDK,EAAOE,QAAQC,KAAK,YAExB,KAEAvB,EAAAA,EAAAA,QAAOwB,IAAAA,UAA8B,aAAa,SAAUjB,GAC1D,IAAMC,EAAanB,KAAKC,MAAMkB,WAE9B,GAAIA,EAAWN,aAAeb,KAAKC,MAAM8B,OAAOK,IAAMjB,EAAWkB,qBAAsB,CACrF,IAAMC,EAAYnB,EAAWmB,YAE7B,GAAIA,EAAW,CACb,IAAMC,GAAUC,EAAAA,EAAAA,UAASF,EAAUG,eAAgB,KAGnDvB,EAAMX,IAAI,UAAW,aAAMgC,IAAiB,IAC9C,CACF,CACF,KCtBA5B,EAAAA,EAAAA,QAAOwB,IAAAA,UAA8B,gBAAgB,SAAUlC,GACzDD,KAAKC,MAAMkB,WAAWN,aACxBZ,EAAMyC,UAAYC,IAAU1C,EAAMyC,UAAW,8BAEjD,GJIF,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/sticky/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/sticky/./src/forum/components/DiscussionStickiedPost.js","webpack://@flarum/sticky/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/sticky/./src/forum/extend.ts","webpack://@flarum/sticky/./src/forum/index.js","webpack://@flarum/sticky/./src/forum/addStickyBadge.js","webpack://@flarum/sticky/./src/forum/addStickyControl.js","webpack://@flarum/sticky/./src/forum/addStickyExcerpt.js","webpack://@flarum/sticky/./src/forum/addStickyClass.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\n\nexport default class DiscussionStickiedPost extends EventPost {\n icon() {\n return 'fas fa-thumbtack';\n }\n\n descriptionKey() {\n return this.attrs.post.content().sticky\n ? 'flarum-sticky.forum.post_stream.discussion_stickied_text'\n : 'flarum-sticky.forum.post_stream.discussion_unstickied_text';\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionStickiedPost from './components/DiscussionStickiedPost';\n\nexport default [\n new Extend.PostTypes() //\n .add('discussionStickied', DiscussionStickiedPost),\n\n new Extend.Model(Discussion) //\n .attribute('isSticky')\n .attribute('canSticky'),\n];\n","import app from 'flarum/forum/app';\n\nimport addStickyBadge from './addStickyBadge';\nimport addStickyControl from './addStickyControl';\nimport addStickyExcerpt from './addStickyExcerpt';\nimport addStickyClass from './addStickyClass';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-sticky', () => {\n addStickyBadge();\n addStickyControl();\n addStickyExcerpt();\n addStickyClass();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addStickyBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isSticky()) {\n badges.add(\n 'sticky',\n Badge.component({\n type: 'sticky',\n label: app.translator.trans('flarum-sticky.forum.badge.sticky_tooltip'),\n icon: 'fas fa-thumbtack',\n }),\n 10\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\n\nexport default function addStickyControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canSticky()) {\n items.add(\n 'sticky',\n Button.component(\n {\n icon: 'fas fa-thumbtack',\n onclick: this.stickyAction.bind(discussion),\n },\n app.translator.trans(\n discussion.isSticky()\n ? 'flarum-sticky.forum.discussion_controls.unsticky_button'\n : 'flarum-sticky.forum.discussion_controls.sticky_button'\n )\n )\n );\n }\n });\n\n DiscussionControls.stickyAction = function () {\n this.save({ isSticky: !this.isSticky() }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n\n m.redraw();\n });\n };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default function addStickyControl() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.matches(IndexPage) || app.current.matches(DiscussionPage)) {\n params.include.push('firstPost');\n }\n });\n\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n\n if (discussion.isSticky() && !this.attrs.params.q && !discussion.lastReadPostNumber()) {\n const firstPost = discussion.firstPost();\n\n if (firstPost) {\n const excerpt = truncate(firstPost.contentPlain(), 175);\n\n // Wrapping in
          because ItemList entries need to be vnodes\n items.add('excerpt',
          {excerpt}
          , -100);\n }\n }\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\n\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\n\nexport default function addStickyClass() {\n extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.discussion.isSticky()) {\n attrs.className = classList(attrs.className, 'DiscussionListItem--sticky');\n }\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","DiscussionStickiedPost","subClass","superClass","create","constructor","icon","descriptionKey","this","attrs","post","content","sticky","EventPost","Extend","add","Discussion","attribute","app","extend","badges","isSticky","Badge","type","label","DiscussionControls","items","discussion","canSticky","Button","onclick","stickyAction","save","then","DiscussionPage","update","m","redraw","DiscussionListState","params","IndexPage","include","push","DiscussionListItem","q","lastReadPostNumber","firstPost","excerpt","truncate","contentPlain","className","classList"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,2B,aCAxD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AAAA,MAAqB,4CAA6CZ,KAAK,qBACnG,GAGN,KCPAa,EAAAA,EAAAA,QAAOK,IAAoB,sBAAsB,SAAUC,EAAOC,GAC5DA,EAAWC,aACbF,EAAMV,IACJ,SACA,EAAC,IAAM,CAACT,KAAK,mBAAmBsB,QAASpB,KAAKqB,aAAa9B,KAAK2B,IAC7DR,IAAAA,WAAAA,MAAqB,4CAA2CQ,EAAWL,WAAa,WAAa,UAAQ,YAItH,IAEAG,IAAAA,aAAkC,WAChChB,KAAKsB,KAAK,CAAET,UAAWb,KAAKa,aAAcU,MAAK,WACzCb,IAAAA,QAAAA,QAAoBc,MACtBd,IAAAA,QAAAA,IAAgB,UAAUe,SAG5BC,EAAEC,QACJ,GACF,GCjBAhB,EAAAA,EAAAA,QAAOiB,IAAAA,UAA+B,iBAAiB,SAAUC,IAC3DnB,IAAAA,QAAAA,QAAoBoB,MAAcpB,IAAAA,QAAAA,QAAoBc,OACxDK,EAAOE,QAAQC,KAAK,YAExB,KAEArB,EAAAA,EAAAA,QAAOsB,IAAAA,UAA8B,aAAa,SAAUhB,GAC1D,IAAMC,EAAalB,KAAKC,MAAMiB,WAE9B,GAAIA,EAAWL,aAAeb,KAAKC,MAAM4B,OAAOK,IAAMhB,EAAWiB,qBAAsB,CACrF,IAAMC,EAAYlB,EAAWkB,YAE7B,GAAIA,EAAW,CACb,IAAMC,GAAUC,EAAAA,EAAAA,UAASF,EAAUG,eAAgB,KAGnDtB,EAAMV,IAAI,UAAW,aAAM8B,IAAiB,IAC9C,CACF,CACF,KCtBA1B,EAAAA,EAAAA,QAAOsB,IAAAA,UAA8B,gBAAgB,SAAUhC,GACzDD,KAAKC,MAAMiB,WAAWL,aACxBZ,EAAMuC,UAAYC,IAAUxC,EAAMuC,UAAW,8BAEjD,GJIF,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/sticky/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/sticky/./src/forum/components/DiscussionStickiedPost.js","webpack://@flarum/sticky/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/sticky/./src/forum/extend.ts","webpack://@flarum/sticky/./src/forum/index.js","webpack://@flarum/sticky/./src/forum/addStickyBadge.js","webpack://@flarum/sticky/./src/forum/addStickyControl.js","webpack://@flarum/sticky/./src/forum/addStickyExcerpt.js","webpack://@flarum/sticky/./src/forum/addStickyClass.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\n\nexport default class DiscussionStickiedPost extends EventPost {\n icon() {\n return 'fas fa-thumbtack';\n }\n\n descriptionKey() {\n return this.attrs.post.content().sticky\n ? 'flarum-sticky.forum.post_stream.discussion_stickied_text'\n : 'flarum-sticky.forum.post_stream.discussion_unstickied_text';\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionStickiedPost from './components/DiscussionStickiedPost';\n\nexport default [\n new Extend.PostTypes() //\n .add('discussionStickied', DiscussionStickiedPost),\n\n new Extend.Model(Discussion) //\n .attribute('isSticky')\n .attribute('canSticky'),\n];\n","import app from 'flarum/forum/app';\n\nimport addStickyBadge from './addStickyBadge';\nimport addStickyControl from './addStickyControl';\nimport addStickyExcerpt from './addStickyExcerpt';\nimport addStickyClass from './addStickyClass';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-sticky', () => {\n addStickyBadge();\n addStickyControl();\n addStickyExcerpt();\n addStickyClass();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addStickyBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isSticky()) {\n badges.add(\n 'sticky',\n ,\n 10\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\n\nexport default function addStickyControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canSticky()) {\n items.add(\n 'sticky',\n \n );\n }\n });\n\n DiscussionControls.stickyAction = function () {\n this.save({ isSticky: !this.isSticky() }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n\n m.redraw();\n });\n };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default function addStickyControl() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.matches(IndexPage) || app.current.matches(DiscussionPage)) {\n params.include.push('firstPost');\n }\n });\n\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n\n if (discussion.isSticky() && !this.attrs.params.q && !discussion.lastReadPostNumber()) {\n const firstPost = discussion.firstPost();\n\n if (firstPost) {\n const excerpt = truncate(firstPost.contentPlain(), 175);\n\n // Wrapping in
          because ItemList entries need to be vnodes\n items.add('excerpt',
          {excerpt}
          , -100);\n }\n }\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\n\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\n\nexport default function addStickyClass() {\n extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.discussion.isSticky()) {\n attrs.className = classList(attrs.className, 'DiscussionListItem--sticky');\n }\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","DiscussionStickiedPost","subClass","superClass","create","constructor","icon","descriptionKey","this","attrs","post","content","sticky","EventPost","Extend","add","Discussion","attribute","app","extend","badges","isSticky","type","label","DiscussionControls","items","discussion","canSticky","onclick","stickyAction","save","then","DiscussionPage","update","m","redraw","DiscussionListState","params","IndexPage","include","push","DiscussionListItem","q","lastReadPostNumber","firstPost","excerpt","truncate","contentPlain","className","classList"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/subscriptions/js/dist/forum.js b/extensions/subscriptions/js/dist/forum.js index cae34e0da1..3242362d08 100644 --- a/extensions/subscriptions/js/dist/forum.js +++ b/extensions/subscriptions/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var s in n)o.o(n,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>W});const n=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/app"];var r=o.n(s);flarum.core.compat["common/Model"];const e=flarum.core.compat["common/models/Discussion"];var i=o.n(e);const a=flarum.core.compat["forum/components/NotificationGrid"];var c=o.n(a);const l=flarum.core.compat["common/components/Badge"];var u=o.n(l);const f=flarum.core.compat["common/components/Button"];var p=o.n(f);const b=flarum.core.compat["forum/components/DiscussionPage"];var d=o.n(b);const _=flarum.core.compat["forum/utils/DiscussionControls"];var g=o.n(_);function w(){return w=Object.assign?Object.assign.bind():function(o){for(var t=1;t{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var s in n)o.o(n,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>V});const n=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/app"];var r=o.n(s);flarum.core.compat["common/Model"];const i=flarum.core.compat["common/models/Discussion"];var a=o.n(i);const e=flarum.core.compat["forum/components/NotificationGrid"];var c=o.n(e);const l=flarum.core.compat["common/components/Badge"];var u=o.n(l);const f=flarum.core.compat["common/components/Button"];var p=o.n(f);const b=flarum.core.compat["forum/components/DiscussionPage"];var d=o.n(b);const _=flarum.core.compat["forum/utils/DiscussionControls"];var g=o.n(_);function w(o,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},w(o,t)}function y(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,w(o,t)}const v=flarum.core.compat["common/components/Dropdown"];var h=o.n(v);const x=flarum.core.compat["common/components/Tooltip"];var S=o.n(x);const P=flarum.core.compat["common/helpers/icon"];var N=o.n(P);const M=flarum.core.compat["common/utils/extractText"];var O=o.n(M);const k=flarum.core.compat["common/utils/classList"];var B=o.n(k);const j=flarum.core.compat["common/Component"];var D=function(o){function t(){return o.apply(this,arguments)||this}return y(t,o),t.prototype.view=function(){return m("button",{className:"SubscriptionMenuItem hasIcon",onclick:this.attrs.onclick},this.attrs.active&&N()("fas fa-check",{className:"Button-icon"}),m("span",{className:"SubscriptionMenuItem-label"},N()(this.attrs.icon,{className:"Button-icon"}),m("strong",null,this.attrs.label),m("span",{className:"SubscriptionMenuItem-description"},this.attrs.description)))},t}(o.n(j)()),I=function(o){function t(){return o.apply(this,arguments)||this}y(t,o);var n=t.prototype;return n.oninit=function(t){o.prototype.oninit.call(this,t),this.options=[{subscription:null,icon:"far fa-star",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_text")},{subscription:"follow",icon:"fas fa-star",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.following_text")},{subscription:"ignore",icon:"far fa-eye-slash",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_text")}]},n.view=function(){var o=this,t=this.attrs.discussion,n=t.subscription(),s=r().translator.trans("flarum-subscriptions.forum.sub_controls.follow_button"),i="far fa-star",a="SubscriptionMenu-button--"+n;switch(n){case"follow":s=r().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),i="fas fa-star";break;case"ignore":s=r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),i="far fa-eye-slash"}var e=r().session.user.preferences(),c=e.notify_newPost_email,l=e.notify_newPost_alert,u=O()(r().translator.trans(c?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),f=(c||l)&&null===n,b=m(p(),{className:B()("Button","SubscriptionMenu-button",a),icon:i,onclick:this.saveSubscription.bind(this,t,-1!==["follow","ignore"].indexOf(n)?null:"follow")},s);return m("div",{className:"Dropdown ButtonGroup SubscriptionMenu"},f?m(S(),{text:u,position:"bottom"},b):b,m("button",{className:B()("Dropdown-toggle Button Button--icon",a),"data-toggle":"dropdown"},N()("fas fa-caret-down",{className:"Button-icon"})),m("ul",{className:"Dropdown-menu dropdown-menu Dropdown-menu--right"},this.options.map((function(s){return m("li",null,m(D,Object.assign({},s,{onclick:o.saveSubscription.bind(o,t,s.subscription),active:n===s.subscription})))}))))},n.saveSubscription=function(o,t){o.save({subscription:t}),this.$(".SubscriptionMenu-button").tooltip("hide")},t}(h());const A=flarum.core.compat["common/components/LinkButton"];var R=o.n(A);const T=flarum.core.compat["forum/components/IndexPage"];var L=o.n(T);const C=flarum.core.compat["forum/states/DiscussionListState"];var q=o.n(C);const F=flarum.core.compat["forum/states/GlobalSearchState"];var G=o.n(F);const z=flarum.core.compat["forum/components/SettingsPage"];var U=o.n(z);const $=flarum.core.compat["common/components/Switch"];var E=o.n($);const H=flarum.core.compat["forum/components/Notification"];var J=function(o){function t(){return o.apply(this,arguments)||this}y(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-star"},n.href=function(){var o=this.attrs.notification,t=o.subject(),n=o.content()||{};return r().route.discussion(t,n.postNumber)},n.content=function(){return r().translator.trans("flarum-subscriptions.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})},t}(o.n(H)());const K=flarum.core.compat["common/extenders"];var Q=o.n(K);const V=[(new(Q().Routes)).add("following","/following",L()),new(Q().Model)(a()).attribute("subscription")];r().initializers.add("subscriptions",(function(){r().notificationComponents.newPost=J,(0,n.extend)(a().prototype,"badges",(function(o){var t;switch(this.subscription()){case"follow":t=m(u(),{label:r().translator.trans("flarum-subscriptions.forum.badge.following_tooltip"),icon:"fas fa-star",type:"following"});break;case"ignore":t=m(u(),{label:r().translator.trans("flarum-subscriptions.forum.badge.ignoring_tooltip"),icon:"far fa-eye-slash",type:"ignoring"})}t&&o.add("subscription",t)})),(0,n.extend)(g(),"userControls",(function(o,t,n){if(r().session.user&&!(n instanceof d())){var s={none:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.follow_button"),icon:"fas fa-star",save:"follow"},follow:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.unfollow_button"),icon:"far fa-star",save:null},ignore:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.unignore_button"),icon:"fas fa-eye",save:null}},i=t.subscription()||"none";o.add("subscription",m(p(),{icon:s[i].icon,onclick:t.save.bind(t,{subscription:s[i].save})},s[i].label))}})),(0,n.extend)(d().prototype,"sidebarItems",(function(o){if(r().session.user){var t=this.discussion;o.add("subscription",m(I,{discussion:t}),80)}})),(0,n.extend)(L().prototype,"navItems",(function(o){if(r().session.user){var t=r().search.stickyParams();o.add("following",m(R(),{href:r().route("following",t),icon:"fas fa-star"},r().translator.trans("flarum-subscriptions.forum.index.following_link")),50)}})),(0,n.extend)(L().prototype,"setTitle",(function(){"following"===r().current.get("routeName")&&r().setTitle(r().translator.trans("flarum-subscriptions.forum.following.meta_title_text"))})),(0,n.extend)(G().prototype,"params",(function(o){o.onFollowing="following"===r().current.get("routeName")})),(0,n.extend)(q().prototype,"requestParams",(function(o){this.params.onFollowing&&(o.filter||(o.filter={}),o.filter.q?o.filter.q+=" is:following":o.filter.subscription="following")})),(0,n.extend)(U().prototype,"notificationsItems",(function(o){var t,n=this;o.add("followAfterReply",m(E(),{state:this.user.preferences().followAfterReply,onchange:function(o){n.followAfterReplyLoading=!0,n.user.savePreferences({followAfterReply:o}).then((function(){n.followAfterReplyLoading=!1,m.redraw()}))},loading:this.followAfterReplyLoading},r().translator.trans("flarum-subscriptions.forum.settings.follow_after_reply_label"))),o.add("notifyForAllPosts",m(E(),{id:"flarum_subscriptions__notify_for_all_posts",state:!(null==(t=this.user.preferences())||!t["flarum-subscriptions.notify_for_all_posts"]),onchange:function(o){n.user.savePreferences({"flarum-subscriptions.notify_for_all_posts":o})}},r().translator.trans("flarum-subscriptions.forum.settings.notify_for_all_posts_label")))})),(0,n.extend)(c().prototype,"notificationTypes",(function(o){o.add("newPost",{name:"newPost",icon:"fas fa-star",label:r().translator.trans("flarum-subscriptions.forum.settings.notify_new_post_label")})}))}))})(),module.exports=t})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/subscriptions/js/dist/forum.js.map b/extensions/subscriptions/js/dist/forum.js.map index 17e3266b86..9198dc2b5b 100644 --- a/extensions/subscriptions/js/dist/forum.js.map +++ b/extensions/subscriptions/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAA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AqB,wDAEtC,KAEAqC,EAAAA,EAAAA,QAAOgB,IAAAA,UAA6B,UAAU,SAAUF,GAGtDA,EAAOG,YAA+C,cAAjCtD,IAAAA,QAAAA,IAAgB,YACvC,KAEAqC,EAAAA,EAAAA,QAAOkB,IAAAA,UAA+B,iBAAiB,SAAUJ,GAC3D5E,KAAK4E,OAAOG,cACdH,EAAOK,SAAPL,EAAOK,OAAW,CAAC,GAEfL,EAAOK,OAAOC,EAChBN,EAAOK,OAAOC,GAAK,gBAEnBN,EAAOK,OAAOzD,aAAe,YAGnC,KC1CAsC,EAAAA,EAAAA,QAAOqB,IAAAA,UAAwB,sBAAsB,SAA8Bf,GAAO,aACxFA,EAAMV,IACJ,mBACA0B,IAAAA,UACE,CACEC,MAAOrF,KAAKsD,KAAKxB,cAAcwD,iBAC/BC,SAAU,SAACpG,GACT,EAAKqG,yBAA0B,EAE/B,EAAKlC,KAAKmC,gBAAgB,CAAEH,iBAAkBnG,IAASuG,MAAK,WAC1D,EAAKF,yBAA0B,EAC/BG,EAAEC,QACJ,GACF,EACAC,QAAS7F,KAAKwF,yBAEhB/D,IAAAA,WAAAA,MAAqB,kEAIzB2C,EAAMV,IACJ,oBACA,EAAC,IAAM,CACLoC,GAAG,6CACHT,QAAiC,OAAzB,EAACrF,KAAKsD,KAAMxB,iBAAX,EAA2B,8CACpCyD,SAAU,SAACQ,GACT,EAAKzC,KAAMmC,gBAAgB,CAAE,4CAA6CM,GAC5E,GAECtE,IAAAA,WAAAA,MAAqB,mEAG5B,KJfAqC,EAAAA,EAAAA,QAAOkC,IAAAA,UAA4B,qBAAqB,SAAU5B,GAChEA,EAAMV,IAAI,UAAW,CACnBuC,KAAM,UACNjF,KAAM,cACNC,MAAOQ,IAAAA,WAAAA,MAAqB,8DAEhC,GACF,G","sources":["webpack://@flarum/subscriptions/webpack/bootstrap","webpack://@flarum/subscriptions/webpack/runtime/compat get default export","webpack://@flarum/subscriptions/webpack/runtime/define property getters","webpack://@flarum/subscriptions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/subscriptions/webpack/runtime/make namespace object","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/subscriptions/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/subscriptions/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/subscriptions/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenuItem.js","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenu.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/SettingsPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/subscriptions/./src/forum/components/NewPostNotification.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/subscriptions/./src/forum/extend.ts","webpack://@flarum/subscriptions/./src/forum/index.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionBadge.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionControls.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionFilter.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionSettings.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default class SubscriptionMenuItem extends Component {\n view() {\n return (\n \n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport extractText from 'flarum/common/utils/extractText';\nimport classList from 'flarum/common/utils/classList';\n\nimport SubscriptionMenuItem from './SubscriptionMenuItem';\n\nexport default class SubscriptionMenu extends Dropdown {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.options = [\n {\n subscription: null,\n icon: 'far fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_text'),\n },\n {\n subscription: 'follow',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_text'),\n },\n {\n subscription: 'ignore',\n icon: 'far fa-eye-slash',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_text'),\n },\n ];\n }\n\n view() {\n const discussion = this.attrs.discussion;\n const subscription = discussion.subscription();\n\n let buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.follow_button');\n let buttonIcon = 'far fa-star';\n const buttonClass = 'SubscriptionMenu-button--' + subscription;\n\n switch (subscription) {\n case 'follow':\n buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button');\n buttonIcon = 'fas fa-star';\n break;\n\n case 'ignore':\n buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button');\n buttonIcon = 'far fa-eye-slash';\n break;\n\n default:\n // no default\n }\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPost_email'];\n const notifyAlert = preferences['notify_newPost_alert'];\n const tooltipText = extractText(\n app.translator.trans(\n notifyEmail ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'\n )\n );\n\n const shouldShowTooltip = (notifyEmail || notifyAlert) && subscription === null;\n\n const button = (\n \n {buttonLabel}\n \n );\n\n return (\n
          \n {shouldShowTooltip ? (\n \n {button}\n \n ) : (\n button\n )}\n\n \n\n
            \n {this.options.map((attrs) => (\n
          • \n {SubscriptionMenuItem.component({\n ...attrs,\n onclick: this.saveSubscription.bind(this, discussion, attrs.subscription),\n active: subscription === attrs.subscription,\n })}\n
          • \n ))}\n
          \n
          \n );\n }\n\n saveSubscription(discussion, subscription) {\n discussion.save({ subscription });\n\n this.$('.SubscriptionMenu-button').tooltip('hide');\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewPostNotification extends Notification {\n icon() {\n return 'fas fa-star';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n\n return app.route.discussion(discussion, content.postNumber);\n }\n\n content() {\n return app.translator.trans('flarum-subscriptions.forum.notifications.new_post_text', { user: this.attrs.notification.fromUser() });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","import Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\n\nexport default [\n new Extend.Routes() //\n .add('following', '/following', IndexPage),\n\n new Extend.Model(Discussion) //\n .attribute('subscription'),\n];\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Discussion from 'flarum/common/models/Discussion';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addSubscriptionBadge from './addSubscriptionBadge';\nimport addSubscriptionControls from './addSubscriptionControls';\nimport addSubscriptionFilter from './addSubscriptionFilter';\nimport addSubscriptionSettings from './addSubscriptionSettings';\n\nimport NewPostNotification from './components/NewPostNotification';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('subscriptions', function () {\n app.notificationComponents.newPost = NewPostNotification;\n\n addSubscriptionBadge();\n addSubscriptionControls();\n addSubscriptionFilter();\n addSubscriptionSettings();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('newPost', {\n name: 'newPost',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.settings.notify_new_post_label'),\n });\n });\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addSubscriptionBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n let badge;\n\n switch (this.subscription()) {\n case 'follow':\n badge = Badge.component({\n label: app.translator.trans('flarum-subscriptions.forum.badge.following_tooltip'),\n icon: 'fas fa-star',\n type: 'following',\n });\n break;\n\n case 'ignore':\n badge = Badge.component({\n label: app.translator.trans('flarum-subscriptions.forum.badge.ignoring_tooltip'),\n icon: 'far fa-eye-slash',\n type: 'ignoring',\n });\n break;\n\n default:\n // no default\n }\n\n if (badge) {\n badges.add('subscription', badge);\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\n\nimport SubscriptionMenu from './components/SubscriptionMenu';\n\nexport default function addSubscriptionControls() {\n extend(DiscussionControls, 'userControls', function (items, discussion, context) {\n if (app.session.user && !(context instanceof DiscussionPage)) {\n const states = {\n none: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.follow_button'), icon: 'fas fa-star', save: 'follow' },\n follow: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unfollow_button'), icon: 'far fa-star', save: null },\n ignore: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unignore_button'), icon: 'fas fa-eye', save: null },\n };\n\n const subscription = discussion.subscription() || 'none';\n\n items.add(\n 'subscription',\n Button.component(\n {\n icon: states[subscription].icon,\n onclick: discussion.save.bind(discussion, { subscription: states[subscription].save }),\n },\n states[subscription].label\n )\n );\n }\n });\n\n extend(DiscussionPage.prototype, 'sidebarItems', function (items) {\n if (app.session.user) {\n const discussion = this.discussion;\n\n items.add('subscription', SubscriptionMenu.component({ discussion }), 80);\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\n\nexport default function addSubscriptionFilter() {\n extend(IndexPage.prototype, 'navItems', function (items) {\n if (app.session.user) {\n const params = app.search.stickyParams();\n\n items.add(\n 'following',\n LinkButton.component(\n {\n href: app.route('following', params),\n icon: 'fas fa-star',\n },\n app.translator.trans('flarum-subscriptions.forum.index.following_link')\n ),\n 50\n );\n }\n });\n\n extend(IndexPage.prototype, 'setTitle', function () {\n if (app.current.get('routeName') === 'following') {\n app.setTitle(app.translator.trans('flarum-subscriptions.forum.following.meta_title_text'));\n }\n });\n\n extend(GlobalSearchState.prototype, 'params', function (params) {\n // We can't set `q` here directly, as that would make the search bar\n // think that text has been entered, and display the \"clear\" button.\n params.onFollowing = app.current.get('routeName') === 'following';\n });\n\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (this.params.onFollowing) {\n params.filter ||= {};\n\n if (params.filter.q) {\n params.filter.q += ' is:following';\n } else {\n params.filter.subscription = 'following';\n }\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport Switch from 'flarum/common/components/Switch';\n\nexport default function () {\n extend(SettingsPage.prototype, 'notificationsItems', function (this: SettingsPage, items) {\n items.add(\n 'followAfterReply',\n Switch.component(\n {\n state: this.user.preferences().followAfterReply,\n onchange: (value) => {\n this.followAfterReplyLoading = true;\n\n this.user.savePreferences({ followAfterReply: value }).then(() => {\n this.followAfterReplyLoading = false;\n m.redraw();\n });\n },\n loading: this.followAfterReplyLoading,\n },\n app.translator.trans('flarum-subscriptions.forum.settings.follow_after_reply_label')\n )\n );\n\n items.add(\n 'notifyForAllPosts',\n {\n this.user!.savePreferences({ 'flarum-subscriptions.notify_for_all_posts': val });\n }}\n >\n {app.translator.trans('flarum-subscriptions.forum.settings.notify_for_all_posts_label')}\n \n );\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_extends","assign","bind","target","i","arguments","length","source","apply","this","_setPrototypeOf","p","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","SubscriptionMenuItem","view","className","onclick","attrs","active","icon","label","description","Component","SubscriptionMenu","oninit","vnode","options","subscription","app","discussion","buttonLabel","buttonIcon","buttonClass","preferences","notifyEmail","notifyAlert","tooltipText","extractText","shouldShowTooltip","button","classList","saveSubscription","indexOf","text","position","map","component","save","$","tooltip","Dropdown","NewPostNotification","href","notification","subject","content","postNumber","user","fromUser","Notification","Extend","add","IndexPage","Discussion","attribute","extend","badges","badge","Badge","type","DiscussionControls","items","context","DiscussionPage","states","none","follow","ignore","Button","params","LinkButton","GlobalSearchState","onFollowing","DiscussionListState","filter","q","SettingsPage","Switch","state","followAfterReply","onchange","followAfterReplyLoading","savePreferences","then","m","redraw","loading","id","val","NotificationGrid","name"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAnBF,OAAOC,KAAKC,OAAO,gBAAxD,MCAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,qC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,2B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,mC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,kC,aCAzC,SAASC,EAAgBhB,EAAGiB,GAKzC,OAJAD,EAAkBf,OAAOiB,eAAiBjB,OAAOiB,eAAeC,OAAS,SAAyBnB,EAAGiB,GAEnG,OADAjB,EAAEoB,UAAYH,EACPjB,CACT,EACOgB,EAAg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AA,QAAAA,IAAgB,YACvC,KAEAoC,EAAAA,EAAAA,QAAOe,IAAAA,UAA+B,iBAAiB,SAAUH,GAC3D5D,KAAK4D,OAAOE,cACdF,EAAOI,SAAPJ,EAAOI,OAAW,CAAC,GAEfJ,EAAOI,OAAOC,EAChBL,EAAOI,OAAOC,GAAK,gBAEnBL,EAAOI,OAAOrD,aAAe,YAGnC,KCtCAqC,EAAAA,EAAAA,QAAOkB,IAAAA,UAAwB,sBAAsB,SAA8Bb,GAAO,aACxFA,EAAMT,IACJ,mBACA,EAAC,IAAM,CACLuB,MAAOnE,KAAKwC,KAAKvB,cAAcmD,iBAC/BC,SAAU,SAACvF,GACT,EAAKwF,yBAA0B,EAE/B,EAAK9B,KAAK+B,gBAAgB,CAAEH,iBAAkBtF,IAAS0F,MAAK,WAC1D,EAAKF,yBAA0B,EAC/BG,EAAEC,QACJ,GACF,EACAC,QAAS3E,KAAKsE,yBAEb1D,IAAAA,WAAAA,MAAqB,kEAI1ByC,EAAMT,IACJ,oBACA,EAAC,IAAM,CACLgC,GAAG,6CACHT,QAAiC,OAAzB,EAACnE,KAAKwC,KAAMvB,iBAAX,EAA2B,8CACpCoD,SAAU,SAACQ,GACT,EAAKrC,KAAM+B,gBAAgB,CAAE,4CAA6CM,GAC5E,GAECjE,IAAAA,WAAAA,MAAqB,mEAG5B,KJdAoC,EAAAA,EAAAA,QAAO8B,IAAAA,UAA4B,qBAAqB,SAAUzB,GAChEA,EAAMT,IAAI,UAAW,CACnBmC,KAAM,UACN5E,KAAM,cACNC,MAAOQ,IAAAA,WAAAA,MAAqB,8DAEhC,GACF,G","sources":["webpack://@flarum/subscriptions/webpack/bootstrap","webpack://@flarum/subscriptions/webpack/runtime/compat get default export","webpack://@flarum/subscriptions/webpack/runtime/define property getters","webpack://@flarum/subscriptions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/subscriptions/webpack/runtime/make namespace object","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/subscriptions/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/subscriptions/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenuItem.js","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenu.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/SettingsPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/subscriptions/./src/forum/components/NewPostNotification.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/subscriptions/./src/forum/extend.ts","webpack://@flarum/subscriptions/./src/forum/index.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionBadge.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionControls.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionFilter.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionSettings.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default class SubscriptionMenuItem extends Component {\n view() {\n return (\n \n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport extractText from 'flarum/common/utils/extractText';\nimport classList from 'flarum/common/utils/classList';\n\nimport SubscriptionMenuItem from './SubscriptionMenuItem';\n\nexport default class SubscriptionMenu extends Dropdown {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.options = [\n {\n subscription: null,\n icon: 'far fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_text'),\n },\n {\n subscription: 'follow',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_text'),\n },\n {\n subscription: 'ignore',\n icon: 'far fa-eye-slash',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_text'),\n },\n ];\n }\n\n view() {\n const discussion = this.attrs.discussion;\n const subscription = discussion.subscription();\n\n let buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.follow_button');\n let buttonIcon = 'far fa-star';\n const buttonClass = 'SubscriptionMenu-button--' + subscription;\n\n switch (subscription) {\n case 'follow':\n buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button');\n buttonIcon = 'fas fa-star';\n break;\n\n case 'ignore':\n buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button');\n buttonIcon = 'far fa-eye-slash';\n break;\n\n default:\n // no default\n }\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPost_email'];\n const notifyAlert = preferences['notify_newPost_alert'];\n const tooltipText = extractText(\n app.translator.trans(\n notifyEmail ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'\n )\n );\n\n const shouldShowTooltip = (notifyEmail || notifyAlert) && subscription === null;\n\n const button = (\n \n {buttonLabel}\n \n );\n\n return (\n
          \n {shouldShowTooltip ? (\n \n {button}\n \n ) : (\n button\n )}\n\n \n\n
            \n {this.options.map((attrs) => (\n
          • \n \n
          • \n ))}\n
          \n
          \n );\n }\n\n saveSubscription(discussion, subscription) {\n discussion.save({ subscription });\n\n this.$('.SubscriptionMenu-button').tooltip('hide');\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewPostNotification extends Notification {\n icon() {\n return 'fas fa-star';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n\n return app.route.discussion(discussion, content.postNumber);\n }\n\n content() {\n return app.translator.trans('flarum-subscriptions.forum.notifications.new_post_text', { user: this.attrs.notification.fromUser() });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","import Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\n\nexport default [\n new Extend.Routes() //\n .add('following', '/following', IndexPage),\n\n new Extend.Model(Discussion) //\n .attribute('subscription'),\n];\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Discussion from 'flarum/common/models/Discussion';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addSubscriptionBadge from './addSubscriptionBadge';\nimport addSubscriptionControls from './addSubscriptionControls';\nimport addSubscriptionFilter from './addSubscriptionFilter';\nimport addSubscriptionSettings from './addSubscriptionSettings';\n\nimport NewPostNotification from './components/NewPostNotification';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('subscriptions', function () {\n app.notificationComponents.newPost = NewPostNotification;\n\n addSubscriptionBadge();\n addSubscriptionControls();\n addSubscriptionFilter();\n addSubscriptionSettings();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('newPost', {\n name: 'newPost',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.settings.notify_new_post_label'),\n });\n });\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addSubscriptionBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n let badge;\n\n switch (this.subscription()) {\n case 'follow':\n badge = ;\n break;\n\n case 'ignore':\n badge = ;\n break;\n }\n\n if (badge) {\n badges.add('subscription', badge);\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\n\nimport SubscriptionMenu from './components/SubscriptionMenu';\n\nexport default function addSubscriptionControls() {\n extend(DiscussionControls, 'userControls', function (items, discussion, context) {\n if (app.session.user && !(context instanceof DiscussionPage)) {\n const states = {\n none: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.follow_button'), icon: 'fas fa-star', save: 'follow' },\n follow: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unfollow_button'), icon: 'far fa-star', save: null },\n ignore: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unignore_button'), icon: 'fas fa-eye', save: null },\n };\n\n const subscription = discussion.subscription() || 'none';\n\n items.add(\n 'subscription',\n \n );\n }\n });\n\n extend(DiscussionPage.prototype, 'sidebarItems', function (items) {\n if (app.session.user) {\n const discussion = this.discussion;\n\n items.add('subscription', , 80);\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\n\nexport default function addSubscriptionFilter() {\n extend(IndexPage.prototype, 'navItems', function (items) {\n if (app.session.user) {\n const params = app.search.stickyParams();\n\n items.add(\n 'following',\n \n {app.translator.trans('flarum-subscriptions.forum.index.following_link')}\n ,\n 50\n );\n }\n });\n\n extend(IndexPage.prototype, 'setTitle', function () {\n if (app.current.get('routeName') === 'following') {\n app.setTitle(app.translator.trans('flarum-subscriptions.forum.following.meta_title_text'));\n }\n });\n\n extend(GlobalSearchState.prototype, 'params', function (params) {\n // We can't set `q` here directly, as that would make the search bar\n // think that text has been entered, and display the \"clear\" button.\n params.onFollowing = app.current.get('routeName') === 'following';\n });\n\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (this.params.onFollowing) {\n params.filter ||= {};\n\n if (params.filter.q) {\n params.filter.q += ' is:following';\n } else {\n params.filter.subscription = 'following';\n }\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport Switch from 'flarum/common/components/Switch';\n\nexport default function () {\n extend(SettingsPage.prototype, 'notificationsItems', function (this: SettingsPage, items) {\n items.add(\n 'followAfterReply',\n {\n this.followAfterReplyLoading = true;\n\n this.user.savePreferences({ followAfterReply: value }).then(() => {\n this.followAfterReplyLoading = false;\n m.redraw();\n });\n }}\n loading={this.followAfterReplyLoading}\n >\n {app.translator.trans('flarum-subscriptions.forum.settings.follow_after_reply_label')}\n \n );\n\n items.add(\n 'notifyForAllPosts',\n {\n this.user!.savePreferences({ 'flarum-subscriptions.notify_for_all_posts': val });\n }}\n >\n {app.translator.trans('flarum-subscriptions.forum.settings.notify_for_all_posts_label')}\n \n );\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","SubscriptionMenuItem","view","className","onclick","this","attrs","active","icon","label","description","Component","SubscriptionMenu","oninit","vnode","options","subscription","app","discussion","buttonLabel","buttonIcon","buttonClass","preferences","notifyEmail","notifyAlert","tooltipText","extractText","shouldShowTooltip","button","classList","saveSubscription","indexOf","text","position","map","save","$","tooltip","Dropdown","NewPostNotification","href","notification","subject","content","postNumber","user","fromUser","Notification","Extend","add","IndexPage","Discussion","attribute","extend","badges","badge","type","DiscussionControls","items","context","DiscussionPage","states","none","follow","ignore","params","GlobalSearchState","onFollowing","DiscussionListState","filter","q","SettingsPage","state","followAfterReply","onchange","followAfterReplyLoading","savePreferences","then","m","redraw","loading","id","val","NotificationGrid","name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/suspend/js/dist/forum.js b/extensions/suspend/js/dist/forum.js index da175e8fd7..30c32baa4c 100644 --- a/extensions/suspend/js/dist/forum.js +++ b/extensions/suspend/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",s="second",r="minute",i="hour",a="day",o="week",u="month",c="quarter",l="year",d="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var s=String(t);return!s||s.length>=e?t:""+Array(e+1-s.length).join(n)+t},$={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),s=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+v(s,2,"0")+":"+v(r,2,"0")},m:function t(e,n){if(e.date()1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!s&&r&&(g=r),r||!s&&g},b=function(t,e){if(M(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new D(n)},S=$;S.l=_,S.i=M,S.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function p(t){this.$L=_(t.locale,null,!0),this.parse(t)}var v=p.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var s=e.match(m);if(s){var r=s[2]-1||0,i=(s[7]||"0").substring(0,3);return n?new Date(Date.UTC(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)):new Date(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return b(t){var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};(()=>{"use strict";n.r(s),n.d(s,{extend:()=>Q});const t=flarum.core.compat.extend,e=flarum.core.compat.app;var r=n.n(e);const i=flarum.core.compat["utils/UserControls"];var a=n.n(i);const o=flarum.core.compat["components/Button"];var u=n.n(o);const c=flarum.core.compat["components/Badge"];var l=n.n(c);const d=flarum.core.compat["models/User"];var f=n.n(d);function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e)}const v=flarum.core.compat["forum/app"];var $=n.n(v);const g=flarum.core.compat["components/Modal"];var y=n.n(g);const M=flarum.core.compat["utils/Stream"];var _=n.n(M);const b=flarum.core.compat["utils/withAttr"];var S=n.n(b);const D=flarum.core.compat["common/utils/ItemList"];var w=n.n(D),O=n(757),x=n.n(O),T=n(221),U=n.n(T);function N(t){return x().utc(t).isSame(x().utc("2038-01-01"))}x().extend(U());var C=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e);var n=this.attrs.user.suspendedUntil(),s=this.attrs.user.suspendReason(),r=this.attrs.user.suspendMessage(),i=null;new Date>n&&(n=null),n&&(i=9999===n.getFullYear()?"indefinitely":"limited"),this.status=_()(i),this.reason=_()(s),this.message=_()(r),this.daysRemaining=_()("limited"===i&&1-dayjs().diff(n,"days"))},n.className=function(){return"SuspendUserModal Modal--medium"},n.title=function(){return $().translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.attrs.user})},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.status_heading")),m("div",null,this.formItems().toArray())),m("div",{className:"Form-group"},m(u(),{className:"Button Button--primary",loading:this.loading,type:"submit"},$().translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))},n.radioItems=function(){var t=this,e=new(w());return e.add("not-suspended",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:S()("value",this.status)}),$().translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),100),e.add("indefinitely",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:S()("value",this.status)}),$().translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),90),e.add("time-suspension",m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:function(e){t.status(e.target.value),m.redraw.sync(),t.$(".SuspendUserModal-days-input input").select(),e.redraw=!1}}),$().translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()&&m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:S()("value",this.daysRemaining),className:"FormControl"}),$().translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text"))),80),e},n.formItems=function(){var t=new(w());return t.add("radioItems",m("div",{className:"Form-group"},this.radioItems().toArray()),100),t.add("reason",m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.reason"),m("textarea",{className:"FormControl",bidi:this.reason,placeholder:$().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),90),t.add("message",m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.display_message"),m("textarea",{className:"FormControl",bidi:this.message,placeholder:$().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),80),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=null;switch(this.status()){case"indefinitely":n=new Date("2038-01-01");break;case"limited":n=dayjs().add(this.daysRemaining(),"days").toDate()}this.attrs.user.save({suspendedUntil:n,suspendReason:this.reason(),suspendMessage:this.message()}).then((function(){return e.hide()}),this.loaded.bind(this))},e}(y());const k=flarum.core.compat["components/Notification"];var Y=n.n(k),I=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return $().route.user(this.attrs.notification.subject())},n.content=function(){var t=this.attrs.notification,e=t.content(),n=dayjs(e).from(t.createdAt(),!0);return N(e)?$().translator.trans("flarum-suspend.forum.notifications.user_suspended_indefinite_text"):$().translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{timeReadable:n})},e}(Y()),F=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return $().route.user(this.attrs.notification.subject())},n.content=function(){return this.attrs.notification,$().translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text")},e}(Y());const H=flarum.core.compat["common/components/Modal"];var j=n.n(H);const L=flarum.core.compat["common/components/Button"];var A=n.n(L);const W=flarum.core.compat["common/helpers/fullTime"];var B=n.n(W),R=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.message=this.attrs.message,this.until=this.attrs.until},n.className=function(){return"SuspensionInfoModal Modal"},n.title=function(){return $().translator.trans("flarum-suspend.forum.suspension_info.title")},n.content=function(){var t=N(new Date(this.until))?$().translator.trans("flarum-suspend.forum.suspension_info.indefinite"):$().translator.trans("flarum-suspend.forum.suspension_info.limited",{date:B()(this.until)});return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},this.message),m("p",{className:"helpText"},t),m("div",{className:"Form-group"},m(A(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},$().translator.trans("flarum-suspend.forum.suspension_info.dismiss_button")))))},n.hide=function(){localStorage.setItem("flarum-suspend.acknowledge-suspension",this.attrs.until.getTime()),this.attrs.state.close()},e}(j());function P(){return setTimeout((function(){if($().session.user){var t=$().session.user.suspendMessage(),e=$().session.user.suspendedUntil(),n=t&&e&&new Date{var t={757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",s="second",r="minute",i="hour",a="day",o="week",u="month",c="quarter",l="year",d="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var s=String(t);return!s||s.length>=e?t:""+Array(e+1-s.length).join(n)+t},$={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),s=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+v(s,2,"0")+":"+v(r,2,"0")},m:function t(e,n){if(e.date()1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!s&&r&&(g=r),r||!s&&g},b=function(t,e){if(M(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new D(n)},S=$;S.l=_,S.i=M,S.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function p(t){this.$L=_(t.locale,null,!0),this.parse(t)}var v=p.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var s=e.match(m);if(s){var r=s[2]-1||0,i=(s[7]||"0").substring(0,3);return n?new Date(Date.UTC(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)):new Date(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return b(t){var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};(()=>{"use strict";n.r(s),n.d(s,{extend:()=>Q});const t=flarum.core.compat.extend,e=flarum.core.compat.app;var r=n.n(e);const i=flarum.core.compat["utils/UserControls"];var a=n.n(i);const o=flarum.core.compat["components/Button"];var u=n.n(o);const c=flarum.core.compat["components/Badge"];var l=n.n(c);const d=flarum.core.compat["models/User"];var f=n.n(d);function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e)}const v=flarum.core.compat["forum/app"];var $=n.n(v);const g=flarum.core.compat["components/Modal"];var y=n.n(g);const M=flarum.core.compat["utils/Stream"];var _=n.n(M);const b=flarum.core.compat["utils/withAttr"];var S=n.n(b);const D=flarum.core.compat["common/utils/ItemList"];var w=n.n(D),O=n(757),x=n.n(O),T=n(221),U=n.n(T);function N(t){return x().utc(t).isSame(x().utc("2038-01-01"))}x().extend(U());var C=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e);var n=this.attrs.user.suspendedUntil(),s=this.attrs.user.suspendReason(),r=this.attrs.user.suspendMessage(),i=null;new Date>n&&(n=null),n&&(i=9999===n.getFullYear()?"indefinitely":"limited"),this.status=_()(i),this.reason=_()(s),this.message=_()(r),this.daysRemaining=_()("limited"===i&&1-dayjs().diff(n,"days"))},n.className=function(){return"SuspendUserModal Modal--medium"},n.title=function(){return $().translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.attrs.user})},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.status_heading")),m("div",null,this.formItems().toArray())),m("div",{className:"Form-group"},m(u(),{className:"Button Button--primary",loading:this.loading,type:"submit"},$().translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))},n.radioItems=function(){var t=this,e=new(w());return e.add("not-suspended",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:S()("value",this.status)}),$().translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),100),e.add("indefinitely",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:S()("value",this.status)}),$().translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),90),e.add("time-suspension",m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:function(e){t.status(e.target.value),m.redraw.sync(),t.$(".SuspendUserModal-days-input input").select(),e.redraw=!1}}),$().translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()&&m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:S()("value",this.daysRemaining),className:"FormControl"}),$().translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text"))),80),e},n.formItems=function(){var t=new(w());return t.add("radioItems",m("div",{className:"Form-group"},this.radioItems().toArray()),100),t.add("reason",m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.reason"),m("textarea",{className:"FormControl",bidi:this.reason,placeholder:$().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),90),t.add("message",m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.display_message"),m("textarea",{className:"FormControl",bidi:this.message,placeholder:$().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),80),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=null;switch(this.status()){case"indefinitely":n=new Date("2038-01-01");break;case"limited":n=dayjs().add(this.daysRemaining(),"days").toDate()}this.attrs.user.save({suspendedUntil:n,suspendReason:this.reason(),suspendMessage:this.message()}).then((function(){return e.hide()}),this.loaded.bind(this))},e}(y());const k=flarum.core.compat["components/Notification"];var Y=n.n(k),I=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return $().route.user(this.attrs.notification.subject())},n.content=function(){var t=this.attrs.notification,e=t.content(),n=dayjs(e).from(t.createdAt(),!0);return N(e)?$().translator.trans("flarum-suspend.forum.notifications.user_suspended_indefinite_text"):$().translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{timeReadable:n})},e}(Y()),F=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return $().route.user(this.attrs.notification.subject())},n.content=function(){return this.attrs.notification,$().translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text")},e}(Y());const H=flarum.core.compat["common/components/Modal"];var j=n.n(H);const L=flarum.core.compat["common/components/Button"];var A=n.n(L);const W=flarum.core.compat["common/helpers/fullTime"];var B=n.n(W),R=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.message=this.attrs.message,this.until=this.attrs.until},n.className=function(){return"SuspensionInfoModal Modal"},n.title=function(){return $().translator.trans("flarum-suspend.forum.suspension_info.title")},n.content=function(){var t=N(new Date(this.until))?$().translator.trans("flarum-suspend.forum.suspension_info.indefinite"):$().translator.trans("flarum-suspend.forum.suspension_info.limited",{date:B()(this.until)});return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},this.message),m("p",{className:"helpText"},t),m("div",{className:"Form-group"},m(A(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},$().translator.trans("flarum-suspend.forum.suspension_info.dismiss_button")))))},n.hide=function(){localStorage.setItem("flarum-suspend.acknowledge-suspension",this.attrs.until.getTime()),this.attrs.state.close()},e}(j());function P(){return setTimeout((function(){if($().session.user){var t=$().session.user.suspendMessage(),e=$().session.user.suspendedUntil(),n=t&&e&&new Date=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/UserControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['models/User'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\n\ndayjs.extend(utc);\n\nexport function getPermanentSuspensionDate(): Date {\n return new Date('2038-01-01');\n}\n\nexport function isPermanentSuspensionDate(date: Date): boolean {\n return dayjs.utc(date).isSame(dayjs.utc('2038-01-01'));\n}\n\nexport function localStorageKey(): string {\n return 'flarum-suspend.acknowledge-suspension';\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\n\nimport Stream from 'flarum/utils/Stream';\nimport withAttr from 'flarum/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { getPermanentSuspensionDate } from '../helpers/suspensionHelper';\n\nexport default class SuspendUserModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n let until = this.attrs.user.suspendedUntil();\n const reason = this.attrs.user.suspendReason();\n const message = this.attrs.user.suspendMessage();\n let status = null;\n\n if (new Date() > until) until = null;\n\n if (until) {\n if (until.getFullYear() === 9999) status = 'indefinitely';\n else status = 'limited';\n }\n\n this.status = Stream(status);\n this.reason = Stream(reason);\n this.message = Stream(message);\n this.daysRemaining = Stream(status === 'limited' && -dayjs().diff(until, 'days') + 1);\n }\n\n className() {\n return 'SuspendUserModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-suspend.forum.suspend_user.title', { user: this.attrs.user });\n }\n\n content() {\n return (\n
          \n
          \n
          \n \n
          {this.formItems().toArray()}
          \n
          \n\n
          \n \n
          \n
          \n
          \n );\n }\n\n radioItems() {\n const items = new ItemList();\n\n items.add(\n 'not-suspended',\n ,\n 100\n );\n\n items.add(\n 'indefinitely',\n ,\n 90\n );\n\n items.add(\n 'time-suspension',\n ,\n 80\n );\n\n return items;\n }\n\n formItems() {\n const items = new ItemList();\n\n items.add('radioItems',
          {this.radioItems().toArray()}
          , 100);\n\n items.add(\n 'reason',\n
          \n \n
          ,\n 90\n );\n\n items.add(\n 'message',\n
          \n \n
          ,\n 80\n );\n\n return items;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n let suspendedUntil = null;\n switch (this.status()) {\n case 'indefinitely':\n suspendedUntil = getPermanentSuspensionDate();\n break;\n\n case 'limited':\n suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate();\n break;\n\n default:\n // no default\n }\n\n this.attrs.user\n .save({ suspendedUntil, suspendReason: this.reason(), suspendMessage: this.message() })\n .then(() => this.hide(), this.loaded.bind(this));\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\nimport { isPermanentSuspensionDate } from '../helpers/suspensionHelper';\n\nexport default class UserSuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n\n content() {\n const notification = this.attrs.notification;\n const suspendedUntil = notification.content();\n const timeReadable = dayjs(suspendedUntil).from(notification.createdAt(), true);\n\n return isPermanentSuspensionDate(suspendedUntil)\n ? app.translator.trans('flarum-suspend.forum.notifications.user_suspended_indefinite_text')\n : app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {\n timeReadable,\n });\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\n\nexport default class UserUnsuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n\n content() {\n const notification = this.attrs.notification;\n\n return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text');\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/fullTime'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport fullTime from 'flarum/common/helpers/fullTime';\nimport { isPermanentSuspensionDate, localStorageKey } from '../helpers/suspensionHelper';\n\nexport default class SuspensionInfoModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.message = this.attrs.message;\n this.until = this.attrs.until;\n }\n\n className() {\n return 'SuspensionInfoModal Modal';\n }\n\n title() {\n return app.translator.trans('flarum-suspend.forum.suspension_info.title');\n }\n\n content() {\n const timespan = isPermanentSuspensionDate(new Date(this.until))\n ? app.translator.trans('flarum-suspend.forum.suspension_info.indefinite')\n : app.translator.trans('flarum-suspend.forum.suspension_info.limited', { date: fullTime(this.until) });\n\n return (\n
          \n
          \n

          {this.message}

          \n

          {timespan}

          \n\n
          \n \n
          \n
          \n
          \n );\n }\n\n hide() {\n localStorage.setItem(localStorageKey(), this.attrs.until.getTime());\n this.attrs.state.close();\n }\n}\n","import app from 'flarum/forum/app';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport { localStorageKey } from './helpers/suspensionHelper';\n\nexport default function () {\n return setTimeout(() => {\n if (app.session.user) {\n const message = app.session.user.suspendMessage();\n const until = app.session.user.suspendedUntil();\n const isSuspended = message && until && new Date() < until;\n const alreadyDisplayed = localStorage.getItem(localStorageKey()) === until?.getTime().toString();\n\n if (isSuspended && !alreadyDisplayed) {\n app.modal.show(SuspensionInfoModal, { message, until });\n } else if (localStorage.getItem(localStorageKey())) {\n localStorage.removeItem(localStorageKey());\n }\n }\n }, 0);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\n\nexport default [\n new Extend.Model(User)\n .attribute('canSuspend')\n .attribute('suspendedUntil', Model.transformDate)\n .attribute('suspendReason')\n .attribute('suspendMessage'),\n];\n","import SuspendUserModal from './components/SuspendUserModal';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport checkForSuspension from './checkForSuspension';\n\nexport default {\n 'suspend/components/suspendUserModal': SuspendUserModal,\n 'suspend/components/suspensionInfoModal': SuspensionInfoModal,\n 'suspend/components/UserSuspendedNotification': UserSuspendedNotification,\n 'suspend/components/UserUnsuspendedNotification': UserUnsuspendedNotification,\n 'suspend/checkForSuspension': checkForSuspension,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport UserControls from 'flarum/utils/UserControls';\nimport Button from 'flarum/components/Button';\nimport Badge from 'flarum/components/Badge';\nimport User from 'flarum/models/User';\n\nimport SuspendUserModal from './components/SuspendUserModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport checkForSuspension from './checkForSuspension';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-suspend', () => {\n app.notificationComponents.userSuspended = UserSuspendedNotification;\n app.notificationComponents.userUnsuspended = UserUnsuspendedNotification;\n\n extend(UserControls, 'moderationControls', (items, user) => {\n if (user.canSuspend()) {\n items.add(\n 'suspend',\n Button.component(\n {\n icon: 'fas fa-ban',\n onclick: () => app.modal.show(SuspendUserModal, { user }),\n },\n app.translator.trans('flarum-suspend.forum.user_controls.suspend_button')\n )\n );\n }\n });\n\n extend(User.prototype, 'badges', function (items) {\n const until = this.suspendedUntil();\n\n if (new Date() < until) {\n items.add(\n 'suspended',\n Badge.component({\n icon: 'fas fa-ban',\n type: 'suspended',\n label: app.translator.trans('flarum-suspend.forum.user_badge.suspended_tooltip'),\n })\n );\n }\n });\n\n checkForSuspension();\n});\n\n// Expose compat API\nimport suspendCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, suspendCompat);\n"],"names":["module","exports","e","n","r","i","s","u","a","o","f","h","c","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","_","S","args","arguments","O","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","forEach","extend","$i","isDayjs","en","Ls","local","call","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","key","Object","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","isPermanentSuspensionDate","dayjs","SuspendUserModal","oninit","vnode","until","attrs","user","suspendedUntil","reason","suspendReason","message","suspendMessage","status","Stream","daysRemaining","className","title","app","content","formItems","toArray","loading","type","radioItems","items","ItemList","checked","onclick","withAttr","target","redraw","sync","select","oninput","bidi","placeholder","rows","onsubmit","preventDefault","save","then","hide","loaded","Modal","UserSuspendedNotification","icon","href","notification","subject","timeReadable","from","createdAt","Notification","UserUnsuspendedNotification","SuspensionInfoModal","timespan","fullTime","localStorage","setItem","state","close","setTimeout","isSuspended","alreadyDisplayed","getItem","removeItem","Extend","User","attribute","Model","checkForSuspension","UserControls","canSuspend","Button","Badge","label","assign","suspendCompat"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"6BAAoEA,EAAOC,QAAmI,WAAW,aAAa,IAAUC,EAAE,IAAIC,EAAE,KAAKC,EAAE,cAAcC,EAAE,SAASC,EAAE,SAASC,EAAE,OAAOC,EAAE,MAAMC,EAAE,OAAOC,EAAE,QAAQC,EAAE,UAAUC,EAAE,OAAOC,EAAE,OAAOC,EAAE,eAAeC,EAAE,6FAA6FC,EAAE,sFAAsFC,EAAE,CAACC,KAAK,KAAKC,SAAS,2DAA2DC,MAAM,KAAKC,OAAO,wFAAwFD,MAAM,KAAKE,QAAQ,SAASC,GAAG,IAAIrB,EAAE,CAAC,KAAK,KAAK,KAAK,MAAMC,EAAEoB,EAAE,IAAI,MAAM,IAAIA,GAAGrB,GAAGC,EAAE,IAAI,KAAKD,EAAEC,IAAID,EAAE,IAAI,GAAG,GAAGsB,EAAE,SAASD,EAAErB,EAAEC,GAAG,IAAIC,EAAEqB,OAAOF,GAAG,OAAOnB,GAAGA,EAAEsB,QAAQxB,EAAEqB,EAAE,GAAGI,MAAMzB,EAAE,EAAEE,EAAEsB,QAAQE,KAAKzB,GAAGoB,CAAC,EAAEM,EAAE,CAACvB,EAAEkB,EAAEM,EAAE,SAASP,GAAG,IAAIrB,GAAGqB,EAAEQ,YAAY5B,EAAE6B,KAAKC,IAAI/B,GAAGE,EAAE4B,KAAKE,MAAM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GACE,sCAAuCnE,EACvC,yCAA0CqD,EAC1C,+CAAgDV,EAChD,iDAAkDS,EAClD,6BAA8BiB,GCX1B,EAA+BnF,OAAOC,KCc5C6B,IAAAA,aAAAA,IAAqB,kBAAkB,WACrCA,IAAAA,uBAAAA,cAA2C2B,EAC3C3B,IAAAA,uBAAAA,gBAA6CoC,GAE7CtG,EAAAA,EAAAA,QAAOwH,IAAc,sBAAsB,SAAC/C,EAAOlB,GAC7CA,EAAKkE,cACPhD,EAAMjL,IACJ,UACA,EAAC,IAAM,CAACsM,KAAK,aAAalB,QAAS,kBAAMV,IAAAA,MAAAA,KAAehB,EAAkB,CAAEK,KAAAA,GAAO,GAChFW,IAAAA,WAAAA,MAAqB,sDAI9B,KAEAlE,EAAAA,EAAAA,QAAOoH,IAAAA,UAAgB,UAAU,SAAU3C,GACzC,IAAMpB,EAAQvI,KAAK0I,iBAEf,IAAItI,KAASmI,GACfoB,EAAMjL,IACJ,YACA,EAAC,IAAK,CAACsM,KAAK,aAAavB,KAAK,YAAYmD,MAAOxD,IAAAA,WAAAA,MAAqB,uDACtE,IAGN,IAEAqD,GACF,IAMA5F,OAAOgG,OAAOrF,EAAAA,OAAQsF,E","sources":["webpack://@flarum/suspend/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/suspend/../../../node_modules/dayjs/plugin/utc.js","webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/webpack/runtime/compat get default export","webpack://@flarum/suspend/webpack/runtime/define property getters","webpack://@flarum/suspend/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/suspend/webpack/runtime/make namespace object","webpack://@flarum/suspend/external root \"flarum.core.compat['extend']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['app']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['utils/UserControls']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Button']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Badge']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['models/User']\"","webpack://@flarum/suspend/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/suspend/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/suspend/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Modal']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['utils/Stream']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['utils/withAttr']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/suspend/./src/forum/helpers/suspensionHelper.ts","webpack://@flarum/suspend/./src/forum/components/SuspendUserModal.js","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Notification']\"","webpack://@flarum/suspend/./src/forum/components/UserSuspendedNotification.js","webpack://@flarum/suspend/./src/forum/components/UserUnsuspendedNotification.js","webpack://@flarum/suspend/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/helpers/fullTime']\"","webpack://@flarum/suspend/./src/forum/components/SuspensionInfoModal.js","webpack://@flarum/suspend/./src/forum/checkForSuspension.js","webpack://@flarum/suspend/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/models/User']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/suspend/./src/forum/extend.ts","webpack://@flarum/suspend/./src/forum/compat.js","webpack://@flarum/suspend/external assign \"flarum.core\"","webpack://@flarum/suspend/./src/forum/index.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/UserControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['models/User'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\n\ndayjs.extend(utc);\n\nexport function getPermanentSuspensionDate(): Date {\n return new Date('2038-01-01');\n}\n\nexport function isPermanentSuspensionDate(date: Date): boolean {\n return dayjs.utc(date).isSame(dayjs.utc('2038-01-01'));\n}\n\nexport function localStorageKey(): string {\n return 'flarum-suspend.acknowledge-suspension';\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\n\nimport Stream from 'flarum/utils/Stream';\nimport withAttr from 'flarum/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { getPermanentSuspensionDate } from '../helpers/suspensionHelper';\n\nexport default class SuspendUserModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n let until = this.attrs.user.suspendedUntil();\n const reason = this.attrs.user.suspendReason();\n const message = this.attrs.user.suspendMessage();\n let status = null;\n\n if (new Date() > until) until = null;\n\n if (until) {\n if (until.getFullYear() === 9999) status = 'indefinitely';\n else status = 'limited';\n }\n\n this.status = Stream(status);\n this.reason = Stream(reason);\n this.message = Stream(message);\n this.daysRemaining = Stream(status === 'limited' && -dayjs().diff(until, 'days') + 1);\n }\n\n className() {\n return 'SuspendUserModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-suspend.forum.suspend_user.title', { user: this.attrs.user });\n }\n\n content() {\n return (\n
          \n
          \n
          \n \n
          {this.formItems().toArray()}
          \n
          \n\n
          \n \n
          \n
          \n
          \n );\n }\n\n radioItems() {\n const items = new ItemList();\n\n items.add(\n 'not-suspended',\n ,\n 100\n );\n\n items.add(\n 'indefinitely',\n ,\n 90\n );\n\n items.add(\n 'time-suspension',\n ,\n 80\n );\n\n return items;\n }\n\n formItems() {\n const items = new ItemList();\n\n items.add('radioItems',
          {this.radioItems().toArray()}
          , 100);\n\n items.add(\n 'reason',\n
          \n \n
          ,\n 90\n );\n\n items.add(\n 'message',\n
          \n \n
          ,\n 80\n );\n\n return items;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n let suspendedUntil = null;\n switch (this.status()) {\n case 'indefinitely':\n suspendedUntil = getPermanentSuspensionDate();\n break;\n\n case 'limited':\n suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate();\n break;\n\n default:\n // no default\n }\n\n this.attrs.user\n .save({ suspendedUntil, suspendReason: this.reason(), suspendMessage: this.message() })\n .then(() => this.hide(), this.loaded.bind(this));\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\nimport { isPermanentSuspensionDate } from '../helpers/suspensionHelper';\n\nexport default class UserSuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n\n content() {\n const notification = this.attrs.notification;\n const suspendedUntil = notification.content();\n const timeReadable = dayjs(suspendedUntil).from(notification.createdAt(), true);\n\n return isPermanentSuspensionDate(suspendedUntil)\n ? app.translator.trans('flarum-suspend.forum.notifications.user_suspended_indefinite_text')\n : app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {\n timeReadable,\n });\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\n\nexport default class UserUnsuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n\n content() {\n const notification = this.attrs.notification;\n\n return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text');\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/fullTime'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport fullTime from 'flarum/common/helpers/fullTime';\nimport { isPermanentSuspensionDate, localStorageKey } from '../helpers/suspensionHelper';\n\nexport default class SuspensionInfoModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.message = this.attrs.message;\n this.until = this.attrs.until;\n }\n\n className() {\n return 'SuspensionInfoModal Modal';\n }\n\n title() {\n return app.translator.trans('flarum-suspend.forum.suspension_info.title');\n }\n\n content() {\n const timespan = isPermanentSuspensionDate(new Date(this.until))\n ? app.translator.trans('flarum-suspend.forum.suspension_info.indefinite')\n : app.translator.trans('flarum-suspend.forum.suspension_info.limited', { date: fullTime(this.until) });\n\n return (\n
          \n
          \n

          {this.message}

          \n

          {timespan}

          \n\n
          \n \n
          \n
          \n
          \n );\n }\n\n hide() {\n localStorage.setItem(localStorageKey(), this.attrs.until.getTime());\n this.attrs.state.close();\n }\n}\n","import app from 'flarum/forum/app';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport { localStorageKey } from './helpers/suspensionHelper';\n\nexport default function () {\n return setTimeout(() => {\n if (app.session.user) {\n const message = app.session.user.suspendMessage();\n const until = app.session.user.suspendedUntil();\n const isSuspended = message && until && new Date() < until;\n const alreadyDisplayed = localStorage.getItem(localStorageKey()) === until?.getTime().toString();\n\n if (isSuspended && !alreadyDisplayed) {\n app.modal.show(SuspensionInfoModal, { message, until });\n } else if (localStorage.getItem(localStorageKey())) {\n localStorage.removeItem(localStorageKey());\n }\n }\n }, 0);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\n\nexport default [\n new Extend.Model(User)\n .attribute('canSuspend')\n .attribute('suspendedUntil', Model.transformDate)\n .attribute('suspendReason')\n .attribute('suspendMessage'),\n];\n","import SuspendUserModal from './components/SuspendUserModal';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport checkForSuspension from './checkForSuspension';\n\nexport default {\n 'suspend/components/suspendUserModal': SuspendUserModal,\n 'suspend/components/suspensionInfoModal': SuspensionInfoModal,\n 'suspend/components/UserSuspendedNotification': UserSuspendedNotification,\n 'suspend/components/UserUnsuspendedNotification': UserUnsuspendedNotification,\n 'suspend/checkForSuspension': checkForSuspension,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport UserControls from 'flarum/utils/UserControls';\nimport Button from 'flarum/components/Button';\nimport Badge from 'flarum/components/Badge';\nimport User from 'flarum/models/User';\n\nimport SuspendUserModal from './components/SuspendUserModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport checkForSuspension from './checkForSuspension';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-suspend', () => {\n app.notificationComponents.userSuspended = UserSuspendedNotification;\n app.notificationComponents.userUnsuspended = UserUnsuspendedNotification;\n\n extend(UserControls, 'moderationControls', (items, user) => {\n if (user.canSuspend()) {\n items.add(\n 'suspend',\n \n );\n }\n });\n\n extend(User.prototype, 'badges', function (items) {\n const until = this.suspendedUntil();\n\n if (new Date() < until) {\n items.add(\n 'suspended',\n ,\n 100\n );\n }\n });\n\n checkForSuspension();\n});\n\n// Expose compat API\nimport suspendCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, suspendCompat);\n"],"names":["module","exports","e","n","r","i","s","u","a","o","f","h","c","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","_","S","args","arguments","O","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","forEach","extend","$i","isDayjs","en","Ls","local","call","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","key","Object","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","isPermanentSuspensionDate","dayjs","SuspendUserModal","oninit","vnode","until","attrs","user","suspendedUntil","reason","suspendReason","message","suspendMessage","status","Stream","daysRemaining","className","title","app","content","formItems","toArray","loading","type","radioItems","items","ItemList","checked","onclick","withAttr","target","redraw","sync","select","oninput","bidi","placeholder","rows","onsubmit","preventDefault","save","then","hide","loaded","Modal","UserSuspendedNotification","icon","href","notification","subject","timeReadable","from","createdAt","Notification","UserUnsuspendedNotification","SuspensionInfoModal","timespan","fullTime","localStorage","setItem","state","close","setTimeout","isSuspended","alreadyDisplayed","getItem","removeItem","Extend","User","attribute","Model","checkForSuspension","UserControls","canSuspend","label","assign","suspendCompat"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts b/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts index ebb10b83e7..81cb2aefc1 100644 --- a/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts +++ b/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts @@ -1,4 +1,4 @@ -/// +/// import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal'; import ItemList from 'flarum/common/utils/ItemList'; import Stream from 'flarum/common/utils/Stream'; diff --git a/extensions/tags/js/dist/admin.js b/extensions/tags/js/dist/admin.js index 34c1e554f8..3c4c924824 100644 --- a/extensions/tags/js/dist/admin.js +++ b/extensions/tags/js/dist/admin.js @@ -1,3 +1,3 @@ /*! For license information please see admin.js.LICENSE.txt */ -(()=>{var t={946:(t,e,n)=>{"use strict";n.d(e,{l:()=>kn});const o=flarum.core.compat["admin/app"];var r=n.n(o);const a=flarum.core.compat["common/extend"],i=flarum.core.compat["admin/components/PermissionGrid"];var s=n.n(i);const l=flarum.core.compat["admin/components/PermissionDropdown"];var c=n.n(l);const u=flarum.core.compat["common/components/Dropdown"];var d=n.n(u);const h=flarum.core.compat["common/components/Button"];var f=n.n(h);const p=flarum.core.compat["common/components/LoadingIndicator"];var g=n.n(p);const v=flarum.core.compat["common/utils/extract"];var b=n.n(v);const y=flarum.core.compat["common/components/Link"];var w=n.n(y);const _=flarum.core.compat["common/utils/classList"];var T=n.n(_);const x=flarum.core.compat["common/helpers/textContrastClass"];var S=n.n(x);function E(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=t&&t.icon(),r=n.useColor,a=void 0===r||r;return e.className=T()([e.className,"icon",o?t.icon():"TagIcon"]),t&&a?(e.style=e.style||{},e.style["--color"]=t.color(),o&&(e.style.color=t.color())):t||(e.className+=" untagged"),o?m("i",e):m("span",e)}function N(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=b()(e,"link"),o=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var r=t.color();r&&(e.style["--tag-bg"]=r,e.className=T()(e.className,"colored",S()(r))),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?w():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&E(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},o)))}function C(t){return t.slice(0).sort((function(t,e){var n=t.position(),o=e.position();if(null===n&&null===o)return e.discussionCount()-t.discussionCount();if(null===o)return-1;if(null===n)return 1;var r=t.parent(),a=e.parent();return r===a?n-o:r&&a?r.position()-a.position():r?r===e?1:r.position()-o:a?a===t?-1:n-a.position():0}))}function D(){(0,a.extend)(s().prototype,"oninit",(function(){this.loading=!0})),(0,a.extend)(s().prototype,"oncreate",(function(){var t=this;r().tagList.load().then((function(){t.loading=!1,m.redraw()}))})),(0,a.override)(s().prototype,"view",(function(t,e){return this.loading?m(g(),null):t(e)})),(0,a.override)(r(),"getRequiredPermissions",(function(t,e){var n=e.match(/^tag\d+\./);return n?t(e.substr(n[0].length)).map((function(t){return n[0]+t})):t(e)})),(0,a.extend)(s().prototype,"scopeItems",(function(t){C(r().store.all("tags")).filter((function(t){return t.isRestricted()})).forEach((function(e){return t.add("tag"+e.id(),{label:N(e),onremove:function(){return e.save({isRestricted:!1})},render:function(t){return"setting"in t?"":"viewForum"===t.permission||"startDiscussion"===t.permission||t.permission&&0===t.permission.indexOf("discussion.")&&!1!==t.tagScoped||t.tagScoped?c().component({permission:"tag"+e.id()+"."+t.permission,allowGuest:t.allowGuest}):""}})}))})),(0,a.extend)(s().prototype,"scopeControlItems",(function(t){var e=C(r().store.all("tags").filter((function(t){return!t.isRestricted()})));e.length&&t.add("tag",m(d(),{className:"Dropdown--restrictByTag",buttonClassName:"Button Button--text",label:r().translator.trans("flarum-tags.admin.permissions.restrict_by_tag_heading"),icon:"fas fa-plus",caretIcon:null},e.map((function(t){return m(f(),{icon:!0,onclick:function(){return t.save({isRestricted:!0})}},[E(t,{className:"Button-icon"})," ",t.name()])}))))}))}function O(){app.extensionData.for("flarum-tags").registerPermission({icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.tag_discussions_label"),permission:"discussion.tag"},"moderate",95).registerPermission({icon:"fas fa-tags",label:app.translator.trans("flarum-tags.admin.permissions.bypass_tag_counts_label"),permission:"bypassTagCounts"},"start",89)}const I=flarum.core.compat["admin/components/BasicsPage"];var P=n.n(I);function M(){(0,a.extend)(P().prototype,"homePageItems",(function(t){t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})}))}const L=flarum.core.compat["admin/components/SettingDropdown"];var k=n.n(L);function A(){(0,a.extend)(s().prototype,"startItems",(function(t){t.add("allowTagChange",{icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:function(){var t=parseInt(app.data.settings.allow_tag_change,10);return k().component({defaultLabel:t?app.translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:app.translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:app.translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)}))}const R=flarum.core.compat["admin/components/AdminPage"];var F=n.n(R);function B(){return B=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(r[n]=t[n]);return r}(e,nt),a=o?"far fa-check-circle":"far fa-circle";return m(f(),Object.assign({},r,{icon:a,className:T()([n,o&&"Button--toggled"])}),t.children)},e}(H()),rt=function(t){function e(){for(var e,n=arguments.length,o=new Array(n),r=0;rt.max.primary)throw new Error("The minimum number of primary tags allowed cannot be more than the maximum number of primary tags allowed.");if(t.min.secondary>t.max.secondary)throw new Error("The minimum number of secondary tags allowed cannot be more than the maximum number of secondary tags allowed.");if(t.min.total>t.max.primary+t.max.secondary)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of primary and secondary tags allowed together.");if(t.max.totalt.max.total)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of tags allowed.")}(e.limits)};var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.select.bind(this)).onRemove((function(){return n.selected.splice(n.selected.length-1,1)})),G().tagList.load(["parent"]).then((function(t){n.loading=!1,n.attrs.selectableTags&&(t=n.attrs.selectableTags(t)),n.tags=C(t),n.attrs.selectedTags&&n.attrs.selectedTags.map(n.addTag.bind(n)),n.indexTag=t[0],m.redraw()}))},n.className=function(){return T()("TagSelectionModal",this.attrs.className)},n.title=function(){return this.attrs.title},n.content=function(){var t=this;if(this.loading||!this.tags)return m(g(),null);var e=this.filter().toLowerCase(),n=this.primaryCount(),o=this.secondaryCount(),r=this.getFilteredTags(),a=Math.max(z()(this.getInstruction(n,o)).length,this.filter().length);return[m("div",{className:"Modal-body"},m("div",{className:"TagSelectionModal-form"},m("div",{className:"TagSelectionModal-form-input"},m("div",{className:"TagsInput FormControl "+(this.focused?"focus":""),onclick:function(){return t.$(".TagsInput input").focus()}},m("span",{className:"TagsInput-selected"},this.selected.map((function(e){return m("span",{className:"TagsInput-tag",onclick:function(){t.removeTag(e),t.onready()}},N(e))}))),m("input",{className:"FormControl",placeholder:z()(this.getInstruction(n,o)),bidi:this.filter,style:{width:a+"ch"},onkeydown:this.navigator.navigate.bind(this.navigator),onfocus:function(){return t.focused=!0},onblur:function(){return t.focused=!1}}))),m("div",{className:"TagSelectionModal-form-submit App-primaryControl"},m(f(),{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(n,o),icon:"fas fa-check"},G().translator.trans("flarum-tags.lib.tag_selection_modal.submit_button"))))),m("div",{className:"Modal-footer"},m("ul",{className:"TagSelectionModal-list SelectTagList"},r.map((function(n){return m("li",{"data-index":n.id(),className:T()({pinned:null!==n.position(),child:!!n.parent(),colored:!!n.color(),selected:t.selected.includes(n),active:t.indexTag===n}),style:{color:n.color()},onmouseover:function(){return t.indexTag=n},onclick:t.toggleTag.bind(t,n)},E(n),m("span",{className:"SelectTagListItem-name"},K()(n.name(),e)),n.description()?m("span",{className:"SelectTagListItem-description"},n.description()):"")}))),this.attrs.limits.allowBypassing&&m("div",{className:"TagSelectionModal-controls"},m(ot,{className:"Button",onclick:function(){return t.bypassReqs=!t.bypassReqs},isToggled:this.bypassReqs},G().translator.trans("flarum-tags.lib.tag_selection_modal.bypass_requirements"))))]},n.getFilteredTags=function(){var t=this,e=this.filter().toLowerCase(),n=this.primaryCount(),o=this.secondaryCount(),r=this.tags;return this.attrs.requireParentTag&&(r=r.filter((function(e){var n=e.parent();return null!==n&&(!1===n||t.selected.includes(n))}))),this.bypassReqs||(this.selected.length>=this.attrs.limits.max.total?r=r.filter((function(e){return t.selected.includes(e)})):(n>=this.attrs.limits.max.primary&&(r=r.filter((function(e){return!e.isPrimary()||t.selected.includes(e)}))),o>=this.attrs.limits.max.secondary&&(r=r.filter((function(e){return e.isPrimary()||t.selected.includes(e)}))))),e&&(r=r.filter((function(t){return t.name().toLowerCase().includes(e)}))),this.indexTag&&r.includes(this.indexTag)||(this.indexTag=r[0]),r},n.primaryCount=function(){return this.selected.filter((function(t){return t.isPrimary()})).length},n.secondaryCount=function(){return this.selected.filter((function(t){return!t.isPrimary()})).length},n.meetsRequirements=function(t,e){return!!(this.bypassReqs||this.attrs.allowResetting&&0===this.selected.length)||!(this.selected.length=this.attrs.limits.min.primary&&e>=this.attrs.limits.min.secondary},n.addTag=function(t){if(t&&this.attrs.canSelect(t)){if(this.attrs.onSelect&&this.attrs.onSelect(t,this.selected),this.attrs.requireParentTag){var e=t.parent();e&&!this.selected.includes(e)&&this.selected.push(e)}this.selected.includes(t)||this.selected.push(t)}},n.removeTag=function(t){var e=this.selected.indexOf(t);-1!==e&&(this.selected.splice(e,1),this.attrs.requireParentTag&&this.selected.filter((function(e){return e.parent()===t})).forEach(this.removeTag.bind(this)),this.attrs.onDeselect&&this.attrs.onDeselect(t,this.selected))},n.toggleTag=function(t){this.tags&&(this.selected.includes(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.indexTag=this.tags[0]),this.onready())},n.getInstruction=function(t,e){if(this.bypassReqs)return"";if(t li")},n.getCurrentNumericIndex=function(){return this.indexTag?this.selectableItems().index(this.getItem(this.indexTag)):-1},n.getItem=function(t){return this.selectableItems().filter('[data-index="'+t.id()+'"]')},n.setIndex=function(t,e){var n=this.selectableItems(),o=n.parent();t<0?t=n.length-1:t>=n.length&&(t=0);var r=n.eq(t);if(this.indexTag=G().store.getById("tags",r.attr("data-index")),m.redraw(),e&&this.indexTag){var a,i=o.scrollTop(),s=o.offset().top,l=s+o.outerHeight(),c=r.offset().top,u=c+r.outerHeight();cl&&(a=i-l+u+parseInt(o.css("padding-bottom"),10)),void 0!==a&&o.stop(!0).animate({scrollTop:a},100)}},e}(Q());function at(t,e){void 0===e&&(e={});var n=[],o=b()(e,"link");return e.className="TagsLabel "+(e.className||""),t?C(t).forEach((function(e){(e||1===t.length)&&n.push(N(e,{link:o}))})):n.push(N()),m("span",e,n)}var it=function(t){function e(){for(var e,n=arguments.length,o=new Array(n),r=0;r=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ht(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var ft=ht(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),pt=ht(/Edge/i),gt=ht(/firefox/i),vt=ht(/safari/i)&&!ht(/chrome/i)&&!ht(/android/i),bt=ht(/iP(ad|od|hone)/i),yt=ht(/chrome/i)&&ht(/android/i),wt={capture:!1,passive:!1};function _t(t,e,n){t.addEventListener(e,n,!ft&&wt)}function Tt(t,e,n){t.removeEventListener(e,n,!ft&&wt)}function xt(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function St(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Et(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&xt(t,e):xt(t,e))||o&&t===n)return t;if(t===n)break}while(t=St(t))}return null}var Nt,Ct=/\s+/g;function Dt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Ct," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Ct," ")}}function Ot(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function It(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Ot(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function Pt(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,a=o.length;if(n)for(;r=a:r<=a))return o;if(o===Mt())break;o=jt(o,!1)}return!1}function At(t,e,n,o){for(var r=0,a=0,i=t.children;a2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=mt(n,$t);Ut.pluginEvent.bind(Ye)(t,e,lt({dragEl:Jt,parentEl:Zt,ghostEl:Qt,rootEl:te,nextEl:ee,lastDownEl:ne,cloneEl:oe,cloneHidden:re,dragStarted:ve,putSortable:ue,activeSortable:Ye.active,originalEvent:o,oldIndex:ae,oldDraggableIndex:se,newIndex:ie,newDraggableIndex:le,hideGhostForTarget:Fe,unhideGhostForTarget:Be,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(t){Vt({sortable:e,name:t,originalEvent:o})}},r))};function Vt(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,r=t.targetEl,a=t.cloneEl,i=t.toEl,s=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,m=t.originalEvent,h=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[Gt]){var p,g=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||ft||pt?(p=document.createEvent("Event")).initEvent(o,!0,!0):p=new CustomEvent(o,{bubbles:!0,cancelable:!0}),p.to=i||n,p.from=s||n,p.item=r||n,p.clone=a,p.oldIndex=l,p.newIndex=c,p.oldDraggableIndex=u,p.newDraggableIndex=d,p.originalEvent=m,p.pullMode=h?h.lastPutMode:void 0;var b=lt(lt({},f),Ut.getEventProperties(o,e));for(var y in b)p[y]=b[y];n&&n.dispatchEvent(p),g[v]&&g[v].call(e,p)}}(lt({putSortable:ue,cloneEl:oe,targetEl:Jt,rootEl:te,oldIndex:ae,oldDraggableIndex:se,newIndex:ie,newDraggableIndex:le},t))}var Jt,Zt,Qt,te,ee,ne,oe,re,ae,ie,se,le,ce,ue,de,me,he,fe,pe,ge,ve,be,ye,we,_e,Te=!1,xe=!1,Se=[],Ee=!1,Ne=!1,Ce=[],De=!1,Oe=[],Ie="undefined"!=typeof document,Pe=bt,Me=pt||ft?"cssFloat":"float",Le=Ie&&!yt&&!bt&&"draggable"in document.createElement("div"),ke=function(){if(Ie){if(ft)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ae=function(t,e){var n=Ot(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=At(t,0,e),a=At(t,1,e),i=r&&Ot(r),s=a&&Ot(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Lt(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Lt(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=o&&"none"===n[Me]||a&&"none"===n[Me]&&l+c>o)?"vertical":"horizontal"},Re=function(t){function e(t,n){return function(o,r,a,i){var s=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,a,i),n)(o,r,a,i);var l=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==ct(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Fe=function(){!ke&&Qt&&Ot(Qt,"display","none")},Be=function(){!ke&&Qt&&Ot(Qt,"display","")};Ie&&!yt&&document.addEventListener("click",(function(t){if(xe)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xe=!1,!1}),!0);var je=function(t){if(Jt){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,a=t.clientY,Se.some((function(t){var e=t[Gt].options.emptyInsertThreshold;if(e&&!Rt(t)){var n=Lt(t),o=r>=n.left-e&&r<=n.right+e,s=a>=n.top-e&&a<=n.bottom+e;return o&&s?i=t:void 0}})),i);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Gt]._onDragOver(n)}}var r,a,i},Xe=function(t){Jt&&Jt.parentNode[Gt]._isOutsideThisEl(t.target)};function Ye(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=dt({},e),t[Gt]=this;var n,o,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ae(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ye.supportPointer&&"PointerEvent"in window&&!vt,emptyInsertThreshold:5};for(var a in Ut.initializePlugins(this,t,r),r)!(a in e)&&(e[a]=r[a]);for(var i in Re(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Le,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?_t(t,"pointerdown",this._onTapStart):(_t(t,"mousedown",this._onTapStart),_t(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(_t(t,"dragover",this),_t(t,"dragenter",this)),Se.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),dt(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Ot(t,"display")&&t!==Ye.ghost){o.push({target:t,rect:Lt(t)});var e=lt({},o[o.length-1].rect);if(t.thisAnimationDuration){var n=It(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var r=!1,a=0;o.forEach((function(t){var n=0,o=t.target,i=o.fromRect,s=Lt(o),l=o.prevFromRect,c=o.prevToRect,u=t.rect,d=It(o,!0);d&&(s.top-=d.f,s.left-=d.e),o.toRect=s,o.thisAnimationDuration&&Xt(l,s)&&!Xt(i,s)&&(u.top-s.top)/(u.left-s.left)==(i.top-s.top)/(i.left-s.left)&&(n=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,l,c,e.options)),Xt(s,i)||(o.prevFromRect=i,o.prevToRect=s,n||(n=e.options.animation),e.animate(o,u,s,n)),n&&(r=!0,a=Math.max(a,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),n),o.thisAnimationDuration=n)})),clearTimeout(n),r?n=setTimeout((function(){"function"==typeof t&&t()}),a):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){if(o){Ot(t,"transition",""),Ot(t,"transform","");var r=It(this.el),a=r&&r.a,i=r&&r.d,s=(e.left-n.left)/(a||1),l=(e.top-n.top)/(i||1);t.animatingX=!!s,t.animatingY=!!l,Ot(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Ot(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Ot(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Ot(t,"transition",""),Ot(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}))}function He(t,e,n,o,r,a,i,s){var l,c,u=t[Gt],d=u.options.onMove;return!window.CustomEvent||ft||pt?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=r||e,l.relatedRect=a||Lt(e),l.willInsertAfter=s,l.originalEvent=i,t.dispatchEvent(l),d&&(c=d.call(u,l,i)),c}function qe(t){t.draggable=!1}function Ge(){De=!1}function We(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function ze(t){return setTimeout(t,0)}function Ue(t){return clearTimeout(t)}Ye.prototype={constructor:Ye,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(be=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Jt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,a=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(i||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){Oe.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&Oe.push(o)}}(n),!Jt&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!vt||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=Et(s,o.draggable,n,!1))&&s.animated||ne===s)){if(ae=Ft(s),se=Ft(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Vt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Kt("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=Et(l,o.trim(),n,!1))return Vt({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),Kt("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!Et(l,o.handle,n,!1)||this._prepareDragStart(t,i,s)}}},_prepareDragStart:function(t,e,n){var o,r=this,a=r.el,i=r.options,s=a.ownerDocument;if(n&&!Jt&&n.parentNode===a){var l=Lt(n);if(te=a,Zt=(Jt=n).parentNode,ee=Jt.nextSibling,ne=n,ce=i.group,Ye.dragged=Jt,de={target:Jt,clientX:(e||t).clientX,clientY:(e||t).clientY},pe=de.clientX-l.left,ge=de.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Jt.style["will-change"]="all",o=function(){Kt("delayEnded",r,{evt:t}),Ye.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!gt&&r.nativeDraggable&&(Jt.draggable=!0),r._triggerDragStart(t,e),Vt({sortable:r,name:"choose",originalEvent:t}),Dt(Jt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){Pt(Jt,t.trim(),qe)})),_t(s,"dragover",je),_t(s,"mousemove",je),_t(s,"touchmove",je),_t(s,"mouseup",r._onDrop),_t(s,"touchend",r._onDrop),_t(s,"touchcancel",r._onDrop),gt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Jt.draggable=!0),Kt("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(pt||ft))o();else{if(Ye.eventCanceled)return void this._onDrop();_t(s,"mouseup",r._disableDelayedDrag),_t(s,"touchend",r._disableDelayedDrag),_t(s,"touchcancel",r._disableDelayedDrag),_t(s,"mousemove",r._delayedDragTouchMoveHandler),_t(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&_t(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,i.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Jt&&qe(Jt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Tt(t,"mouseup",this._disableDelayedDrag),Tt(t,"touchend",this._disableDelayedDrag),Tt(t,"touchcancel",this._disableDelayedDrag),Tt(t,"mousemove",this._delayedDragTouchMoveHandler),Tt(t,"touchmove",this._delayedDragTouchMoveHandler),Tt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?_t(document,"pointermove",this._onTouchMove):_t(document,e?"touchmove":"mousemove",this._onTouchMove):(_t(Jt,"dragend",this),_t(te,"dragstart",this._onDragStart));try{document.selection?ze((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Te=!1,te&&Jt){Kt("dragStarted",this,{evt:e}),this.nativeDraggable&&_t(document,"dragover",Xe);var n=this.options;!t&&Dt(Jt,n.dragClass,!1),Dt(Jt,n.ghostClass,!0),Ye.active=this,t&&this._appendGhost(),Vt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(me){this._lastX=me.clientX,this._lastY=me.clientY,Fe();for(var t=document.elementFromPoint(me.clientX,me.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(me.clientX,me.clientY))!==e;)e=t;if(Jt.parentNode[Gt]._isOutsideThisEl(t),e)do{if(e[Gt]&&e[Gt]._onDragOver({clientX:me.clientX,clientY:me.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Be()}},_onTouchMove:function(t){if(de){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,a=Qt&&It(Qt,!0),i=Qt&&a&&a.a,s=Qt&&a&&a.d,l=Pe&&_e&&Bt(_e),c=(r.clientX-de.clientX+o.x)/(i||1)+(l?l[0]-Ce[0]:0)/(i||1),u=(r.clientY-de.clientY+o.y)/(s||1)+(l?l[1]-Ce[1]:0)/(s||1);if(!Ye.active&&!Te){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,r,this)&&!p.animated){if(p===Jt)return P(!1);if(p&&a===t.target&&(i=p),i&&(n=Lt(i)),!1!==He(te,a,Jt,e,i,n,t,!!i))return I(),p&&p.nextSibling?a.insertBefore(Jt,p.nextSibling):a.appendChild(Jt),Zt=a,M(),P(!0)}else if(p&&function(t,e,n){var o=Lt(At(n.el,0,n.options,!0));return e?t.clientXu+c*a/2:ld-we)return-ye}else if(l>u+c*(1-r)/2&&ld-c*a/2)?l>u+c/2?1:-1:0}(t,i,n,r,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ne,be===i),0!==v){var E=Ft(Jt);do{E-=v,y=Zt.children[E]}while(y&&("none"===Ot(y,"display")||y===Qt))}if(0===v||y===i)return P(!1);be=i,ye=v;var N=i.nextElementSibling,C=!1,D=He(te,a,Jt,e,i,n,t,C=1===v);if(!1!==D)return 1!==D&&-1!==D||(C=1===D),De=!0,setTimeout(Ge,30),I(),C&&!N?a.appendChild(Jt):i.parentNode.insertBefore(Jt,C?N:i),x&&Ht(x,0,S-x.scrollTop),Zt=Jt.parentNode,void 0===b||Ne||(we=Math.abs(b-Lt(i)[T])),M(),P(!0)}if(a.contains(Jt))return P(!1)}return!1}function O(s,l){Kt(s,h,lt({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:m,target:i,completed:P,onMove:function(n,o){return He(te,a,Jt,e,n,Lt(n),t,o)},changed:M},l))}function I(){O("dragOverAnimationCapture"),h.captureAnimationState(),h!==m&&m.captureAnimationState()}function P(e){return O("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==m&&(Dt(Jt,ue?ue.options.ghostClass:c.options.ghostClass,!1),Dt(Jt,s.ghostClass,!0)),ue!==h&&h!==Ye.active?ue=h:h===Ye.active&&ue&&(ue=null),m===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){O("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(i===Jt&&!Jt.animated||i===a&&!i.animated)&&(be=null),s.dragoverBubble||t.rootEl||i===document||(Jt.parentNode[Gt]._isOutsideThisEl(t.target),!e&&je(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function M(){ie=Ft(Jt),le=Ft(Jt,s.draggable),Vt({sortable:h,name:"change",toEl:a,newIndex:ie,newDraggableIndex:le,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Tt(document,"mousemove",this._onTouchMove),Tt(document,"touchmove",this._onTouchMove),Tt(document,"pointermove",this._onTouchMove),Tt(document,"dragover",je),Tt(document,"mousemove",je),Tt(document,"touchmove",je)},_offUpEvents:function(){var t=this.el.ownerDocument;Tt(t,"mouseup",this._onDrop),Tt(t,"touchend",this._onDrop),Tt(t,"pointerup",this._onDrop),Tt(t,"touchcancel",this._onDrop),Tt(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ie=Ft(Jt),le=Ft(Jt,n.draggable),Kt("drop",this,{evt:t}),Zt=Jt&&Jt.parentNode,ie=Ft(Jt),le=Ft(Jt,n.draggable),Ye.eventCanceled||(Te=!1,Ne=!1,Ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ue(this.cloneId),Ue(this._dragStartId),this.nativeDraggable&&(Tt(document,"drop",this),Tt(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),vt&&Ot(document.body,"user-select",""),Ot(Jt,"transform",""),t&&(ve&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Qt&&Qt.parentNode&&Qt.parentNode.removeChild(Qt),(te===Zt||ue&&"clone"!==ue.lastPutMode)&&oe&&oe.parentNode&&oe.parentNode.removeChild(oe),Jt&&(this.nativeDraggable&&Tt(Jt,"dragend",this),qe(Jt),Jt.style["will-change"]="",ve&&!Te&&Dt(Jt,ue?ue.options.ghostClass:this.options.ghostClass,!1),Dt(Jt,this.options.chosenClass,!1),Vt({sortable:this,name:"unchoose",toEl:Zt,newIndex:null,newDraggableIndex:null,originalEvent:t}),te!==Zt?(ie>=0&&(Vt({rootEl:Zt,name:"add",toEl:Zt,fromEl:te,originalEvent:t}),Vt({sortable:this,name:"remove",toEl:Zt,originalEvent:t}),Vt({rootEl:Zt,name:"sort",toEl:Zt,fromEl:te,originalEvent:t}),Vt({sortable:this,name:"sort",toEl:Zt,originalEvent:t})),ue&&ue.save()):ie!==ae&&ie>=0&&(Vt({sortable:this,name:"update",toEl:Zt,originalEvent:t}),Vt({sortable:this,name:"sort",toEl:Zt,originalEvent:t})),Ye.active&&(null!=ie&&-1!==ie||(ie=ae,le=se),Vt({sortable:this,name:"end",toEl:Zt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Kt("nulling",this),te=Jt=Zt=Qt=ee=oe=ne=re=de=me=ve=ie=le=ae=se=be=ye=ue=ce=Ye.dragged=Ye.ghost=Ye.clone=Ye.active=null,Oe.forEach((function(t){t.checked=!0})),Oe.length=he=fe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Jt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,a=this.options;o li").map((function(){return{id:$(this).data("id"),children:$(this).find("li").map((function(){return $(this).data("id")})).get()}})).get();e.forEach((function(t,e){var n=r().store.getById("tags",t.id);n.pushData({attributes:{position:e,isChild:!1},relationships:{parent:null}}),t.children.forEach((function(t,e){r().store.getById("tags",t).pushData({attributes:{position:e,isChild:!0},relationships:{parent:n}})}))})),r().request({url:r().forum.attribute("apiUrl")+"/tags/order",method:"POST",body:{order:e}}),this.forcedRefreshKey++,m.redraw()},e}(dn());function Tn(t,e,n,o,r,a,i){try{var s=t[a](i),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(o,r)}function xn(t){return function(){var e=this,n=arguments;return new Promise((function(o,r){var a=t.apply(e,n);function i(t){Tn(a,o,r,i,s,"next",t)}function s(t){Tn(a,o,r,i,s,"throw",t)}i(void 0)}))}}var Sn=n(507),En=n.n(Sn),Nn=function(){function t(){this.loadedIncludes=void 0}var e=t.prototype;return e.load=function(){var t=xn(En().mark((function t(e){var n,o=this;return En().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=[]),this.loadedIncludes){t.next=3;break}return t.abrupt("return",this.query(e));case 3:if(0!==(n=e.filter((function(t){return!o.loadedIncludes.has(t)}))).length){t.next=6;break}return t.abrupt("return",Promise.resolve(G().store.all("tags")));case 6:return t.abrupt("return",this.query(n));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.query=function(){var t=xn(En().mark((function t(e){var n=this;return En().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),t.abrupt("return",G().store.find("tags",{include:e.join(",")}).then((function(t){return e.forEach((function(t){return n.loadedIncludes.add(t)})),t})));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();const Cn=flarum.core.compat["common/extenders"];var Dn=n.n(Cn);const On=flarum.core.compat["common/utils/computed"];var In=n.n(On);const Pn=flarum.core.compat["common/Model"];var Mn=n.n(Pn),Ln=function(t){function e(){return t.apply(this,arguments)||this}X(e,t);var n=e.prototype;return n.name=function(){return Mn().attribute("name").call(this)},n.slug=function(){return Mn().attribute("slug").call(this)},n.description=function(){return Mn().attribute("description").call(this)},n.color=function(){return Mn().attribute("color").call(this)},n.backgroundUrl=function(){return Mn().attribute("backgroundUrl").call(this)},n.backgroundMode=function(){return Mn().attribute("backgroundMode").call(this)},n.icon=function(){return Mn().attribute("icon").call(this)},n.position=function(){return Mn().attribute("position").call(this)},n.parent=function(){return Mn().hasOne("parent").call(this)},n.children=function(){return Mn().hasMany("children").call(this)},n.defaultSort=function(){return Mn().attribute("defaultSort").call(this)},n.isChild=function(){return Mn().attribute("isChild").call(this)},n.isHidden=function(){return Mn().attribute("isHidden").call(this)},n.discussionCount=function(){return Mn().attribute("discussionCount").call(this)},n.lastPostedAt=function(){return Mn().attribute("lastPostedAt",Mn().transformDate).call(this)},n.lastPostedDiscussion=function(){return Mn().hasOne("lastPostedDiscussion").call(this)},n.isRestricted=function(){return Mn().attribute("isRestricted").call(this)},n.canStartDiscussion=function(){return Mn().attribute("canStartDiscussion").call(this)},n.canAddToDiscussion=function(){return Mn().attribute("canAddToDiscussion").call(this)},n.isPrimary=function(){return In()("position","parent",(function(t,e){return null!==t&&!1===e})).call(this)},e}(Mn());const kn=[(new(Dn().Store)).add("tags",Ln)],An={"tags/utils/sortTags":C,"tags/models/Tag":Ln,"tags/helpers/tagsLabel":at,"tags/helpers/tagIcon":E,"tags/helpers/tagLabel":N,"tags/components/TagSelectionModal":rt,"tags/states/TagListState":Nn},Rn=Object.assign(An,{"tags/addTagsHomePageOption":M,"tags/addTagChangePermission":A,"tags/components/TagsPage":_n,"tags/components/EditTagModal":yn,"tags/addTagPermission":O,"tags/addTagsPermissionScope":D}),Fn=flarum.core;r().initializers.add("flarum-tags",(function(t){t.tagList=new Nn,t.extensionData.for("flarum-tags").registerPage(_n),D(),O(),M(),A(),(0,a.extend)(F().prototype,"customSettingComponents",(function(t){var e=this;t.add("flarum-tags.select-tags",(function(t){return m(it,Object.assign({},t,{settingValue:e.settings[t.setting]}))}))}))})),Object.assign(Fn.compat,Rn)},810:()=>{},440:(t,e,n)=>{var o=n(75).default;function r(){"use strict";t.exports=r=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function m(t,e,n,o){var r=e&&e.prototype instanceof p?e:p,a=Object.create(r.prototype),s=new D(o||[]);return i(a,"_invoke",{value:S(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=m;var f={};function p(){}function g(){}function v(){}var b={};d(b,l,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(O([])));w&&w!==n&&a.call(w,l)&&(b=w);var _=v.prototype=p.prototype=Object.create(b);function T(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(r,i,s,l){var c=h(t[r],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==o(d)&&a.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,l)}),(function(t){n("throw",t,s,l)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,l)}))}l(c.arg)}var r;i(this,"_invoke",{value:function(t,o){function a(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(a,a):a()}})}function S(t,e,n){var o="suspendedStart";return function(r,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw a;return{value:void 0,done:!0}}for(n.method=r,n.arg=a;;){var i=n.delegate;if(i){var s=E(i,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=h(t,e,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var r=o.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function O(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var r=this.tryEntries[o],i=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=a.call(r,"catchLoc"),l=a.call(r,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var r=o.arg;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,e,n)=>{var o=n(440)();t.exports=o;try{regeneratorRuntime=o}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{extend:()=>r.l});var t=n(810),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);n.d(o,e);var r=n(946)})(),module.exports=o})(); +(()=>{var t={488:(t,e,n)=>{"use strict";n.d(e,{l:()=>Fn});const r=flarum.core.compat["admin/app"];var o=n.n(r);const a=flarum.core.compat["common/extend"],i=flarum.core.compat["admin/components/PermissionGrid"];var s=n.n(i);const l=flarum.core.compat["admin/components/PermissionDropdown"];var c=n.n(l);const u=flarum.core.compat["common/components/Dropdown"];var d=n.n(u);const h=flarum.core.compat["common/components/Button"];var f=n.n(h);const p=flarum.core.compat["common/components/LoadingIndicator"];var g=n.n(p);const v=flarum.core.compat["common/utils/extract"];var b=n.n(v);const y=flarum.core.compat["common/components/Link"];var w=n.n(y);const _=flarum.core.compat["common/utils/classList"];var T=n.n(_);const x=flarum.core.compat["common/helpers/textContrastClass"];var S=n.n(x);function E(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=t&&t.icon(),o=n.useColor,a=void 0===o||o;return e.className=T()([e.className,"icon",r?t.icon():"TagIcon"]),t&&a?(e.style=e.style||{},e.style["--color"]=t.color(),r&&(e.style.color=t.color())):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}function N(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=b()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var o=t.color();o&&(e.style["--tag-bg"]=o,e.className=T()(e.className,"colored",S()(o))),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?w():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&E(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},r)))}function C(t){return t.slice(0).sort((function(t,e){var n=t.position(),r=e.position();if(null===n&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===n)return 1;var o=t.parent(),a=e.parent();return o===a?n-r:o&&a?o.position()-a.position():o?o===e?1:o.position()-r:a?a===t?-1:n-a.position():0}))}function D(){(0,a.extend)(s().prototype,"oninit",(function(){this.loading=!0})),(0,a.extend)(s().prototype,"oncreate",(function(){var t=this;o().tagList.load().then((function(){t.loading=!1,m.redraw()}))})),(0,a.override)(s().prototype,"view",(function(t,e){return this.loading?m(g(),null):t(e)})),(0,a.override)(o(),"getRequiredPermissions",(function(t,e){var n=e.match(/^tag\d+\./);return n?t(e.substr(n[0].length)).map((function(t){return n[0]+t})):t(e)})),(0,a.extend)(s().prototype,"scopeItems",(function(t){C(o().store.all("tags")).filter((function(t){return t.isRestricted()})).forEach((function(e){return t.add("tag"+e.id(),{label:N(e),onremove:function(){return e.save({isRestricted:!1})},render:function(t){return"setting"in t?null:"viewForum"===t.permission||"startDiscussion"===t.permission||t.permission.startsWith("discussion.")&&!1!==t.tagScoped||t.tagScoped?m(c(),{permission:"tag"+e.id()+"."+t.permission,allowGuest:t.allowGuest}):null}})}))})),(0,a.extend)(s().prototype,"scopeControlItems",(function(t){var e=C(o().store.all("tags").filter((function(t){return!t.isRestricted()})));e.length&&t.add("tag",m(d(),{className:"Dropdown--restrictByTag",buttonClassName:"Button Button--text",label:o().translator.trans("flarum-tags.admin.permissions.restrict_by_tag_heading"),icon:"fas fa-plus",caretIcon:null},e.map((function(t){return m(f(),{icon:!0,onclick:function(){return t.save({isRestricted:!0})}},[E(t,{className:"Button-icon"})," ",t.name()])}))))}))}function O(){app.extensionData.for("flarum-tags").registerPermission({icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.tag_discussions_label"),permission:"discussion.tag"},"moderate",95).registerPermission({icon:"fas fa-tags",label:app.translator.trans("flarum-tags.admin.permissions.bypass_tag_counts_label"),permission:"bypassTagCounts"},"start",89)}const I=flarum.core.compat["admin/components/BasicsPage"];var P=n.n(I);function M(){(0,a.extend)(P().prototype,"homePageItems",(function(t){t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})}))}const L=flarum.core.compat["admin/components/SettingDropdown"];var k=n.n(L);function A(){(0,a.extend)(s().prototype,"startItems",(function(t){t.add("allowTagChange",{icon:"fas fa-tag",label:o().translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:function(){var t=parseInt(o().data.settings.allow_tag_change,10);return m(k(),{defaultLabel:t?o().translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):o().translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:o().translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:o().translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:o().translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)}))}const R=flarum.core.compat["admin/components/AdminPage"];var F=n.n(R);function B(){return B=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[n]=t[n]);return o}var rt=["className","isToggled"],ot=function(t){function e(){return t.apply(this,arguments)||this}return X(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.isToggled,o=nt(e,rt),a=r?"far fa-check-circle":"far fa-circle";return m(f(),Object.assign({},o,{icon:a,className:T()([n,r&&"Button--toggled"])}),t.children)},e}(H()),at=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;ot.max.primary)throw new Error("The minimum number of primary tags allowed cannot be more than the maximum number of primary tags allowed.");if(t.min.secondary>t.max.secondary)throw new Error("The minimum number of secondary tags allowed cannot be more than the maximum number of secondary tags allowed.");if(t.min.total>t.max.primary+t.max.secondary)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of primary and secondary tags allowed together.");if(t.max.totalt.max.total)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of tags allowed.")}(e.limits)};var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.select.bind(this)).onRemove((function(){return n.selected.splice(n.selected.length-1,1)})),G().tagList.load(["parent"]).then((function(t){n.loading=!1,n.attrs.selectableTags&&(t=n.attrs.selectableTags(t)),n.tags=C(t),n.attrs.selectedTags&&n.attrs.selectedTags.map(n.addTag.bind(n)),n.indexTag=t[0],m.redraw()}))},n.className=function(){return T()("TagSelectionModal",this.attrs.className)},n.title=function(){return this.attrs.title},n.content=function(){var t=this;if(this.loading||!this.tags)return m(g(),null);var e=this.filter().toLowerCase(),n=this.primaryCount(),r=this.secondaryCount(),o=this.getFilteredTags(),a=Math.max(z()(this.getInstruction(n,r)).length,this.filter().length);return[m("div",{className:"Modal-body"},m("div",{className:"TagSelectionModal-form"},m("div",{className:"TagSelectionModal-form-input"},m("div",{className:"TagsInput FormControl "+(this.focused?"focus":""),onclick:function(){return t.$(".TagsInput input").focus()}},m("span",{className:"TagsInput-selected"},this.selected.map((function(e){return m("span",{className:"TagsInput-tag",onclick:function(){t.removeTag(e),t.onready()}},N(e))}))),m("input",{className:"FormControl",placeholder:z()(this.getInstruction(n,r)),bidi:this.filter,style:{width:a+"ch"},onkeydown:this.navigator.navigate.bind(this.navigator),onfocus:function(){return t.focused=!0},onblur:function(){return t.focused=!1}}))),m("div",{className:"TagSelectionModal-form-submit App-primaryControl"},m(f(),{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(n,r),icon:"fas fa-check"},G().translator.trans("flarum-tags.lib.tag_selection_modal.submit_button"))))),m("div",{className:"Modal-footer"},m("ul",{className:"TagSelectionModal-list SelectTagList"},o.map((function(n){return m("li",{"data-index":n.id(),className:T()({pinned:null!==n.position(),child:!!n.parent(),colored:!!n.color(),selected:t.selected.includes(n),active:t.indexTag===n}),style:{color:n.color()},onmouseover:function(){return t.indexTag=n},onclick:t.toggleTag.bind(t,n)},E(n),m("span",{className:"SelectTagListItem-name"},K()(n.name(),e)),n.description()?m("span",{className:"SelectTagListItem-description"},n.description()):"")}))),this.attrs.limits.allowBypassing&&m("div",{className:"TagSelectionModal-controls"},m(ot,{className:"Button",onclick:function(){return t.bypassReqs=!t.bypassReqs},isToggled:this.bypassReqs},G().translator.trans("flarum-tags.lib.tag_selection_modal.bypass_requirements"))))]},n.getFilteredTags=function(){var t=this,e=this.filter().toLowerCase(),n=this.primaryCount(),r=this.secondaryCount(),o=this.tags;return this.attrs.requireParentTag&&(o=o.filter((function(e){var n=e.parent();return null!==n&&(!1===n||t.selected.includes(n))}))),this.bypassReqs||(this.selected.length>=this.attrs.limits.max.total?o=o.filter((function(e){return t.selected.includes(e)})):(n>=this.attrs.limits.max.primary&&(o=o.filter((function(e){return!e.isPrimary()||t.selected.includes(e)}))),r>=this.attrs.limits.max.secondary&&(o=o.filter((function(e){return e.isPrimary()||t.selected.includes(e)}))))),e&&(o=o.filter((function(t){return t.name().toLowerCase().includes(e)}))),this.indexTag&&o.includes(this.indexTag)||(this.indexTag=o[0]),o},n.primaryCount=function(){return this.selected.filter((function(t){return t.isPrimary()})).length},n.secondaryCount=function(){return this.selected.filter((function(t){return!t.isPrimary()})).length},n.meetsRequirements=function(t,e){return!!(this.bypassReqs||this.attrs.allowResetting&&0===this.selected.length)||!(this.selected.length=this.attrs.limits.min.primary&&e>=this.attrs.limits.min.secondary},n.addTag=function(t){if(t&&this.attrs.canSelect(t)){if(this.attrs.onSelect&&this.attrs.onSelect(t,this.selected),this.attrs.requireParentTag){var e=t.parent();e&&!this.selected.includes(e)&&this.selected.push(e)}this.selected.includes(t)||this.selected.push(t)}},n.removeTag=function(t){var e=this.selected.indexOf(t);-1!==e&&(this.selected.splice(e,1),this.attrs.requireParentTag&&this.selected.filter((function(e){return e.parent()===t})).forEach(this.removeTag.bind(this)),this.attrs.onDeselect&&this.attrs.onDeselect(t,this.selected))},n.toggleTag=function(t){this.tags&&(this.selected.includes(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.indexTag=this.tags[0]),this.onready())},n.getInstruction=function(t,e){if(this.bypassReqs)return"";if(t li")},n.getCurrentNumericIndex=function(){return this.indexTag?this.selectableItems().index(this.getItem(this.indexTag)):-1},n.getItem=function(t){return this.selectableItems().filter('[data-index="'+t.id()+'"]')},n.setIndex=function(t,e){var n=this.selectableItems(),r=n.parent();t<0?t=n.length-1:t>=n.length&&(t=0);var o=n.eq(t);if(this.indexTag=G().store.getById("tags",o.attr("data-index")),m.redraw(),e&&this.indexTag){var a,i=r.scrollTop(),s=r.offset().top,l=s+r.outerHeight(),c=o.offset().top,u=c+o.outerHeight();cl&&(a=i-l+u+parseInt(r.css("padding-bottom"),10)),void 0!==a&&r.stop(!0).animate({scrollTop:a},100)}},e}(Q());function it(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function gt(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var vt=gt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),bt=gt(/Edge/i),yt=gt(/firefox/i),wt=gt(/safari/i)&&!gt(/chrome/i)&&!gt(/android/i),_t=gt(/iP(ad|od|hone)/i),Tt=gt(/chrome/i)&>(/android/i),xt={capture:!1,passive:!1};function St(t,e,n){t.addEventListener(e,n,!vt&&xt)}function Et(t,e,n){t.removeEventListener(e,n,!vt&&xt)}function Nt(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Ct(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Dt(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Nt(t,e):Nt(t,e))||r&&t===n)return t;if(t===n)break}while(t=Ct(t))}return null}var Ot,It=/\s+/g;function Pt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(It," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(It," ")}}function Mt(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function Lt(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Mt(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function kt(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,a=r.length;if(n)for(;o=a:o<=a))return r;if(r===At())break;r=Ht(r,!1)}return!1}function Bt(t,e,n,r){for(var o=0,a=0,i=t.children;a2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=pt(n,Jt);Vt.pluginEvent.bind(Ge)(t,e,dt({dragEl:te,parentEl:ee,ghostEl:ne,rootEl:re,nextEl:oe,lastDownEl:ae,cloneEl:ie,cloneHidden:se,dragStarted:we,putSortable:he,activeSortable:Ge.active,originalEvent:r,oldIndex:le,oldDraggableIndex:ue,newIndex:ce,newDraggableIndex:de,hideGhostForTarget:Xe,unhideGhostForTarget:Ye,cloneNowHidden:function(){se=!0},cloneNowShown:function(){se=!1},dispatchSortableEvent:function(t){Qt({sortable:e,name:t,originalEvent:r})}},o))};function Qt(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,a=t.cloneEl,i=t.toEl,s=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,m=t.originalEvent,h=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[Ut]){var p,g=e.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||vt||bt?(p=document.createEvent("Event")).initEvent(r,!0,!0):p=new CustomEvent(r,{bubbles:!0,cancelable:!0}),p.to=i||n,p.from=s||n,p.item=o||n,p.clone=a,p.oldIndex=l,p.newIndex=c,p.oldDraggableIndex=u,p.newDraggableIndex=d,p.originalEvent=m,p.pullMode=h?h.lastPutMode:void 0;var b=dt(dt({},f),Vt.getEventProperties(r,e));for(var y in b)p[y]=b[y];n&&n.dispatchEvent(p),g[v]&&g[v].call(e,p)}}(dt({putSortable:he,cloneEl:ie,targetEl:te,rootEl:re,oldIndex:le,oldDraggableIndex:ue,newIndex:ce,newDraggableIndex:de},t))}var te,ee,ne,re,oe,ae,ie,se,le,ce,ue,de,me,he,fe,pe,ge,ve,be,ye,we,_e,Te,xe,Se,Ee=!1,Ne=!1,Ce=[],De=!1,Oe=!1,Ie=[],Pe=!1,Me=[],Le="undefined"!=typeof document,ke=_t,Ae=bt||vt?"cssFloat":"float",Re=Le&&!Tt&&!_t&&"draggable"in document.createElement("div"),Fe=function(){if(Le){if(vt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Be=function(t,e){var n=Mt(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Bt(t,0,e),a=Bt(t,1,e),i=o&&Mt(o),s=a&&Mt(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Rt(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Rt(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=r&&"none"===n[Ae]||a&&"none"===n[Ae]&&l+c>r)?"vertical":"horizontal"},je=function(t){function e(t,n){return function(r,o,a,i){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,a,i),n)(r,o,a,i);var l=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==mt(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Xe=function(){!Fe&&ne&&Mt(ne,"display","none")},Ye=function(){!Fe&&ne&&Mt(ne,"display","")};Le&&!Tt&&document.addEventListener("click",(function(t){if(Ne)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ne=!1,!1}),!0);var He=function(t){if(te){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,a=t.clientY,Ce.some((function(t){var e=t[Ut].options.emptyInsertThreshold;if(e&&!jt(t)){var n=Rt(t),r=o>=n.left-e&&o<=n.right+e,s=a>=n.top-e&&a<=n.bottom+e;return r&&s?i=t:void 0}})),i);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Ut]._onDragOver(n)}}var o,a,i},qe=function(t){te&&te.parentNode[Ut]._isOutsideThisEl(t.target)};function Ge(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=ft({},e),t[Ut]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Be(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ge.supportPointer&&"PointerEvent"in window&&!wt,emptyInsertThreshold:5};for(var a in Vt.initializePlugins(this,t,o),o)!(a in e)&&(e[a]=o[a]);for(var i in je(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Re,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?St(t,"pointerdown",this._onTapStart):(St(t,"mousedown",this._onTapStart),St(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(St(t,"dragover",this),St(t,"dragenter",this)),Ce.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ft(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Mt(t,"display")&&t!==Ge.ghost){r.push({target:t,rect:Rt(t)});var e=dt({},r[r.length-1].rect);if(t.thisAnimationDuration){var n=Lt(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){r.push(t)},removeAnimationState:function(t){r.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(r,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var o=!1,a=0;r.forEach((function(t){var n=0,r=t.target,i=r.fromRect,s=Rt(r),l=r.prevFromRect,c=r.prevToRect,u=t.rect,d=Lt(r,!0);d&&(s.top-=d.f,s.left-=d.e),r.toRect=s,r.thisAnimationDuration&&qt(l,s)&&!qt(i,s)&&(u.top-s.top)/(u.left-s.left)==(i.top-s.top)/(i.left-s.left)&&(n=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(u,l,c,e.options)),qt(s,i)||(r.prevFromRect=i,r.prevToRect=s,n||(n=e.options.animation),e.animate(r,u,s,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof t&&t()}),a):"function"==typeof t&&t(),r=[]},animate:function(t,e,n,r){if(r){Mt(t,"transition",""),Mt(t,"transform","");var o=Lt(this.el),a=o&&o.a,i=o&&o.d,s=(e.left-n.left)/(a||1),l=(e.top-n.top)/(i||1);t.animatingX=!!s,t.animatingY=!!l,Mt(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Mt(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Mt(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Mt(t,"transition",""),Mt(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}))}function We(t,e,n,r,o,a,i,s){var l,c,u=t[Ut],d=u.options.onMove;return!window.CustomEvent||vt||bt?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=o||e,l.relatedRect=a||Rt(e),l.willInsertAfter=s,l.originalEvent=i,t.dispatchEvent(l),d&&(c=d.call(u,l,i)),c}function ze(t){t.draggable=!1}function Ue(){Pe=!1}function $e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Ke(t){return setTimeout(t,0)}function Ve(t){return clearTimeout(t)}Ge.prototype={constructor:Ge,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(_e=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,te):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,a=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(i||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=r.filter;if(function(t){Me.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&Me.push(r)}}(n),!te&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!wt||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=Dt(s,r.draggable,n,!1))&&s.animated||ae===s)){if(le=Xt(s),ue=Xt(s,r.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Qt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Zt("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=Dt(l,r.trim(),n,!1))return Qt({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Zt("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!Dt(l,r.handle,n,!1)||this._prepareDragStart(t,i,s)}}},_prepareDragStart:function(t,e,n){var r,o=this,a=o.el,i=o.options,s=a.ownerDocument;if(n&&!te&&n.parentNode===a){var l=Rt(n);if(re=a,ee=(te=n).parentNode,oe=te.nextSibling,ae=n,me=i.group,Ge.dragged=te,fe={target:te,clientX:(e||t).clientX,clientY:(e||t).clientY},be=fe.clientX-l.left,ye=fe.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,te.style["will-change"]="all",r=function(){Zt("delayEnded",o,{evt:t}),Ge.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!yt&&o.nativeDraggable&&(te.draggable=!0),o._triggerDragStart(t,e),Qt({sortable:o,name:"choose",originalEvent:t}),Pt(te,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){kt(te,t.trim(),ze)})),St(s,"dragover",He),St(s,"mousemove",He),St(s,"touchmove",He),St(s,"mouseup",o._onDrop),St(s,"touchend",o._onDrop),St(s,"touchcancel",o._onDrop),yt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,te.draggable=!0),Zt("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(bt||vt))r();else{if(Ge.eventCanceled)return void this._onDrop();St(s,"mouseup",o._disableDelayedDrag),St(s,"touchend",o._disableDelayedDrag),St(s,"touchcancel",o._disableDelayedDrag),St(s,"mousemove",o._delayedDragTouchMoveHandler),St(s,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&St(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){te&&ze(te),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Et(t,"mouseup",this._disableDelayedDrag),Et(t,"touchend",this._disableDelayedDrag),Et(t,"touchcancel",this._disableDelayedDrag),Et(t,"mousemove",this._delayedDragTouchMoveHandler),Et(t,"touchmove",this._delayedDragTouchMoveHandler),Et(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?St(document,"pointermove",this._onTouchMove):St(document,e?"touchmove":"mousemove",this._onTouchMove):(St(te,"dragend",this),St(re,"dragstart",this._onDragStart));try{document.selection?Ke((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Ee=!1,re&&te){Zt("dragStarted",this,{evt:e}),this.nativeDraggable&&St(document,"dragover",qe);var n=this.options;!t&&Pt(te,n.dragClass,!1),Pt(te,n.ghostClass,!0),Ge.active=this,t&&this._appendGhost(),Qt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Xe();for(var t=document.elementFromPoint(pe.clientX,pe.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(pe.clientX,pe.clientY))!==e;)e=t;if(te.parentNode[Ut]._isOutsideThisEl(t),e)do{if(e[Ut]&&e[Ut]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Ye()}},_onTouchMove:function(t){if(fe){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=ne&&Lt(ne,!0),i=ne&&a&&a.a,s=ne&&a&&a.d,l=ke&&Se&&Yt(Se),c=(o.clientX-fe.clientX+r.x)/(i||1)+(l?l[0]-Ie[0]:0)/(i||1),u=(o.clientY-fe.clientY+r.y)/(s||1)+(l?l[1]-Ie[1]:0)/(s||1);if(!Ge.active&&!Ee){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+10||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+10}(t,o,this)&&!p.animated){if(p===te)return P(!1);if(p&&a===t.target&&(i=p),i&&(n=Rt(i)),!1!==We(re,a,te,e,i,n,t,!!i))return I(),p&&p.nextSibling?a.insertBefore(te,p.nextSibling):a.appendChild(te),ee=a,M(),P(!0)}else if(p&&function(t,e,n){var r=Rt(Bt(n.el,0,n.options,!0));return e?t.clientXu+c*a/2:ld-xe)return-Te}else if(l>u+c*(1-o)/2&&ld-c*a/2)?l>u+c/2?1:-1:0}(t,i,n,o,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Oe,_e===i),0!==v){var E=Xt(te);do{E-=v,y=ee.children[E]}while(y&&("none"===Mt(y,"display")||y===ne))}if(0===v||y===i)return P(!1);_e=i,Te=v;var N=i.nextElementSibling,C=!1,D=We(re,a,te,e,i,n,t,C=1===v);if(!1!==D)return 1!==D&&-1!==D||(C=1===D),Pe=!0,setTimeout(Ue,30),I(),C&&!N?a.appendChild(te):i.parentNode.insertBefore(te,C?N:i),x&&Wt(x,0,S-x.scrollTop),ee=te.parentNode,void 0===b||Oe||(xe=Math.abs(b-Rt(i)[T])),M(),P(!0)}if(a.contains(te))return P(!1)}return!1}function O(s,l){Zt(s,h,dt({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:d,fromSortable:m,target:i,completed:P,onMove:function(n,r){return We(re,a,te,e,n,Rt(n),t,r)},changed:M},l))}function I(){O("dragOverAnimationCapture"),h.captureAnimationState(),h!==m&&m.captureAnimationState()}function P(e){return O("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==m&&(Pt(te,he?he.options.ghostClass:c.options.ghostClass,!1),Pt(te,s.ghostClass,!0)),he!==h&&h!==Ge.active?he=h:h===Ge.active&&he&&(he=null),m===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){O("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(i===te&&!te.animated||i===a&&!i.animated)&&(_e=null),s.dragoverBubble||t.rootEl||i===document||(te.parentNode[Ut]._isOutsideThisEl(t.target),!e&&He(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function M(){ce=Xt(te),de=Xt(te,s.draggable),Qt({sortable:h,name:"change",toEl:a,newIndex:ce,newDraggableIndex:de,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Et(document,"mousemove",this._onTouchMove),Et(document,"touchmove",this._onTouchMove),Et(document,"pointermove",this._onTouchMove),Et(document,"dragover",He),Et(document,"mousemove",He),Et(document,"touchmove",He)},_offUpEvents:function(){var t=this.el.ownerDocument;Et(t,"mouseup",this._onDrop),Et(t,"touchend",this._onDrop),Et(t,"pointerup",this._onDrop),Et(t,"touchcancel",this._onDrop),Et(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ce=Xt(te),de=Xt(te,n.draggable),Zt("drop",this,{evt:t}),ee=te&&te.parentNode,ce=Xt(te),de=Xt(te,n.draggable),Ge.eventCanceled||(Ee=!1,Oe=!1,De=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ve(this.cloneId),Ve(this._dragStartId),this.nativeDraggable&&(Et(document,"drop",this),Et(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),wt&&Mt(document.body,"user-select",""),Mt(te,"transform",""),t&&(we&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),ne&&ne.parentNode&&ne.parentNode.removeChild(ne),(re===ee||he&&"clone"!==he.lastPutMode)&&ie&&ie.parentNode&&ie.parentNode.removeChild(ie),te&&(this.nativeDraggable&&Et(te,"dragend",this),ze(te),te.style["will-change"]="",we&&!Ee&&Pt(te,he?he.options.ghostClass:this.options.ghostClass,!1),Pt(te,this.options.chosenClass,!1),Qt({sortable:this,name:"unchoose",toEl:ee,newIndex:null,newDraggableIndex:null,originalEvent:t}),re!==ee?(ce>=0&&(Qt({rootEl:ee,name:"add",toEl:ee,fromEl:re,originalEvent:t}),Qt({sortable:this,name:"remove",toEl:ee,originalEvent:t}),Qt({rootEl:ee,name:"sort",toEl:ee,fromEl:re,originalEvent:t}),Qt({sortable:this,name:"sort",toEl:ee,originalEvent:t})),he&&he.save()):ce!==le&&ce>=0&&(Qt({sortable:this,name:"update",toEl:ee,originalEvent:t}),Qt({sortable:this,name:"sort",toEl:ee,originalEvent:t})),Ge.active&&(null!=ce&&-1!==ce||(ce=le,de=ue),Qt({sortable:this,name:"end",toEl:ee,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Zt("nulling",this),re=te=ee=ne=oe=ie=ae=se=fe=pe=we=ce=de=le=ue=_e=Te=he=me=Ge.dragged=Ge.ghost=Ge.clone=Ge.active=null,Me.forEach((function(t){t.checked=!0})),Me.length=ge=ve=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":te&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,a=this.options;r li").map((function(){return{id:$(this).data("id"),children:$(this).find("li").map((function(){return $(this).data("id")})).get()}})).get();e.forEach((function(t,e){var n=o().store.getById("tags",t.id);n.pushData({attributes:{position:e,isChild:!1},relationships:{parent:null}}),t.children.forEach((function(t,e){o().store.getById("tags",t).pushData({attributes:{position:e,isChild:!0},relationships:{parent:n}})}))})),o().request({url:o().forum.attribute("apiUrl")+"/tags/order",method:"POST",body:{order:e}}),this.forcedRefreshKey++,m.redraw()},e}(fn());function En(t,e,n,r,o,a,i){try{var s=t[a](i),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function Nn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){En(a,r,o,i,s,"next",t)}function s(t){En(a,r,o,i,s,"throw",t)}i(void 0)}))}}var Cn=n(507),Dn=n.n(Cn),On=function(){function t(){this.loadedIncludes=void 0}var e=t.prototype;return e.load=function(){var t=Nn(Dn().mark((function t(e){var n,r=this;return Dn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=[]),this.loadedIncludes){t.next=3;break}return t.abrupt("return",this.query(e));case 3:if(0!==(n=e.filter((function(t){return!r.loadedIncludes.has(t)}))).length){t.next=6;break}return t.abrupt("return",Promise.resolve(G().store.all("tags")));case 6:return t.abrupt("return",this.query(n));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.query=function(){var t=Nn(Dn().mark((function t(e){var n=this;return Dn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),t.abrupt("return",G().store.find("tags",{include:e.join(",")}).then((function(t){return e.forEach((function(t){return n.loadedIncludes.add(t)})),t})));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();const In=flarum.core.compat["common/extenders"];var Pn=n.n(In);const Mn=flarum.core.compat["common/utils/computed"];var Ln=n.n(Mn);const kn=flarum.core.compat["common/Model"];var An=n.n(kn),Rn=function(t){function e(){return t.apply(this,arguments)||this}X(e,t);var n=e.prototype;return n.name=function(){return An().attribute("name").call(this)},n.slug=function(){return An().attribute("slug").call(this)},n.description=function(){return An().attribute("description").call(this)},n.color=function(){return An().attribute("color").call(this)},n.backgroundUrl=function(){return An().attribute("backgroundUrl").call(this)},n.backgroundMode=function(){return An().attribute("backgroundMode").call(this)},n.icon=function(){return An().attribute("icon").call(this)},n.position=function(){return An().attribute("position").call(this)},n.parent=function(){return An().hasOne("parent").call(this)},n.children=function(){return An().hasMany("children").call(this)},n.defaultSort=function(){return An().attribute("defaultSort").call(this)},n.isChild=function(){return An().attribute("isChild").call(this)},n.isHidden=function(){return An().attribute("isHidden").call(this)},n.discussionCount=function(){return An().attribute("discussionCount").call(this)},n.lastPostedAt=function(){return An().attribute("lastPostedAt",An().transformDate).call(this)},n.lastPostedDiscussion=function(){return An().hasOne("lastPostedDiscussion").call(this)},n.isRestricted=function(){return An().attribute("isRestricted").call(this)},n.canStartDiscussion=function(){return An().attribute("canStartDiscussion").call(this)},n.canAddToDiscussion=function(){return An().attribute("canAddToDiscussion").call(this)},n.isPrimary=function(){return Ln()("position","parent",(function(t,e){return null!==t&&!1===e})).call(this)},e}(An());const Fn=[(new(Pn().Store)).add("tags",Rn)],Bn={"tags/utils/sortTags":C,"tags/models/Tag":Rn,"tags/helpers/tagsLabel":lt,"tags/helpers/tagIcon":E,"tags/helpers/tagLabel":N,"tags/components/TagSelectionModal":at,"tags/states/TagListState":On},jn=Object.assign(Bn,{"tags/addTagsHomePageOption":M,"tags/addTagChangePermission":A,"tags/components/TagsPage":Sn,"tags/components/EditTagModal":Tn,"tags/addTagPermission":O,"tags/addTagsPermissionScope":D}),Xn=flarum.core;o().initializers.add("flarum-tags",(function(t){t.tagList=new On,t.extensionData.for("flarum-tags").registerPage(Sn),D(),O(),M(),A(),(0,a.extend)(F().prototype,"customSettingComponents",(function(t){var e=this;t.add("flarum-tags.select-tags",(function(t){return m(ct,Object.assign({},t,{settingValue:e.settings[t.setting]}))}))}))})),Object.assign(Xn.compat,jn)},810:()=>{},440:(t,e,n)=>{var r=n(75).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function m(t,e,n,r){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new D(r||[]);return i(a,"_invoke",{value:S(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=m;var f={};function p(){}function g(){}function v(){}var b={};d(b,l,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(O([])));w&&w!==n&&a.call(w,l)&&(b=w);var _=v.prototype=p.prototype=Object.create(b);function T(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,s,l){var c=h(t[o],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==r(d)&&a.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,l)}),(function(t){n("throw",t,s,l)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,l)}))}l(c.arg)}var o;i(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}})}function S(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=E(i,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=h(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=h(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function O(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,e,n)=>{var r=n(440)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{extend:()=>o.l});var t=n(810),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);n.d(r,e);var o=n(488)})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/tags/js/dist/admin.js.map b/extensions/tags/js/dist/admin.js.map index 105c3b52d1..a7147a467d 100644 --- a/extensions/tags/js/dist/admin.js.map +++ b/extensions/tags/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":";0DAAA,MAAM,EAA+BA,OAAOC,KAAKC,OAAO,0BCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,gDCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,oDCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,2CCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,yCCAxD,MAAM,EAA+BF,OAAOC,KAA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":["webpack://@flarum/tags/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/tags/external root \"flarum.core.compat['admin/components/PermissionGrid']\"","webpack://@flarum/tags/external root \"flarum.core.compat['admin/components/PermissionDropdown']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extract']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/textContrastClass']\"","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/admin/addTagsPermissionScope.tsx","webpack://@flarum/tags/./src/admin/addTagPermission.js","webpack://@flarum/tags/external root \"flarum.core.compat['admin/components/BasicsPage']\"","webpack://@flarum/tags/./src/admin/addTagsHomePageOption.js","webpack://@flarum/tags/external root \"flarum.core.compat['admin/components/SettingDropdown']\"","webpack://@flarum/tags/./src/admin/addTagChangePermission.js","webpack://@flarum/tags/external root \"flarum.core.compat['admin/components/AdminPage']\"","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/app']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/KeyboardNavigatable']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/tags/./src/forum/components/ToggleButton.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/tags/./src/common/components/TagSelectionModal.tsx","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/./src/admin/components/SelectTagsSettingComponent.tsx","webpack://@flarum/tags/../../../node_modules/sortablejs/modular/sortable.esm.js","webpack://@flarum/tags/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/withAttr']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/ColorPreviewInput']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/tags/./src/admin/components/EditTagModal.tsx","webpack://@flarum/tags/./src/admin/components/TagsPage.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/./src/admin/compat.js","webpack://@flarum/tags/external assign \"flarum.core\"","webpack://@flarum/tags/./src/admin/index.ts","webpack://@flarum/tags/./src/admin/addTagSelectionSettingComponent.tsx","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object"],"sourcesContent":["const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/PermissionGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/PermissionDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extract'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/textContrastClass'];","import classList from 'flarum/common/utils/classList';\n\nexport default function tagIcon(tag, attrs = {}, settings = {}) {\n const hasIcon = tag && tag.icon();\n const { useColor = true } = settings;\n\n attrs.className = classList([attrs.className, 'icon', hasIcon ? tag.icon() : 'TagIcon']);\n\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n\n if (hasIcon) {\n attrs.style.color = tag.color();\n }\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n\n return hasIcon ? : ;\n}\n","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', { tags: tag.slug() });\n }\n\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return m(\n link ? Link : 'span',\n attrs,\n \n {tag && tag.icon() && tagIcon(tag, { className: 'TagLabel-icon' }, { useColor: false })}\n {tagText}\n \n );\n}\n","import Tag from '../models/Tag';\n\nexport default function sortTags(tags: Tag[]) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null) return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent) return aParent.position()! - bParent.position()!;\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent) return aParent === b ? 1 : aParent.position()! - bPos;\n else if (bParent) return bParent === a ? -1 : aPos - bParent.position()!;\n\n return 0;\n });\n}\n","import app from 'flarum/admin/app';\nimport { extend, override } from 'flarum/common/extend';\nimport PermissionGrid from 'flarum/admin/components/PermissionGrid';\nimport PermissionDropdown from 'flarum/admin/components/PermissionDropdown';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport tagLabel from '../common/helpers/tagLabel';\nimport tagIcon from '../common/helpers/tagIcon';\nimport sortTags from '../common/utils/sortTags';\nimport Tag from '../common/models/Tag';\n\nexport default function () {\n extend(PermissionGrid.prototype, 'oninit', function () {\n this.loading = true;\n });\n\n extend(PermissionGrid.prototype, 'oncreate', function () {\n app.tagList.load().then(() => {\n this.loading = false;\n m.redraw();\n });\n });\n\n override(PermissionGrid.prototype, 'view', function (original, vnode) {\n if (this.loading) {\n return ;\n }\n\n return original(vnode);\n });\n\n override(app, 'getRequiredPermissions', (original, permission) => {\n const tagPrefix = permission.match(/^tag\\d+\\./);\n\n if (tagPrefix) {\n const globalPermission = permission.substr(tagPrefix[0].length);\n\n const required = original(globalPermission);\n\n return required.map((required) => tagPrefix[0] + required);\n }\n\n return original(permission);\n });\n\n extend(PermissionGrid.prototype, 'scopeItems', (items) => {\n sortTags(app.store.all('tags'))\n .filter((tag) => tag.isRestricted())\n .forEach((tag) =>\n items.add('tag' + tag.id(), {\n label: tagLabel(tag),\n onremove: () => tag.save({ isRestricted: false }),\n render: (item) => {\n if ('setting' in item) return '';\n\n if (\n item.permission === 'viewForum' ||\n item.permission === 'startDiscussion' ||\n (item.permission && item.permission.indexOf('discussion.') === 0 && item.tagScoped !== false) ||\n item.tagScoped\n ) {\n return PermissionDropdown.component({\n permission: 'tag' + tag.id() + '.' + item.permission,\n allowGuest: item.allowGuest,\n });\n }\n\n return '';\n },\n })\n );\n });\n\n extend(PermissionGrid.prototype, 'scopeControlItems', (items) => {\n const tags = sortTags(app.store.all('tags').filter((tag) => !tag.isRestricted()));\n\n if (tags.length) {\n items.add(\n 'tag',\n \n {tags.map((tag) => (\n \n ))}\n \n );\n }\n });\n}\n","export default function () {\n app.extensionData\n .for('flarum-tags')\n .registerPermission(\n {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),\n permission: 'discussion.tag',\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-tags',\n label: app.translator.trans('flarum-tags.admin.permissions.bypass_tag_counts_label'),\n permission: 'bypassTagCounts',\n },\n 'start',\n 89\n );\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/BasicsPage'];","import { extend } from 'flarum/common/extend';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\n\nexport default function () {\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\n items.add('tags', {\n path: '/tags',\n label: app.translator.trans('flarum-tags.admin.basics.tags_label'),\n });\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/SettingDropdown'];","import { extend } from 'flarum/common/extend';\nimport PermissionGrid from 'flarum/admin/components/PermissionGrid';\nimport SettingDropdown from 'flarum/admin/components/SettingDropdown';\n\nexport default function () {\n extend(PermissionGrid.prototype, 'startItems', (items) => {\n items.add(\n 'allowTagChange',\n {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.allow_edit_tags_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_tag_change, 10);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', { count: minutes })\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'allow_tag_change',\n options: [\n { value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button') },\n { value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button') },\n { value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button') },\n ],\n });\n },\n },\n 90\n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/AdminPage'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/highlight'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/KeyboardNavigatable'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * @TODO move to core\n */\nexport default class ToggleButton extends Component {\n view(vnode) {\n const { className, isToggled, ...attrs } = this.attrs;\n const icon = isToggled ? 'far fa-check-circle' : 'far fa-circle';\n\n return (\n \n );\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import app from 'flarum/common/app';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport highlight from 'flarum/common/helpers/highlight';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Modal from 'flarum/common/components/Modal';\nimport Stream from 'flarum/common/utils/Stream';\n\nimport sortTags from '../utils/sortTags';\nimport tagLabel from '../helpers/tagLabel';\nimport tagIcon from '../helpers/tagIcon';\nimport ToggleButton from '../../forum/components/ToggleButton';\n\nimport type Tag from '../models/Tag';\nimport type { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport type Mithril from 'mithril';\n\nexport interface ITagSelectionModalLimits {\n /** Whether to allow bypassing the limits set here. This will show a toggle button to bypass limits. */\n allowBypassing?: boolean;\n /** Maximum number of primary/secondary tags allowed. */\n max?: {\n total?: number;\n primary?: number;\n secondary?: number;\n };\n /** Minimum number of primary/secondary tags to be selected. */\n min?: {\n total?: number;\n primary?: number;\n secondary?: number;\n };\n}\n\nexport interface ITagSelectionModalAttrs extends IInternalModalAttrs {\n /** Custom modal className to use. */\n className?: string;\n /** Modal title, defaults to 'Choose Tags'. */\n title?: string;\n /** Initial tag selection value. */\n selectedTags?: Tag[];\n /** Limits set based on minimum and maximum number of primary/secondary tags that can be selected. */\n limits?: ITagSelectionModalLimits;\n /** Whether to allow resetting the value. Defaults to true. */\n allowResetting?: boolean;\n /** Whether to require the parent tag of a selected tag to be selected as well. */\n requireParentTag?: boolean;\n /** Filter tags that can be selected. */\n selectableTags?: (tags: Tag[]) => Tag[];\n /** Whether a tag can be selected. */\n canSelect: (tag: Tag) => boolean;\n /** Callback for when a tag is selected. */\n onSelect?: (tag: Tag, selected: Tag[]) => void;\n /** Callback for when a tag is deselected. */\n onDeselect?: (tag: Tag, selected: Tag[]) => void;\n /** Callback for when the selection is submitted. */\n onsubmit?: (selected: Tag[]) => void;\n}\n\nexport type ITagSelectionModalState = undefined;\n\nexport default class TagSelectionModal<\n CustomAttrs extends ITagSelectionModalAttrs = ITagSelectionModalAttrs,\n CustomState extends ITagSelectionModalState = ITagSelectionModalState\n> extends Modal {\n protected loading = true;\n protected tags!: Tag[];\n protected selected: Tag[] = [];\n protected bypassReqs: boolean = false;\n\n protected filter = Stream('');\n protected focused = false;\n protected navigator = new KeyboardNavigatable();\n protected indexTag?: Tag;\n\n static initAttrs(attrs: ITagSelectionModalAttrs) {\n super.initAttrs(attrs);\n\n // Default values for optional attributes.\n attrs.title ||= extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.title'));\n attrs.canSelect ||= () => true;\n attrs.allowResetting ??= true;\n attrs.limits = {\n min: {\n total: attrs.limits?.min?.total ?? -Infinity,\n primary: attrs.limits?.min?.primary ?? -Infinity,\n secondary: attrs.limits?.min?.secondary ?? -Infinity,\n },\n max: {\n total: attrs.limits?.max?.total ?? Infinity,\n primary: attrs.limits?.max?.primary ?? Infinity,\n secondary: attrs.limits?.max?.secondary ?? Infinity,\n },\n };\n\n // Prevent illogical limits from being provided.\n catchInvalidLimits(attrs.limits);\n }\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.navigator\n .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n .onSelect(this.select.bind(this))\n .onRemove(() => this.selected.splice(this.selected.length - 1, 1));\n\n app.tagList.load(['parent']).then((tags) => {\n this.loading = false;\n\n if (this.attrs.selectableTags) {\n tags = this.attrs.selectableTags(tags);\n }\n\n this.tags = sortTags(tags);\n\n if (this.attrs.selectedTags) {\n this.attrs.selectedTags.map(this.addTag.bind(this));\n }\n\n this.indexTag = tags[0];\n\n m.redraw();\n });\n }\n\n className() {\n return classList('TagSelectionModal', this.attrs.className);\n }\n\n title() {\n return this.attrs.title;\n }\n\n content() {\n if (this.loading || !this.tags) {\n return ;\n }\n\n const filter = this.filter().toLowerCase();\n const primaryCount = this.primaryCount();\n const secondaryCount = this.secondaryCount();\n const tags = this.getFilteredTags();\n\n const inputWidth = Math.max(extractText(this.getInstruction(primaryCount, secondaryCount)).length, this.filter().length);\n\n return [\n
          \n
          \n
          \n
          this.$('.TagsInput input').focus()}>\n \n {this.selected.map((tag) => (\n {\n this.removeTag(tag);\n this.onready();\n }}\n >\n {tagLabel(tag)}\n \n ))}\n \n (this.focused = true)}\n onblur={() => (this.focused = false)}\n />\n
          \n
          \n
          \n \n {app.translator.trans('flarum-tags.lib.tag_selection_modal.submit_button')}\n \n
          \n
          \n
          ,\n\n
          \n
            \n {tags.map((tag) => (\n (this.indexTag = tag)}\n onclick={this.toggleTag.bind(this, tag)}\n >\n {tagIcon(tag)}\n {highlight(tag.name(), filter)}\n {tag.description() ? {tag.description()} : ''}\n \n ))}\n
          \n {this.attrs.limits!.allowBypassing && (\n
          \n (this.bypassReqs = !this.bypassReqs)} isToggled={this.bypassReqs}>\n {app.translator.trans('flarum-tags.lib.tag_selection_modal.bypass_requirements')}\n \n
          \n )}\n
          ,\n ];\n }\n\n /**\n * Filters the available tags on every state change.\n */\n private getFilteredTags(): Tag[] {\n const filter = this.filter().toLowerCase();\n const primaryCount = this.primaryCount();\n const secondaryCount = this.secondaryCount();\n let tags = this.tags;\n\n if (this.attrs.requireParentTag) {\n // Filter out all child tags whose parents have not been selected. This\n // makes it impossible to select a child if its parent hasn't been selected.\n tags = tags.filter((tag) => {\n const parent = tag.parent();\n return parent !== null && (parent === false || this.selected.includes(parent));\n });\n }\n\n if (!this.bypassReqs) {\n // If we reached the total maximum number of tags, we can't select anymore.\n if (this.selected.length >= this.attrs.limits!.max!.total!) {\n tags = tags.filter((tag) => this.selected.includes(tag));\n }\n // If the number of selected primary/secondary tags is at the maximum, then\n // we'll filter out all other tags of that type.\n else {\n if (primaryCount >= this.attrs.limits!.max!.primary!) {\n tags = tags.filter((tag) => !tag.isPrimary() || this.selected.includes(tag));\n }\n if (secondaryCount >= this.attrs.limits!.max!.secondary!) {\n tags = tags.filter((tag) => tag.isPrimary() || this.selected.includes(tag));\n }\n }\n }\n\n // If the user has entered text in the filter input, then filter by tags\n // whose name matches what they've entered.\n if (filter) {\n tags = tags.filter((tag) => tag.name().toLowerCase().includes(filter));\n }\n\n if (!this.indexTag || !tags.includes(this.indexTag)) this.indexTag = tags[0];\n\n return tags;\n }\n\n /**\n * Counts the number of selected primary tags.\n */\n protected primaryCount(): number {\n return this.selected.filter((tag) => tag.isPrimary()).length;\n }\n\n /**\n * Counts the number of selected secondary tags.\n */\n protected secondaryCount(): number {\n return this.selected.filter((tag) => !tag.isPrimary()).length;\n }\n\n /**\n * Validates the number of selected primary/secondary tags against the set min max limits.\n */\n protected meetsRequirements(primaryCount: number, secondaryCount: number) {\n if (this.bypassReqs || (this.attrs.allowResetting && this.selected.length === 0)) {\n return true;\n }\n\n if (this.selected.length < this.attrs.limits!.min!.total!) {\n return false;\n }\n\n return primaryCount >= this.attrs.limits!.min!.primary! && secondaryCount >= this.attrs.limits!.min!.secondary!;\n }\n\n /**\n * Add the given tag to the list of selected tags.\n */\n protected addTag(tag: Tag | undefined) {\n if (!tag || !this.attrs.canSelect(tag)) return;\n\n if (this.attrs.onSelect) {\n this.attrs.onSelect(tag, this.selected);\n }\n\n // If this tag has a parent, we'll also need to add the parent tag to the\n // selected list if it's not already in there.\n if (this.attrs.requireParentTag) {\n const parent = tag.parent();\n if (parent && !this.selected.includes(parent)) {\n this.selected.push(parent);\n }\n }\n\n if (!this.selected.includes(tag)) {\n this.selected.push(tag);\n }\n }\n\n /**\n * Remove the given tag from the list of selected tags.\n */\n protected removeTag(tag: Tag) {\n const index = this.selected.indexOf(tag);\n\n if (index !== -1) {\n this.selected.splice(index, 1);\n\n // Look through the list of selected tags for any tags which have the tag\n // we just removed as their parent. We'll need to remove them too.\n if (this.attrs.requireParentTag) {\n this.selected.filter((t) => t.parent() === tag).forEach(this.removeTag.bind(this));\n }\n\n if (this.attrs.onDeselect) {\n this.attrs.onDeselect(tag, this.selected);\n }\n }\n }\n\n protected toggleTag(tag: Tag) {\n // Won't happen, needed for type safety.\n if (!this.tags) return;\n\n if (this.selected.includes(tag)) {\n this.removeTag(tag);\n } else {\n this.addTag(tag);\n }\n\n if (this.filter()) {\n this.filter('');\n this.indexTag = this.tags[0];\n }\n\n this.onready();\n }\n\n /**\n * Gives human text instructions based on the current number of selected tags and set limits.\n */\n protected getInstruction(primaryCount: number, secondaryCount: number) {\n if (this.bypassReqs) {\n return '';\n }\n\n if (primaryCount < this.attrs.limits!.min!.primary!) {\n const remaining = this.attrs.limits!.min!.primary! - primaryCount;\n return extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.choose_primary_placeholder', { count: remaining }));\n } else if (secondaryCount < this.attrs.limits!.min!.secondary!) {\n const remaining = this.attrs.limits!.min!.secondary! - secondaryCount;\n return extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.choose_secondary_placeholder', { count: remaining }));\n } else if (this.selected.length < this.attrs.limits!.min!.total!) {\n const remaining = this.attrs.limits!.min!.total! - this.selected.length;\n return extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.choose_tags_placeholder', { count: remaining }));\n }\n\n return '';\n }\n\n /**\n * Submit tag selection.\n */\n onsubmit(e: SubmitEvent) {\n e.preventDefault();\n\n if (this.attrs.onsubmit) this.attrs.onsubmit(this.selected);\n\n this.hide();\n }\n\n protected select(e: KeyboardEvent) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || (this.indexTag && this.selected.includes(this.indexTag))) {\n if (this.selected.length) {\n // The DOM submit method doesn't emit a `submit event, so we\n // simulate a manual submission so our `onsubmit` logic is run.\n this.$('button[type=\"submit\"]').click();\n }\n } else if (this.indexTag) {\n this.getItem(this.indexTag)[0].dispatchEvent(new Event('click'));\n }\n }\n\n protected selectableItems() {\n return this.$('.TagSelectionModal-list > li');\n }\n\n protected getCurrentNumericIndex() {\n if (!this.indexTag) return -1;\n\n return this.selectableItems().index(this.getItem(this.indexTag));\n }\n\n protected getItem(selectedTag: Tag) {\n return this.selectableItems().filter(`[data-index=\"${selectedTag.id()}\"]`);\n }\n\n protected setIndex(index: number, scrollToItem: boolean) {\n const $items = this.selectableItems();\n const $dropdown = $items.parent();\n\n if (index < 0) {\n index = $items.length - 1;\n } else if (index >= $items.length) {\n index = 0;\n }\n\n const $item = $items.eq(index);\n\n this.indexTag = app.store.getById('tags', $item.attr('data-index')!);\n\n m.redraw();\n\n if (scrollToItem && this.indexTag) {\n const dropdownScroll = $dropdown.scrollTop()!;\n const dropdownTop = $dropdown.offset()!.top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n const itemTop = $item.offset()!.top;\n const itemBottom = itemTop + $item.outerHeight()!;\n\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({ scrollTop }, 100);\n }\n }\n }\n}\n\n/**\n * Catch invalid limits provided to the tag selection modal.\n */\nfunction catchInvalidLimits(limits: ITagSelectionModalLimits) {\n if (limits.min!.primary! > limits.max!.primary!) {\n throw new Error('The minimum number of primary tags allowed cannot be more than the maximum number of primary tags allowed.');\n }\n\n if (limits.min!.secondary! > limits.max!.secondary!) {\n throw new Error('The minimum number of secondary tags allowed cannot be more than the maximum number of secondary tags allowed.');\n }\n\n if (limits.min!.total! > limits.max!.primary! + limits.max!.secondary!) {\n throw new Error('The minimum number of tags allowed cannot be more than the maximum number of primary and secondary tags allowed together.');\n }\n\n if (limits.max!.total! < limits.min!.primary! + limits.min!.secondary!) {\n throw new Error('The maximum number of tags allowed cannot be less than the minimum number of primary and secondary tags allowed together.');\n }\n\n if (limits.min!.total! > limits.max!.total!) {\n throw new Error('The minimum number of tags allowed cannot be more than the maximum number of tags allowed.');\n }\n}\n","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach((tag) => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, { link }));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children};\n}\n","import app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport TagSelectionModal from '../../common/components/TagSelectionModal';\nimport tagsLabel from '../../common/helpers/tagsLabel';\n\nimport type { CommonSettingsItemOptions } from 'flarum/admin/components/AdminPage';\nimport type Stream from 'flarum/common/utils/Stream';\nimport type { ITagSelectionModalAttrs } from '../../common/components/TagSelectionModal';\nimport type Tag from '../../common/models/Tag';\n\nexport interface SelectTagsSettingComponentOptions extends CommonSettingsItemOptions {\n type: 'flarum-tags.select-tags';\n options?: ITagSelectionModalAttrs;\n}\n\nexport interface SelectTagsSettingComponentAttrs extends SelectTagsSettingComponentOptions {\n settingValue: Stream;\n}\n\nexport default class SelectTagsSettingComponent<\n CustomAttrs extends SelectTagsSettingComponentAttrs = SelectTagsSettingComponentAttrs\n> extends Component {\n protected tags: Tag[] = [];\n protected loaded = false;\n\n view() {\n const value = JSON.parse(this.attrs.settingValue() || '[]');\n\n if (!this.loaded) {\n app.tagList.load(['parent']).then((tags) => {\n this.tags = tags.filter((tag) => value.includes(tag.id()));\n this.loaded = true;\n m.redraw();\n });\n }\n\n return (\n
          \n \n {this.attrs.help &&

          {this.attrs.help}

          }\n {!this.loaded ? (\n \n ) : (\n \n app.modal.show(TagSelectionModal, {\n selectedTags: this.tags,\n onsubmit: (tags: Tag[]) => {\n this.tags = tags;\n this.attrs.settingValue(JSON.stringify(tags.map((tag) => tag.id())));\n },\n ...this.attrs.options,\n })\n }\n >\n {!!this.tags.length ? (\n tagsLabel(this.tags)\n ) : (\n {app.translator.trans('flarum-tags.admin.settings.button_text')}\n )}\n \n )}\n
          \n );\n }\n}\n","/**!\n * Sortable 1.15.0\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n\n } while (container = container.parentNode);\n }\n }\n\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\n\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\n\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n } // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n\n\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\n\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\n\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\n\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\n\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n}(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n},\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n},\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n},\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n } // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n\n\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n\n this._onDragStart(evt, true);\n }\n\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver(\n /**Event*/\n evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n\n if (_silent) return;\n\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n } // if there is a last element, it is the target\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n\n if (firstChild === dragEl) {\n return completed(false);\n }\n\n target = firstChild;\n targetRect = getRect(target);\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\n }\n }\n\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\n\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal; // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var spacer = 10;\n return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n\n invert = invert || invertSwap;\n\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n\n return 0;\n}\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\n\n\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\n\n\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n }\n\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\n\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n\n dataTransfer.setData('Text', data);\n }\n };\n }\n\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n\n sortable._hideClone();\n\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n sortable.captureAnimationState();\n\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n folding = false; // Do not \"unfold\" after around dragEl if reverted\n\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n\n\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n\n multiDragIndex++;\n }); // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\n }\n });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\n\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/ColorPreviewInput'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","import app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport ColorPreviewInput from 'flarum/common/components/ColorPreviewInput';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { slug } from 'flarum/common/utils/string';\nimport Stream from 'flarum/common/utils/Stream';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport type Mithril from 'mithril';\nimport type Tag from '../../common/models/Tag';\nimport extractText from 'flarum/common/utils/extractText';\nimport { ModelIdentifier } from 'flarum/common/Model';\n\nexport interface EditTagModalAttrs extends IInternalModalAttrs {\n primary?: boolean;\n model?: Tag;\n}\n\n/**\n * The `EditTagModal` component shows a modal dialog which allows the user\n * to create or edit a tag.\n */\nexport default class EditTagModal extends Modal {\n tag!: Tag;\n\n name!: Stream;\n slug!: Stream;\n description!: Stream;\n color!: Stream;\n icon!: Stream;\n isHidden!: Stream;\n primary!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.tag = this.attrs.model || app.store.createRecord('tags');\n\n this.name = Stream(this.tag.name() || '');\n this.slug = Stream(this.tag.slug() || '');\n this.description = Stream(this.tag.description() || '');\n this.color = Stream(this.tag.color() || '');\n this.icon = Stream(this.tag.icon() || '');\n this.isHidden = Stream(this.tag.isHidden() || false);\n this.primary = Stream(this.attrs.primary || false);\n }\n\n className() {\n return 'EditTagModal Modal--small';\n }\n\n title() {\n return this.name()\n ? tagLabel(app.store.createRecord('tags', { attributes: this.submitData() }))\n : app.translator.trans('flarum-tags.admin.edit_tag.title');\n }\n\n content() {\n return (\n
          \n
          {this.fields().toArray()}
          \n
          \n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'name',\n
          \n \n {\n const target = e.target as HTMLInputElement;\n this.name(target.value);\n this.slug(slug(target.value));\n }}\n />\n
          ,\n 50\n );\n\n items.add(\n 'slug',\n
          \n \n \n
          ,\n 40\n );\n\n items.add(\n 'description',\n
          \n \n ",v.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="",v.option=!!ht.lastChild;var bt={thead:[1,"","
          "],col:[2,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],_default:[0,"",""]};function Dt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&k(t,e)?C.merge([t],n):n}function wt(t,e){for(var n=0,r=t.length;n",""]);var xt=/<|&#?\w+;/;function Et(t,e,n,r,i){for(var o,a,s,u,l,c,d=e.createDocumentFragment(),f=[],p=0,h=t.length;p-1)i&&i.push(o);else if(l=st(o),a=Dt(d.appendChild(o),"script"),l&&wt(a),n)for(c=0;o=a[c++];)yt.test(o.type||"")&&n.push(o);return d}var Ct=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function Nt(){return!1}function Ft(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function Tt(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)Tt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Nt;else if(!i)return t;return 1===o&&(a=i,i=function(t){return C().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=C.guid++)),t.each((function(){C.event.add(this,e,i,r,n)}))}function _t(t,e,n){n?(Q.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),Q.set(this,e,o),r=n(this,e),this[e](),o!==(i=Q.get(this,e))||r?Q.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Q.set(this,e,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&C.event.add(t,e,At)}C.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,d,f,p,h,m,v=Q.get(t);if(X(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&C.find.matchesSelector(at,i),n.guid||(n.guid=C.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(M)||[""]).length;l--;)p=m=(s=Ct.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=C.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=C.event.special[p]||{},c=C.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&C.expr.match.needsContext.test(i),namespace:h.join(".")},o),(f=u[p])||((f=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),C.event.global[p]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,c,d,f,p,h,m,v=Q.hasData(t)&&Q.get(t);if(v&&(u=v.events)){for(l=(e=(e||"").match(M)||[""]).length;l--;)if(p=m=(s=Ct.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=C.event.special[p]||{},f=u[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(t,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(t,h,v.handle)||C.removeEvent(t,p,v.handle),delete u[p])}else for(p in u)C.event.remove(t,p+e[l],n,r,!0);C.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=C.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=C.event.special[u.type]||{};for(s[0]=u,e=1;e=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:C.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function Pt(t,e){return k(t,"table")&&k(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function Ot(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function jt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function It(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(Q.hasData(t)&&(s=Q.get(t).events))for(i in Q.remove(e,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof h&&!v.checkClone&&St.test(h))return t.each((function(i){var o=t.eq(i);m&&(e[0]=h.call(this,i,o.html())),Mt(o,e,n,r)}));if(f&&(o=(i=Et(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=C.map(Dt(i,"script"),Ot)).length;d0&&wt(a,!u&&Dt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=C.event.special,o=0;void 0!==(n=t[o]);o++)if(X(n)){if(e=n[Q.expando]){if(e.events)for(r in e.events)i[r]?C.event.remove(n,r):C.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),C.fn.extend({detach:function(t){return $t(this,t,!0)},remove:function(t){return $t(this,t)},text:function(t){return W(this,(function(t){return void 0===t?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Mt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pt(this,t).appendChild(t)}))},prepend:function(){return Mt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Pt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Mt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Mt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(Dt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return C.clone(this,t,e)}))},html:function(t){return W(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!kt.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function re(t,e,n){var r=qt(t),i=(!v.boxSizingReliable()||n)&&"border-box"===C.css(t,"boxSizing",!1,r),o=i,a=Gt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Rt.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&k(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===C.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===C.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ne(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Gt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=K(e),u=Ht.test(e),l=t.style;if(u||(e=Jt(s)),a=C.cssHooks[e]||C.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:l[e];"string"==(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=ct(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(C.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,a,s=K(e);return Ht.test(e)||(e=Jt(s)),(a=C.cssHooks[e]||C.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Gt(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),C.each(["height","width"],(function(t,e){C.cssHooks[e]={get:function(t,n,r){if(n)return!Qt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):Ut(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=qt(t),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===C.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),ee(0,n,u)}}})),C.cssHooks.marginLeft=Vt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Gt(t,"marginLeft"))||t.getBoundingClientRect().left-Ut(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(t,e){C.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(C.cssHooks[t+e].set=ee)})),C.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=qt(t),i=e.length;a1)}}),C.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[Jt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(C.fx=ie.prototype.init).step={};var oe,ae,se=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){ae&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,C.fx.interval),C.fx.tick())}function ce(){return r.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function fe(t,e,n){for(var r,i=(pe.tweeners[e]||[]).concat(pe.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(t){return this.each((function(){C.removeAttr(this,t)}))}}),C.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?C.prop(t,e,n):(1===o&&C.isXMLDoc(t)||(i=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?he:void 0)),void 0!==n?null===n?void C.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=C.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&k(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(M);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),he={set:function(t,e,n){return!1===e?C.removeAttr(t,n):t.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||C.find.attr;me[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=me[a],me[a]=i,i=null!=n(t,e,r)?a:null,me[a]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ye(t){return(t.match(M)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function De(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(M)||[]}C.fn.extend({prop:function(t,e){return W(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[C.propFix[t]||t]}))}}),C.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,i=C.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(t){var e,n,r,i,o,a;return g(t)?this.each((function(e){C(this).addClass(t.call(this,e,be(this)))})):(e=De(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o-1;)n=n.replace(" "+i+" "," ");a=ye(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return g(t)?this.each((function(n){C(this).toggleClass(t.call(this,n,be(this),e),e)})):"boolean"==typeof e&&s?e?this.addClass(t):this.removeClass(t):(n=De(t),this.each((function(){if(s)for(o=C(this),i=0;i-1)return!0;return!1}});var we=/\r/g;C.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=g(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,C(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=C.map(i,(function(t){return null==t?"":t+""}))),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=C.valHooks[i.type]||C.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(we,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:ye(C.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},v.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ee=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,n,i){var o,a,s,u,l,c,d,f,h=[n||b],m=p.call(t,"type")?t.type:t,v=p.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!xe.test(m+C.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[C.expando]?t:new C.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:C.makeArray(e,[t]),d=C.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,e))){if(!i&&!d.noBubble&&!y(n)){for(u=d.delegateType||m,xe.test(u+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)f=a,t.type=o>1?u:d.bindType||m,(c=(Q.get(a,"events")||Object.create(null))[t.type]&&Q.get(a,"handle"))&&c.apply(a,e),(c=l&&a[l])&&c.apply&&X(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),e)||!X(n)||l&&g(n[m])&&!y(n)&&((s=n[l])&&(n[l]=null),C.event.triggered=m,t.isPropagationStopped()&&f.addEventListener(m,Ee),n[m](),t.isPropagationStopped()&&f.removeEventListener(m,Ee),C.event.triggered=void 0,s&&(n[l]=s)),t.result}},simulate:function(t,e,n){var r=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(r,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each((function(){C.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return C.event.trigger(t,e,n,!0)}}),v.focusin||C.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){C.event.simulate(e,t.target,C.event.fix(t))};C.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e);i||r.addEventListener(t,n,!0),Q.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e)-1;i?Q.access(r,e,i):(r.removeEventListener(t,n,!0),Q.remove(r,e))}}}));var Ce=r.location,Ae={guid:Date.now()},Ne=/\?/;C.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||C.error("Invalid XML: "+(n?C.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Fe=/\[\]$/,Te=/\r?\n/g,_e=/^(?:submit|button|image|reset|file)$/i,ke=/^(?:input|select|textarea|keygen)/i;function Se(t,e,n,r){var i;if(Array.isArray(e))C.each(e,(function(e,i){n||Fe.test(t)?r(t,i):Se(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==x(e))r(t,e);else for(i in e)Se(t+"["+i+"]",e[i],n,r)}C.param=function(t,e){var n,r=[],i=function(t,e){var n=g(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,(function(){i(this.name,this.value)}));else for(n in t)Se(n,t[n],e,i);return r.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&ke.test(this.nodeName)&&!_e.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(t){return{name:e.name,value:t.replace(Te,"\r\n")}})):{name:e.name,value:n.replace(Te,"\r\n")}})).get()}});var Be=/%20/g,Pe=/#.*$/,Oe=/([?&])_=[^&]*/,je=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:GET|HEAD)$/,Le=/^\/\//,Me={},$e={},Re="*/".concat("*"),He=b.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(M)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ue(t,e,n,r){var i={},o=t===$e;function a(s){var u;return i[s]=!0,C.each(t[s]||[],(function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function ze(t,e){var n,r,i=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&C.extend(!0,t,r),t}He.href=Ce.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ce.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ce.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,C.ajaxSettings),e):ze(C.ajaxSettings,t)},ajaxPrefilter:qe(Me),ajaxTransport:qe($e),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,a,s,u,l,c,d,f,p=C.ajaxSetup({},e=e||{}),h=p.context||p,m=p.context&&(h.nodeType||h.jquery)?C(h):C.event,v=C.Deferred(),g=C.Callbacks("once memory"),y=p.statusCode||{},D={},w={},x="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=je.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,D[t]=e),this},overrideMimeType:function(t){return null==l&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)E.always(t[E.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),A(0,e),this}};if(v.promise(E),p.url=((t||p.url||Ce.href)+"").replace(Le,Ce.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(M)||[""],null==p.crossDomain){u=b.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=He.protocol+"//"+He.host!=u.protocol+"//"+u.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=C.param(p.data,p.traditional)),Ue(Me,p,e,E),l)return E;for(d in(c=C.event&&p.global)&&0==C.active++&&C.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ie.test(p.type),i=p.url.replace(Pe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Be,"+")):(f=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Ne.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Oe,"$1"),f=(Ne.test(i)?"&":"?")+"_="+Ae.guid+++f),p.url=i+f),p.ifModified&&(C.lastModified[i]&&E.setRequestHeader("If-Modified-Since",C.lastModified[i]),C.etag[i]&&E.setRequestHeader("If-None-Match",C.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Re+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(h,E,p)||l))return E.abort();if(x="abort",g.add(p.complete),E.done(p.success),E.fail(p.error),n=Ue($e,p,e,E)){if(E.readyState=1,c&&m.trigger("ajaxSend",[E,p]),l)return E;p.async&&p.timeout>0&&(s=r.setTimeout((function(){E.abort("timeout")}),p.timeout));try{l=!1,n.send(D,A)}catch(t){if(l)throw t;A(-1,t)}}else A(-1,"No Transport");function A(t,e,a,u){var d,f,b,D,w,x=e;l||(l=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",E.readyState=t>0?4:0,d=t>=200&&t<300||304===t,a&&(D=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,E,a)),!d&&C.inArray("script",p.dataTypes)>-1&&C.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),D=function(t,e,n,r){var i,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(p,D,E,d),d?(p.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(C.lastModified[i]=w),(w=E.getResponseHeader("etag"))&&(C.etag[i]=w)),204===t||"HEAD"===p.type?x="nocontent":304===t?x="notmodified":(x=D.state,f=D.data,d=!(b=D.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),E.status=t,E.statusText=(e||x)+"",d?v.resolveWith(h,[f,x,E]):v.rejectWith(h,[E,x,b]),E.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[E,p,d?f:b]),g.fireWith(h,[E,x]),c&&(m.trigger("ajaxComplete",[E,p]),--C.active||C.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return C.get(t,e,n,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],(function(t,e){C[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:i,data:n,success:r},C.isPlainObject(t)&&t))}})),C.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),C._evalUrl=function(t,e,n){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,n)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){C(this).wrapInner(t.call(this,e))})):this.each((function(){var e=C(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){C(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Ge=C.ajaxSettings.xhr();v.cors=!!Ge&&"withCredentials"in Ge,v.ajax=Ge=!!Ge,C.ajaxTransport((function(t){var e,n;if(v.cors||Ge&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(We[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),C.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),C.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=C("
          ').append(range.cloneContents());\n\n // Replace emoji images with their shortcode (found in alt attribute)\n clone.find('img.emoji').replaceWith(function () {\n return this.alt;\n });\n\n // Replace all other images with a Markdown image\n clone.find('img').replaceWith(function () {\n return `![](${this.src})`;\n });\n\n // Replace all links with a Markdown link\n clone.find('a').replaceWith(function () {\n return `[${this.innerText}](${this.href})`;\n });\n\n return clone.text();\n }\n }\n return '';\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditorButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/KeyboardNavigatable'];","import Fragment from 'flarum/common/Fragment';\n\nexport default class AutocompleteDropdown extends Fragment {\n items = [];\n active = false;\n index = 0;\n keyWasJustPressed = false;\n\n view() {\n return (\n
            \n {this.items.map((item) => (\n
          • {item}
          • \n ))}\n
          \n );\n }\n\n show(left, top) {\n this.$()\n .show()\n .css({\n left: left + 'px',\n top: top + 'px',\n });\n this.active = true;\n }\n\n hide() {\n this.$().hide();\n this.active = false;\n }\n\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => (this.keyWasJustPressed = false), 500);\n }\n\n complete() {\n this.$('li').eq(this.index).find('button').click();\n }\n\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n\n const $dropdown = this.$();\n const $items = $dropdown.find('li');\n let rangedIndex = index;\n\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n\n this.index = rangedIndex;\n\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({ scrollTop }, 100);\n }\n }\n }\n}\n","import type MentionableModel from '../MentionableModel';\nimport type Model from 'flarum/common/Model';\n\nexport default abstract class MentionFormat {\n protected instances?: MentionableModel[];\n\n public makeMentionables(): MentionableModel[] {\n return this.instances ?? (this.instances = this.mentionables.map((Mentionable) => new Mentionable(this)));\n }\n\n public getMentionable(type: string): MentionableModel | null {\n return this.makeMentionables().find((mentionable) => mentionable.type() === type) ?? null;\n }\n\n public extend(mentionable: new (...args: any[]) => MentionableModel): void {\n if (!this.extendable) throw new Error('This mention format does not allow extending.');\n\n this.mentionables.push(mentionable);\n }\n\n abstract mentionables: (new (...args: any[]) => MentionableModel)[];\n\n protected abstract extendable: boolean;\n\n abstract trigger(): string;\n\n /**\n * Picks the term to search in the API from the typed text.\n * @example:\n * * Full text = `Hello @\"John D`\n * * Typed text = `\"John D`\n * * Query = `John D`\n */\n abstract queryFromTyped(typed: string): string | null;\n\n abstract format(...args: any): string;\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/highlight'];","import type Mithril from 'mithril';\nimport type Model from 'flarum/common/Model';\nimport type MentionFormat from './formats/MentionFormat';\n\nexport default abstract class MentionableModel {\n public format: Format;\n\n public constructor(format: Format) {\n this.format = format;\n }\n\n abstract type(): string;\n abstract initialResults(): M[];\n abstract search(typed: string): Promise;\n abstract replacement(model: M): string;\n abstract suggestion(model: M, typed: string): Mithril.Children;\n abstract matches(model: M, typed: string): boolean;\n abstract maxStoreMatchedResults(): number | null;\n abstract enabled(): boolean;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import app from 'flarum/forum/app';\nimport extractText from 'flarum/common/utils/extractText';\n\n/**\n * Whether to use the old mentions format.\n *\n * `'@username'` or `'@\"Display name\"'`\n */\nexport const shouldUseOldFormat = () => app.forum.attribute('allowUsernameMentionFormat') || false;\n\nconst getDeletedUserText = () => extractText(app.translator.trans('core.lib.username.deleted_text'));\n\n/**\n * Fetches a user's username or display name.\n *\n * Chooses based on the format option set in the admin settings page.\n *\n * @param user An instance of the User model to fetch the username for\n * @param useDisplayName If `true`, uses `user.displayName()`, otherwise, uses `user.username()`\n */\nexport default function getCleanDisplayName(user, useDisplayName = true) {\n if (!user) return getDeletedUserText().replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n\n const text = (useDisplayName ? user.displayName() : user.username()) || getDeletedUserText();\n\n return text.replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport type User from 'flarum/common/models/User';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport avatar from 'flarum/common/helpers/avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nimport getCleanDisplayName, { shouldUseOldFormat } from '../utils/getCleanDisplayName';\nimport AtMentionFormat from './formats/AtMentionFormat';\n\nexport default class UserMention extends MentionableModel {\n type(): string {\n return 'user';\n }\n\n initialResults(): User[] {\n return Array.from(app.store.all('users'));\n }\n\n /**\n * Automatically determines which mention syntax to be used based on the option in the\n * admin dashboard. Also performs display name clean-up automatically.\n *\n * @\"Display name\"#UserID or `@username`\n *\n * @example New display name syntax\n * // '@\"user\"#1'\n * forUser(User) // User is ID 1, display name is 'User'\n *\n * @example Using old syntax\n * // '@username'\n * forUser(user) // User's username is 'username'\n */\n public replacement(user: User): string {\n if (shouldUseOldFormat()) {\n const cleanText = getCleanDisplayName(user, false);\n return this.format.format(cleanText);\n }\n\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, '', user.id());\n }\n\n suggestion(model: User, typed: string): Mithril.Children {\n const username = usernameHelper(model);\n\n if (typed) {\n username.children = [highlight((username.text ?? '') as string, typed)];\n delete username.text;\n }\n\n return (\n <>\n {avatar(model)}\n {username}\n \n );\n }\n\n matches(model: User, typed: string): boolean {\n if (!typed) return false;\n\n const names = [model.username(), model.displayName()];\n\n return names.some((name) => name.toLowerCase().substr(0, typed.length) === typed);\n }\n\n maxStoreMatchedResults(): null {\n return null;\n }\n\n async search(typed: string): Promise {\n return await app.store.find('users', { filter: { q: typed }, page: { limit: 5 } });\n }\n\n enabled(): boolean {\n return true;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ReplyComposer'];","import app from 'flarum/forum/app';\nimport MentionableModel from './MentionableModel';\nimport type Post from 'flarum/common/models/Post';\nimport type Mithril from 'mithril';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport avatar from 'flarum/common/helpers/avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport { truncate } from 'flarum/common/utils/string';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\nimport EditPostComposer from 'flarum/forum/components/EditPostComposer';\nimport getCleanDisplayName from '../utils/getCleanDisplayName';\nimport type AtMentionFormat from './formats/AtMentionFormat';\n\nexport default class PostMention extends MentionableModel {\n type(): string {\n return 'post';\n }\n\n /**\n * If the user is replying to a discussion, or if they are editing a\n * post, then we can suggest other posts in the discussion to mention.\n * We will add the 5 most recent comments in the discussion which\n * match any username characters that have been typed.\n */\n initialResults(): Post[] {\n if (!app.composer.bodyMatches(ReplyComposer) && !app.composer.bodyMatches(EditPostComposer)) {\n return [];\n }\n\n // @ts-ignore\n const composerAttrs = app.composer.body.attrs;\n const composerPost = composerAttrs.post;\n const discussion = (composerPost && composerPost.discussion()) || composerAttrs.discussion;\n\n return (\n discussion\n .posts()\n // Filter to only comment posts, and replies before this message\n .filter((post: Post) => post && post.contentType() === 'comment' && (!composerPost || post.number() < composerPost.number()))\n // Sort by new to old\n .sort((a: Post, b: Post) => b.createdAt().getTime() - a.createdAt().getTime())\n );\n }\n\n /**\n * Generates the syntax for mentioning of a post. Also cleans up the display name.\n *\n * @example Post mention\n * // '@\"User\"#p13'\n * // @\"Display name\"#pPostID\n * forPostMention(user, 13) // User display name is 'User', post ID is 13\n */\n public replacement(post: Post): string {\n const user = post.user();\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, 'p', post.id());\n }\n\n suggestion(model: Post, typed: string): Mithril.Children {\n const user = model.user() || null;\n const username = usernameHelper(user);\n\n if (typed) {\n username.children = [highlight((username.text ?? '') as string, typed)];\n delete username.text;\n }\n\n return (\n <>\n {avatar(user)}\n {username}\n {[\n app.translator.trans('flarum-mentions.forum.composer.reply_to_post_text', { number: model.number() }),\n ' โ€” ',\n truncate(model.contentPlain() ?? '', 200),\n ]}\n \n );\n }\n\n matches(model: Post, typed: string): boolean {\n const user = model.user();\n const userMentionable = app.mentionFormats.mentionable('user')!;\n\n return !typed || (user && userMentionable.matches(user, typed));\n }\n\n maxStoreMatchedResults(): number {\n return 5;\n }\n\n /**\n * Post mention suggestions are only offered from current discussion posts.\n */\n search(typed: string): Promise {\n return Promise.resolve([]);\n }\n\n enabled(): boolean {\n return true;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Group'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","import app from 'flarum/forum/app';\nimport Group from 'flarum/common/models/Group';\nimport MentionableModel from './MentionableModel';\nimport type Mithril from 'mithril';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nimport type AtMentionFormat from './formats/AtMentionFormat';\n\nexport default class GroupMention extends MentionableModel {\n type(): string {\n return 'group';\n }\n\n initialResults(): Group[] {\n return Array.from(\n app.store.all('groups').filter((g: Group) => {\n return g.id() !== Group.GUEST_ID && g.id() !== Group.MEMBER_ID;\n })\n );\n }\n\n /**\n * Generates the mention syntax for a group mention.\n *\n * @\"Name Plural\"#gGroupID\n *\n * @example Group mention\n * // '@\"Mods\"#g4'\n * forGroup(group) // Group display name is 'Mods', group ID is 4\n */\n public replacement(group: Group): string {\n return this.format.format(group.namePlural(), 'g', group.id());\n }\n\n suggestion(model: Group, typed: string): Mithril.Children {\n let groupName: Mithril.Children = model.namePlural();\n\n if (typed) {\n groupName = highlight(groupName, typed);\n }\n\n return (\n <>\n \n {groupName}\n \n );\n }\n\n matches(model: Group, typed: string): boolean {\n if (!typed) return false;\n\n const names = [model.namePlural().toLowerCase(), model.nameSingular().toLowerCase()];\n\n return names.some((name) => name.toLowerCase().substr(0, typed.length) === typed);\n }\n\n maxStoreMatchedResults(): null {\n return null;\n }\n\n /**\n * All groups are already loaded, so we don't need to search for them.\n */\n search(typed: string): Promise {\n return Promise.resolve([]);\n }\n\n enabled(): boolean {\n return app.session?.user?.canMentionGroups() ?? false;\n }\n}\n","import MentionFormat from './MentionFormat';\nimport type MentionableModel from '../MentionableModel';\nimport UserMention from '../UserMention';\nimport PostMention from '../PostMention';\nimport GroupMention from '../GroupMention';\n\nexport default class AtMentionFormat extends MentionFormat {\n public mentionables: (new (...args: any[]) => MentionableModel)[] = [UserMention, PostMention, GroupMention];\n protected extendable: boolean = true;\n\n public trigger(): string {\n return '@';\n }\n\n public queryFromTyped(typed: string): string | null {\n const matchTyped = typed.match(/^[\"โ€œ]?((?:(?!\"#).)+)$/);\n\n return matchTyped ? matchTyped[1] : null;\n }\n\n public format(name: string, char: string | null = '', id: string | null = null): string {\n return {\n simple: `@${name}`,\n safe: `@\"${name}\"#${char}${id}`,\n }[id ? 'safe' : 'simple'];\n }\n}\n","import app from 'flarum/forum/app';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nimport type Tag from 'flarum/tags/common/models/Tag';\nimport type Mithril from 'mithril';\nimport MentionableModel from './MentionableModel';\nimport type HashMentionFormat from './formats/HashMentionFormat';\n\nexport default class TagMention extends MentionableModel {\n type(): string {\n return 'tag';\n }\n\n initialResults(): Tag[] {\n return Array.from(app.store.all('tags'));\n }\n\n /**\n * Generates the mention syntax for a tag mention.\n *\n * ~tagSlug\n *\n * @example Tag mention\n * // ~general\n * forTag(tag) // Tag display name is 'Tag', tag ID is 5\n */\n public replacement(tag: Tag): string {\n return this.format.format(tag.slug());\n }\n\n matches(model: Tag, typed: string): boolean {\n if (!typed) return false;\n\n const names = [model.name().toLowerCase()];\n\n return names.some((name) => name.toLowerCase().substr(0, typed.length) === typed);\n }\n\n maxStoreMatchedResults(): null {\n return null;\n }\n\n async search(typed: string): Promise {\n return await app.store.find('tags', { filter: { q: typed }, page: { limit: 5 } });\n }\n\n suggestion(model: Tag, typed: string): Mithril.Children {\n let tagName: Mithril.Children = model.name();\n\n if (typed) {\n tagName = highlight(tagName, typed);\n }\n\n return (\n <>\n \n {tagName}\n \n );\n }\n\n enabled(): boolean {\n return 'flarum-tags' in flarum.extensions;\n }\n}\n","import MentionFormat from './MentionFormat';\nimport MentionableModel from '../MentionableModel';\nimport TagMention from '../TagMention';\n\nexport default class HashMentionFormat extends MentionFormat {\n public mentionables: (new (...args: any[]) => MentionableModel)[] = [TagMention];\n protected extendable: boolean = false;\n\n public trigger(): string {\n return '#';\n }\n\n public queryFromTyped(typed: string): string | null {\n const matchTyped = typed.match(/^[-_\\p{L}\\p{N}\\p{M}]+$/giu);\n\n return matchTyped ? matchTyped[0] : null;\n }\n\n public format(slug: string): string {\n return `#${slug}`;\n }\n}\n","import AtMentionFormat from './AtMentionFormat';\nimport HashMentionFormat from './HashMentionFormat';\nimport type MentionFormat from './MentionFormat';\nimport MentionableModel from '../MentionableModel';\n\nexport default class MentionFormats {\n protected formats: MentionFormat[] = [new AtMentionFormat(), new HashMentionFormat()];\n\n public get(symbol: string): MentionFormat | null {\n return this.formats.find((f) => f.trigger() === symbol) ?? null;\n }\n\n public mentionable(type: string): MentionableModel | null {\n for (const format of this.formats) {\n const mentionable = format.getMentionable(type);\n\n if (mentionable) return mentionable;\n }\n\n return null;\n }\n\n public extend(format: new () => MentionFormat) {\n this.formats.push(new format());\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import Component from 'flarum/common/Component';\nimport type { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nimport type MentionableModel from '../mentionables/MentionableModel';\nimport type Mithril from 'mithril';\n\nexport interface IMentionsDropdownItemAttrs extends ComponentAttrs {\n mentionable: MentionableModel;\n onclick: () => void;\n onmouseenter: () => void;\n}\n\nexport default class MentionsDropdownItem extends Component {\n view(vnode: Mithril.Vnode): Mithril.Children {\n const { mentionable, ...attrs } = this.attrs;\n\n const className = classList('MentionsDropdownItem', 'PostPreview', `MentionsDropdown-${mentionable.type()}`);\n\n return (\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/throttleDebounce'];","import type MentionableModel from './MentionableModel';\nimport type Model from 'flarum/common/Model';\nimport type Mithril from 'mithril';\nimport MentionsDropdownItem from '../components/MentionsDropdownItem';\nimport { throttle } from 'flarum/common/utils/throttleDebounce';\n\nexport default class MentionableModels {\n protected mentionables?: MentionableModel[];\n /**\n * We store models returned from an API here to preserve order in which they are returned\n * This prevents the list jumping around while models are returned.\n * We also use a hashmap for model IDs to provide O(1) lookup for the users already in the list.\n */\n private results: Record> = {};\n public typed: string | null = null;\n private searched: string[] = [];\n private dropdownItemAttrs: Record = {};\n\n constructor(dropdownItemAttrs: Record) {\n this.dropdownItemAttrs = dropdownItemAttrs;\n }\n\n public init(mentionables: MentionableModel[]): void {\n this.typed = null;\n this.mentionables = mentionables;\n\n for (const mentionable of this.mentionables) {\n this.results[mentionable.type()] = new Map(mentionable.initialResults().map((result) => [result.id() as string, result]));\n }\n }\n\n /**\n * Don't send API calls searching for models until at least 2 characters have been typed.\n * This focuses the mention results on models already loaded.\n */\n public readonly search = throttle(250, async (): Promise => {\n if (!this.typed || this.typed.length <= 1) return;\n\n const typedLower = this.typed.toLowerCase();\n\n if (this.searched.includes(typedLower)) return;\n\n for (const mentionable of this.mentionables!) {\n for (const model of await mentionable.search(typedLower)) {\n if (!this.results[mentionable.type()].has(model.id() as string)) {\n this.results[mentionable.type()].set(model.id() as string, model);\n }\n }\n }\n\n this.searched.push(typedLower);\n\n return Promise.resolve();\n });\n\n public matches(mentionable: MentionableModel, model: Model): boolean {\n return mentionable.matches(model, this.typed?.toLowerCase() || '');\n }\n\n public makeSuggestion(mentionable: MentionableModel, model: Model): Mithril.Children {\n const content = mentionable.suggestion(model, this.typed!);\n const replacement = mentionable.replacement(model);\n\n const { onclick, ...attrs } = this.dropdownItemAttrs;\n\n return (\n onclick(replacement)} {...attrs}>\n {content}\n \n );\n }\n\n public buildSuggestions(): Mithril.Children {\n const suggestions: Mithril.Children = [];\n\n for (const mentionable of this.mentionables!) {\n if (!mentionable.enabled()) continue;\n\n let matches = Array.from(this.results[mentionable.type()].values()).filter((model) => this.matches(mentionable, model));\n\n const max = mentionable.maxStoreMatchedResults();\n if (max) matches = matches.splice(0, max);\n\n for (const model of matches) {\n const dropdownItem = this.makeSuggestion(mentionable, model);\n suggestions.push(dropdownItem);\n }\n }\n\n return suggestions;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default class PostMentionedNotification extends Notification {\n icon() {\n return 'fas fa-reply';\n }\n\n href() {\n const notification = this.attrs.notification;\n const post = notification.subject();\n const content = notification.content();\n\n return app.route.discussion(post.discussion(), content && content.replyNumber);\n }\n\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n\n return app.translator.trans('flarum-mentions.forum.notifications.post_mentioned_text', { user, count: 1 });\n }\n\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain() || '', 200);\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default class UserMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n\n href() {\n const post = this.attrs.notification.subject();\n\n return app.route.discussion(post.discussion(), post.number());\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n\n return app.translator.trans('flarum-mentions.forum.notifications.user_mentioned_text', { user });\n }\n\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default class GroupMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n\n href() {\n const post = this.attrs.notification.subject();\n\n return app.route.discussion(post.discussion(), post.number());\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n\n return app.translator.trans('flarum-mentions.forum.notifications.group_mentioned_text', { user });\n }\n\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostsUserPage'];","import app from 'flarum/forum/app';\nimport PostsUserPage from 'flarum/forum/components/PostsUserPage';\n\n/**\n * The `MentionsUserPage` component shows post which user Mentioned at\n */\nexport default class MentionsUserPage extends PostsUserPage {\n /**\n * Load a new page of the user's activity feed.\n *\n * @param {Integer} [offset] The position to start getting results from.\n * @return {Promise}\n * @protected\n */\n loadResults(offset) {\n return app.store.find('posts', {\n filter: {\n type: 'comment',\n mentioned: this.user.id(),\n },\n page: { offset, limit: this.loadLimit },\n sort: '-createdAt',\n });\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport MentionsUserPage from './components/MentionsUserPage';\n\nexport default [\n new Extend.Routes() //\n .add('user.mentions', '/u/:username/mentions', MentionsUserPage),\n\n new Extend.Model(Post) //\n .hasMany('mentionedBy')\n .attribute('mentionedByCount'),\n\n new Extend.Model(User) //\n .attribute('canMentionGroups'),\n];\n","import app from 'flarum/forum/app';\nimport username from 'flarum/common/helpers/username';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport function filterUserMentions(tag) {\n let user;\n\n if (app.forum.attribute('allowUsernameMentionFormat') && tag.hasAttribute('username'))\n user = app.store.getBy('users', 'username', tag.getAttribute('username'));\n else if (tag.hasAttribute('id')) user = app.store.getById('users', tag.getAttribute('id'));\n\n if (user) {\n tag.setAttribute('id', user.id());\n tag.setAttribute('slug', user.slug());\n tag.setAttribute('displayname', extractText(username(user)));\n\n return true;\n }\n\n tag.invalidate();\n}\n\nexport function postFilterUserMentions(tag) {\n tag.setAttribute('deleted', false);\n}\n\nexport function filterPostMentions(tag) {\n const post = app.store.getById('posts', tag.getAttribute('id'));\n\n if (post) {\n tag.setAttribute('discussionid', post.discussion().id());\n tag.setAttribute('number', post.number());\n tag.setAttribute('displayname', extractText(username(post.user())));\n\n return true;\n }\n}\n\nexport function postFilterPostMentions(tag) {\n tag.setAttribute('deleted', false);\n}\n\nexport function filterGroupMentions(tag) {\n if (app.session?.user?.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n\n if (group) {\n tag.setAttribute('groupname', extractText(group.namePlural()));\n\n return true;\n }\n }\n\n tag.invalidate();\n}\n\nexport function postFilterGroupMentions(tag) {\n if (app.session?.user?.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n\n tag.setAttribute('color', group.color());\n tag.setAttribute('icon', group.icon());\n tag.setAttribute('deleted', false);\n }\n}\n\nexport function filterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n\n if (model) {\n tag.setAttribute('id', model.id());\n tag.setAttribute('tagname', model.name());\n\n return true;\n }\n }\n\n tag.invalidate();\n}\n\nexport function postFilterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n\n tag.setAttribute('icon', model.icon());\n tag.setAttribute('color', model.color());\n tag.setAttribute('deleted', false);\n }\n}\n","import GroupMentionedNotification from './components/GroupMentionedNotification';\nimport MentionsUserPage from './components/MentionsUserPage';\nimport PostMentionedNotification from './components/PostMentionedNotification';\nimport UserMentionedNotification from './components/UserMentionedNotification';\nimport AutocompleteDropdown from './fragments/AutocompleteDropdown';\nimport PostQuoteButton from './fragments/PostQuoteButton';\nimport getCleanDisplayName from './utils/getCleanDisplayName';\nimport getMentionText from './utils/getMentionText';\nimport * as reply from './utils/reply';\nimport selectedText from './utils/selectedText';\nimport * as textFormatter from './utils/textFormatter';\nimport MentionableModel from './mentionables/MentionableModel';\nimport MentionFormat from './mentionables/formats/MentionFormat';\nimport Mentionables from './extenders/Mentionables';\n\nexport default {\n 'mentions/components/MentionsUserPage': MentionsUserPage,\n 'mentions/components/PostMentionedNotification': PostMentionedNotification,\n 'mentions/components/UserMentionedNotification': UserMentionedNotification,\n 'mentions/components/GroupMentionedNotification': GroupMentionedNotification,\n 'mentions/fragments/AutocompleteDropdown': AutocompleteDropdown,\n 'mentions/fragments/PostQuoteButton': PostQuoteButton,\n 'mentions/utils/getCleanDisplayName': getCleanDisplayName,\n 'mentions/utils/getMentionText': getMentionText,\n 'mentions/utils/reply': reply,\n 'mentions/utils/selectedText': selectedText,\n 'mentions/utils/textFormatter': textFormatter,\n 'mentions/mentionables/MentionableModel': MentionableModel,\n 'mentions/mentionables/formats/MentionFormat': MentionFormat,\n 'mentions/extenders/Mentionables': Mentionables,\n};\n","import app from 'flarum/forum/app';\n\n/**\n * Fetches the mention text for a specified user (and optionally a post ID for replies or group).\n *\n * Automatically determines which mention syntax to be used based on the option in the\n * admin dashboard. Also performs display name clean-up automatically.\n *\n * @deprecated Use `app.mentionables.get('user').replacement(user)` instead. Will be removed in 2.0.\n */\nexport default function getMentionText(user, postId, group) {\n if (user !== undefined && postId === undefined) {\n return app.mentionables.get('user').replacement(user);\n } else if (user !== undefined && postId !== undefined) {\n return app.mentionables.get('post').replacement(app.store.getById('posts', postId));\n } else if (group !== undefined) {\n return app.mentionables.get('group').replacement(group);\n }\n\n throw 'No parameters were passed';\n}\n","import type ForumApplication from 'flarum/forum/ForumApplication';\nimport type IExtender from 'flarum/common/extenders/IExtender';\nimport type MentionableModel from '../mentionables/MentionableModel';\nimport type MentionFormat from '../mentionables/formats/MentionFormat';\n\nexport default class Mentionables implements IExtender {\n protected formats: (new () => MentionFormat)[] = [];\n protected mentionables: Record MentionableModel)[]> = {};\n\n /**\n * Register a new mention format.\n * Must extend MentionFormat and have a unique unused trigger symbol.\n */\n format(format: new () => MentionFormat): this {\n this.formats.push(format);\n\n return this;\n }\n\n /**\n * Register a new mentionable model to a mention format.\n * Only works if the format has already been registered,\n * and the format allows using multiple mentionables.\n *\n * @param symbol The trigger symbol of the format to extend (ex: @).\n * @param mentionable The mentionable instance to register.\n * Must extend MentionableModel.\n */\n mentionable(symbol: string, mentionable: new () => MentionableModel): this {\n if (!this.mentionables[symbol]) {\n this.mentionables[symbol] = [];\n }\n\n this.mentionables[symbol].push(mentionable);\n\n return this;\n }\n\n extend(app: ForumApplication): void {\n for (const format of this.formats) {\n app.mentionFormats.extend(format);\n }\n\n for (const symbol in this.mentionables) {\n const format = app.mentionFormats.get(symbol);\n\n if (!format) continue;\n\n for (const mentionable of this.mentionables[symbol]) {\n format.extend(mentionable);\n }\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport Post from 'flarum/forum/components/Post';\n\nimport addPostMentionPreviews from './addPostMentionPreviews';\nimport addMentionedByList from './addMentionedByList';\nimport addPostReplyAction from './addPostReplyAction';\nimport addPostQuoteButton from './addPostQuoteButton';\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport PostMentionedNotification from './components/PostMentionedNotification';\nimport UserMentionedNotification from './components/UserMentionedNotification';\nimport GroupMentionedNotification from './components/GroupMentionedNotification';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-mentions', function () {\n // For every mention of a post inside a post's content, set up a hover handler\n // that shows a preview of the mentioned post.\n addPostMentionPreviews();\n\n // In the footer of each post, show information about who has replied (i.e.\n // who the post has been mentioned by).\n addMentionedByList();\n\n // Add a 'reply' control to the footer of each post. When clicked, it will\n // open up the composer and add a post mention to its contents.\n addPostReplyAction();\n\n // Show a Quote button when Post text is selected\n addPostQuoteButton();\n\n // After typing '@' in the composer, show a dropdown suggesting a bunch of\n // posts or users that the user could mention.\n addComposerAutocomplete();\n\n app.notificationComponents.postMentioned = PostMentionedNotification;\n app.notificationComponents.userMentioned = UserMentionedNotification;\n app.notificationComponents.groupMentioned = GroupMentionedNotification;\n\n // Add notification preferences.\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('postMentioned', {\n name: 'postMentioned',\n icon: 'fas fa-reply',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_post_mentioned_label'),\n });\n\n items.add('userMentioned', {\n name: 'userMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_user_mentioned_label'),\n });\n\n items.add('groupMentioned', {\n name: 'groupMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_group_mentioned_label'),\n });\n });\n\n // Add mentions tab in user profile\n extend(UserPage.prototype, 'navItems', function (items) {\n const user = this.user;\n items.add(\n 'mentions',\n LinkButton.component(\n {\n href: app.route('user.mentions', { username: user.slug() }),\n name: 'mentions',\n icon: 'fas fa-at',\n },\n app.translator.trans('flarum-mentions.forum.user.mentions_link')\n ),\n 80\n );\n });\n\n // Remove post mentions when rendering post previews.\n getPlainContent.removeSelectors.push('a.PostMention');\n\n // Apply color contrast fix on group mentions.\n extend(Post.prototype, 'oncreate', function () {\n this.$('.GroupMention--colored, .TagMention--colored').each(function () {\n this.classList.add(textContrastClass(getComputedStyle(this).getPropertyValue('--color')));\n });\n });\n});\n\nexport * from './utils/textFormatter';\n\n// Expose compat API\nimport mentionsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, mentionsCompat);\n","import { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default function addPostMentionPreviews() {\n function addPreviews() {\n const contentHtml = this.attrs.post.contentHtml();\n\n if (contentHtml === this.oldPostContentHtml || this.isEditing()) return;\n\n this.oldPostContentHtml = contentHtml;\n\n const parentPost = this.attrs.post;\n const $parentPost = this.$();\n\n this.$().on(\n 'click',\n '.UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)',\n function (e) {\n m.route.set(this.getAttribute('href'));\n e.preventDefault();\n }\n );\n\n this.$('.PostMention:not(.PostMention--deleted)').each(function () {\n const $this = $(this);\n const id = $this.data('id');\n let timeout;\n\n // Wrap the mention link in a wrapper element so that we can insert a\n // preview popup as its sibling and relatively position it.\n const $preview = $('