1ACC.globalmessage = { 2 _autoload: [], 3 4 /** 5 * Show aletrs/message 6 * @param {String} messageType type of messages. 7 * @param {[ 8 * { text: '', args: [] } 9* ]} texts list of texts with args to show. 10 * @param {Boolean} showBtn show close btn. 11 */ 12 messageTpl: function(messageType, texts, showBtn) { 13 let btn = showBtn 14 ? `<button class="close closeAccAlert" aria-hidden="true" data-dismiss="alert" type="button">×</button>` 15 : ""; 16 17 let text = texts[0] && ACC.globalmessage.handleACCTextWithArg(texts[0]); 18 let classes = messageType === 'waring' ? 'alert-warning' : 'alert-info'; 19 20 if(messageType === 'error') { 21 text = `${texts.map( 22 (textObj) => 23 `<p>${ACC.globalmessage.handleACCTextWithArg(textObj)}</p>` 24 ).join('')}`; 25 classes = 'alert-danger'; 26 } 27 28 return `<div class="global-alerts"> 29 <div class="alert ${classes} alert-dismissable getAccAlert"> 30 ${btn} ${text} 31 </div> 32 </div>` 33 }, 34 35 handleACCTextWithArg: ({ text, args }) => 36 args?.reduce((acc, arg, i) => acc?.replace(`{${i}}`, arg), text) || text, 37 38 getACCText: (str) => str.split(".").reduce((o, i) => o[i], ACC.text), 39}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.