presentazione-papero/plugin/notes/notes.esm.js

2 lines
57 KiB
JavaScript
Raw Normal View History

2020-05-19 18:44:40 +02:00
var t=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}}));t.defaults,t.getDefaults,t.changeDefaults;const e=/[&<>"']/,n=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a=t=>r[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function o(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const c=/(^|[^\[])\^/g;const u=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const p={},h=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(t,e){p[" "+t]||(h.test(t)?p[" "+t]=t+"/":p[" "+t]=k(t,"/",!0));const n=-1===(t=p[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(g,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(m,"$1")+e:t+e}function k(t,e,n){const s=t.length;if(0===s)return"";let i=0;for(;i<s;){const r=t.charAt(s-i-1);if(r!==e||n){if(r===e||!n)break;i++}else i++}return t.substr(0,s-i)}var b={escape:function(t,r){if(r){if(e.test(t))return t.replace(n,a)}else if(s.test(t))return t.replace(i,a);return t},unescape:o,edit:function(t,e){t=t.source||t,e=e||"";const n={replace:(e,s)=>(s=(s=s.source||s).replace(c,"$1"),t=t.replace(e,s),n),getRegex:()=>new RegExp(t,e)};return n},cleanUrl:function(t,e,n){if(t){let t;try{t=decodeURIComponent(o(n)).replace(u,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(n)&&(n=f(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},resolveUrl:f,noopTest:{exec:function(){}},merge:function(t){let e,n,s=1;for(;s<arguments.length;s++)for(n in e=arguments[s],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},splitCells:function(t,e){const n=t.replace(/\|/g,(t,e,n)=>{let s=!1,i=e;for(;--i>=0&&"\\"===n[i];)s=!s;return s?"|":" |"}).split(/ \|/);let s=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n},rtrim:k,findClosingBracket:function(t,e){if(-1===t.indexOf(e[1]))return-1;const n=t.length;let s=0,i=0;for(;i<n;i++)if("\\"===t[i])i++;else if(t[i]===e[0])s++;else if(t[i]===e[1]&&(s--,s<0))return i;return-1},checkSanitizeDeprecation:function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}};const{defaults:w}=t,{rtrim:y,splitCells:x,escape:v,findClosingBracket:S}=b;function T(t,e,n){const s=e.href,i=e.title?v(e.title):null;return"!"!==t[0].charAt(0)?{type:"link",raw:n,href:s,title:i,text:t[1]}:{type:"image",raw:n,text:v(t[1]),href:s,title:i}}var z=class{constructor(t){this.options=t||w}space(t){const e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}}code(t,e){const n=this.rules.block.code.exec(t);if(n){const t=e[e.length-1];if(t&&"paragraph"===t.type)return{raw:n[0],text:n[0].trimRight()};const s=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?s:y(s,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e){const n=t.match(/^(\s+)(?:```)/);if(null===n)return e;const s=n[1];return e.split("\n").map(t=>{const e=t.match(/^\s+/);if(null