moodle_local_treestudyplan/amd/build/util/premium.min.js.map

1 line
No EOL
1.3 KiB
Text

{"version":3,"file":"premium.min.js","sources":["../../src/util/premium.js"],"sourcesContent":["/*eslint no-var: \"error\" */\n/*eslint-env es6*/\n\nimport {call} from 'core/ajax';\nimport notification from 'core/notification';\n\n// Prepare default value.\nlet premiumstatus_cache = null;\n\n/**\n * Check if premium status is enabled.\n * @returns {Bool} True/False\n */\nexport function premiumenabled (){\n const premium = premiumstatus();\n return (premium.enabled)?true:false;\n}\n\n/**\n * Get premium status object\n * @returns {Object} The premium status object\n */\nfunction premiumstatus() {\n if (!premiumstatus_cache) {\n // Retrieve premium status if needed.\n call([{\n methodname: 'local_treestudyplan_premiumstatus',\n args: {}\n }])[0].then(function(response){\n premiumstatus_cache = response;\n }).catch(notification.exception);\n }\n return premiumstatus_cache;\n}\n\n// Preload premium status.\npremiumstatus();"],"names":["premiumstatus","enabled","premiumstatus_cache","methodname","args","then","response","catch","notification","exception"],"mappings":"yOAcoBA,gBACAC,iFARhBC,oBAAsB,cAejBF,uBACAE,oCAEI,CAAC,CACFC,WAAY,oCACZC,KAAM,MACN,GAAGC,MAAK,SAASC,UACjBJ,oBAAsBI,YACvBC,MAAMC,sBAAaC,WAEnBP,oBAIXF"}