{"version":3,"file":"jquery.noty.init.min.js","sources":["jquery.noty.init.js"],"sourcesContent":["(function(w, $) {\r\n var pubSub = w.PubSub;\r\n\r\n if (pubSub) {\r\n // Listen to the messages on global notifications channel\r\n pubSub.subscribe('notification', showNotification);\r\n\r\n if (w.notifyMessages) {\r\n w.notifyMessages.forEach(function (message) {\r\n pubSub.publish('notification', message);\r\n });\r\n }\r\n }\r\n\r\n function showNotification(topic, contract) {\r\n const topicParts = topic.split('.');\r\n const notificationType = topicParts.length > 1 ? topicParts[topicParts.length - 1] : 'information';\r\n\r\n let defaultOptions = {\r\n layout: 'topCenter',\r\n type: notificationType,\r\n maxVisible: 15,\r\n force: true,\r\n closeWith:['click', 'button'],\r\n timeout: 5000\r\n };\r\n\r\n const notyCallback = typeof (contract) === 'object' && contract && contract.notyCallback && typeof (contract.notyCallback) === 'function' ? contract.notyCallback : null;\r\n\r\n let notyOptions = typeof (contract) === 'object' && contract ? $.extend(true, defaultOptions, contract) : $.extend(defaultOptions, { text: contract });\r\n\r\n if (w.siteScripts) {\r\n notyOptions = w.siteScripts.converters.apply('NotyOptionsConverters', notyOptions);\r\n }\r\n\r\n const notyMsg = w.noty(notyOptions);\r\n\r\n if (notyCallback) {\r\n notyCallback(notyMsg);\r\n }\r\n }\r\n})(window, jQuery);"],"names":["w","$","pubSub","PubSub","subscribe","topic","contract","topicParts","split","notificationType","length","defaultOptions","layout","type","maxVisible","force","closeWith","timeout","notyCallback","notyOptions","extend","text","siteScripts","converters","apply","notyMsg","noty","notifyMessages","forEach","message","publish","window","jQuery"],"mappings":"CAAA,CAAUA,EAAGC,KACT,IAAIC,EAASF,EAAEG,OAEXD,IAEAA,EAAOE,UAAU,eASrB,SAA0BC,EAAOC,GAC7B,IAAMC,EAAaF,EAAMG,MAAM,GAAG,EAC5BC,EAAuC,EAApBF,EAAWG,OAAaH,EAAWA,EAAWG,OAAS,GAAK,cAEjFC,EAAiB,CACjBC,OAAQ,YACRC,KAAMJ,EACNK,WAAY,GACZC,MAAO,CAAA,EACPC,UAAU,CAAC,QAAS,UACpBC,QAAS,GACb,EAEMC,EAAqC,UAAtB,OAAO,GAA2BZ,GAAYA,EAASY,cAAmD,YAAnC,OAAQZ,EAAqB,aAAmBA,EAASY,aAAe,KAEhKC,EAAoC,UAAtB,OAAO,GAA2Bb,EAAWL,EAAEmB,OAAO,CAAA,EAAMT,EAAgBL,CAAQ,EAAIL,EAAEmB,OAAOT,EAAgB,CAAEU,KAAMf,CAAS,CAAC,EAEjJN,EAAEsB,cACFH,EAAcnB,EAAEsB,YAAYC,WAAWC,MAAM,wBAAyBL,CAAW,GAG/EM,EAAUzB,EAAE0B,KAAKP,CAAW,EAE9BD,GACAA,EAAaO,CAAO,CAE5B,CAnCqD,EAE7CzB,EAAE2B,iBACF3B,EAAE2B,eAAeC,QAAQ,SAAUC,GAC/B3B,EAAO4B,QAAQ,eAAgBD,CAAO,CAC1C,CAAC,CA+BZ,GAAEE,OAAQC,MAAM"}