{ "version": 3, "sources": ["img:assets/cal.svg", "img:assets/hand-circle.svg", "src/helpers.imba"], "sourcesContent": ["import {asset} from 'imba';\nimport url from './cal.svg';\nexport default asset({\n\turl: url,\n\ttype: 'svg',\n\tmeta: {\"attributes\":{\"width\":\"16\",\"height\":\"18\",\"fill\":\"none\"},\"flags\":[],\"content\":\"\"},\n\ttoString: function(){ return this.url;}\n})", "import {asset} from 'imba';\nimport url from './hand-circle.svg';\nexport default asset({\n\turl: url,\n\ttype: 'svg',\n\tmeta: {\"attributes\":{\"width\":\"303.258\",\"height\":\"180.188\",\"filter\":\"invert(93%) hue-rotate(180deg)\"},\"flags\":[],\"content\":\"\"},\n\ttoString: function(){ return this.url;}\n})", "export const levels = {\n\t'1': 'Beginner'\n\t'2': 'Intermediate'\n\t'3': 'Advanced'\n}\n\nexport const colors = [\n\t'lavendar'\n\t'bubble-gum'\n\t'baby'\n\t'crab-cake'\n\t'moss'\n\t'lemony'\n]\nexport const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\nexport const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\nexport const bootcamp-price = 199\n\nexport const level-descriptions = \"Beginner = little or no experience in the topic.\\nNoob = learn the basics of the topic\\nIntermediate = reach a professional level.\\nAdvanced = level up your already existing knowledge of the topic\"\n\nexport def avatar-url user, s = 64\n\tif user\n\t\t\"/avatars/uid/{user.id}/{s}\"\n\telse\n\t\t\"/avatars/scrimba/{s}\"\n\nexport def uuid a,b\n\tb = a = ''\n\twhile a++ < 36\n\t\tb += a*51 & 52 ? (a^15 ? 8^Math.random! * (a^20 ? 16 : 4) : 4).toString(16) : '-'\n\treturn b\n\nexport const welcome-scrim = \"/scrim/cof5644d6891c46f3f2e1b3de\";\nexport const karma-notion-page = \"https://scrimba-community-handbook.super.site/how-to-earn-karma-points\"\nexport const rate-limit-message = \"You've been rate limited. Please wait for a few minutes and before trying again.\"\n\nexport class UserTime\n\tprop d\n\n\t# Accepts a epoch timestamp to format a certain date to the user's local timezone and format.\n\t# Optional duration to display a from - to time\n\tconstructor timestamp, duration = 0\n\t\td = new Date(timestamp)\n\t\tdur = duration\n\n\tget user_time do #user_time ||= Intl.DateTimeFormat().resolvedOptions()\n\tget timezone do user_time.timeZone\n\tget locale do user_time.locale\n\tget weekday do new Intl.DateTimeFormat(locale, weekday: 'long').format(d)\n\tget month do new Intl.DateTimeFormat(locale, month: 'long').format(d)\n\tget month_short do new Intl.DateTimeFormat(locale, month: 'short').format(d)\n\tget time\n\t\tlet fmt = new Intl.DateTimeFormat(locale, hour: 'numeric', minute: 'numeric')\n\t\tlet endDate = new Date(d.getTime() + dur * 60000)\n\t\tlet from = fmt.format(d)\n\t\tlet to = fmt.format(endDate)\n\t\tif duration > 0 \n\t\t\t\"{from} - {to}\"\n\t\telse\n\t\t\t\"{from}\"\n\tdef date options = {month: 'short', day: 'numeric'}\n\t\tnew Intl.DateTimeFormat(locale, options).format(d)\n\n\tdef timezone date\n\t\tlet t = new Intl.DateTimeFormat(locale, timeZoneName: 'short').formatToParts(d)\n\t\tlet tz = t.find do $1.type == 'timeZoneName'\n\t\ttz.value\n\n\tdef formatDateDetails date, ev\n\t\tlet details = ''\n\t\tfor tz in infoZones\n\t\t\tlet fmt = new Intl.DateTimeFormat(user_locale, {hour: 'numeric', minute: 'numeric', timeZone: tz})\n\t\t\tdetails += \"{tz}: {fmt.format(date)}\\n\"\n\t\tdetails\n"], "mappings": ";kHAEA,GAAO,GAAQ,EAAM,CACpB,IAAK,EACL,KAAM,MACN,KAAM,CAAC,WAAa,CAAC,MAAQ,KAAK,OAAS,KAAK,KAAO,QAAQ,MAAQ,GAAG,QAAU,mtBACpF,SAAU,UAAU,CAAE,MAAO,MAAK,6DCJnC,GAAO,GAAQ,EAAM,CACpB,IAAK,EACL,KAAM,MACN,KAAM,CAAC,WAAa,CAAC,MAAQ,UAAU,OAAS,UAAU,OAAS,kCAAkC,MAAQ,GAAG,QAAU,uzCAC1H,SAAU,UAAU,CAAE,MAAO,MAAK,OCAtB,GAAA,GAAS,CACrB,WACA,aACA,OACA,YACA,OACA", "names": [] }