2020-12-05 23:56:57 +01:00
|
|
|
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["VuePrismEditor"]=e():t["VuePrismEditor"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),i=n("5ca1"),o=n("2aba"),c=n("32e9"),a=n("84f2"),u=n("41a0"),s=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",g=function(){return this};t.exports=function(t,e,n,y,b,m,x){u(n,e,y);var S,w,k,_=function(t){if(!p&&t in E)return E[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",T=b==v,O=!1,E=t.prototype,L=E[l]||E[d]||b&&E[b],j=L||_(b),P=b?T?_("entries"):j:void 0,$="Array"==e&&E.entries||L;if($&&(k=f($.call(new t)),k!==Object.prototype&&k.next&&(s(k,C,!0),r||"function"==typeof k[l]||c(k,l,g))),T&&L&&L.name!==v&&(O=!0,j=function(){return L.call(this)}),r&&!x||!p&&!O&&E[l]||c(E,l,j),a[e]=j,a[C]=g,b)if(S={values:T?j:_(v),keys:m?j:_(h),entries:P},x)for(w in S)w in E||o(E,w,S[w]);else i(i.P+i.F*(p||O),e,S);return S}},"02f4":function(t,e,n){var r=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var o,c,a=String(i(e)),u=r(n),s=a.length;return u<0||u>=s?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===s||(c=a.charCodeAt(u+1))<56320||c>57343?t?a.charAt(u):o:t?a.slice(u,u+2):c-56320+(o-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return r(t,i)}},1495:function(t,e,n){var r=n("86cc"),i=n("cb7c"),o=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);var n,c=o(e),a=c.length,u=0;while(a>u)r.f(t,n=c[u++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),i=n("32e9"),o=n("79e5"),c=n("be13"),a=n("2b4c"),u=n("520a"),s=a("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=a(t),d=!o((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[p](""),!e})):void 0;if(!d||!h||"replace"===t&&!f||"split"===t&&!l){var v=/./[p],g=n(c,p,""[t],(function(t,e,n,r,i){return e.exec===u?d&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),y=g[0],b=g[1];r(String.prototype,t,y),i(RegExp.prototype,p,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)}
|
2019-12-15 20:04:31 +01:00
|
|
|
/*!
|
|
|
|
* escape-html
|
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
|
* MIT Licensed
|
2020-12-05 23:56:57 +01:00
|
|
|
*/var r=/["'&<>]/;function i(t){var e,n=""+t,i=r.exec(n);if(!i)return n;var o="",c=0,a=0;for(c=i.index;c<n.length;c++){switch(n.charCodeAt(c)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}a!==c&&(o+=n.substring(a,c)),a=c+1,o+=e}return a!==c?o+n.substring(a,c):o}t.exports=i},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7f20":function(t,e,n){var r=n("86cc").f,i=n("69a8"),o=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},8378:function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},8615:function(t,e,n){var r=n("5ca1"),i=n("504c")(!1);r(r.S,"Object",{values:function(t){return i(t)}})},"86cc":function(t,e,n){var r=n("cb7c"),i=n("c69a"),o=n("6a99"),c=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return c(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8a8d":function(t,e){function n(t,e){return t^e}t.exports=n},"954e":function(t,e,n){"use strict";var r,i=n("cf4f"),o={},c={default:{""":'"',""":'"',"'":"'","'":"'","&":"&","&":"&",">":">",">":">","<":"<","<":"<"},extras:{"¢":"¢","¢":"¢","©":"©","©":"©","€":"€","€":"€","£":"£","£":"£","®":"®","®":"®","¥":"¥","¥":"¥"}};function a(t,e){if(!s(t))return"";var n=c[e||"default"],r=u(e,n);return t.replace(r,(function(t){return n[t]}))}function u(t,e){if(o[t])return o[t];var n=Object.keys(e).join("|"),r=new RegExp("(?=("+n+"))\\1","g");return o[t]=r,r}function s(t){return t&&"string"===typeof t}Object.defineProperty(c,"all",{get:function(){return r||(r=i({},c.default,c.extras))}}),a.chars=c.default,a.extras=c.extras,Object.defineProperty(a,"all",{get:function(){return c.all}}),t.exports=a},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),i=Array.prototype;void 0==i[r]&&n("32e9")(i,r,{}),t.exports=function(t){i[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a481:function(t,e,n){"use strict";var r=n("cb7c"),i=n("4bf8"),o=n("9def"),c=n("4588"),a=n("0390"),u=n("5f1b"),s=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,(function(t,e,n,v){return[function(r,i){var o=t(this),c=void 0==r?void 0:r[e];return void 0!==c?c.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=v(n,t,this,e);if(i.done)return i.value;var l=r(t),p=String(this),d="function"===typeof e;d||(e=String(e));var y=l.global;if(y){var b=l.unicode;l.lastIndex=0}var m=[];while(1){var x=u(l,p);if(null===x)break;if(m.push(x),!y)break;var S=String(x[0]);""===S&&(l.lastIndex=a(p,o(l.lastIndex),b))}for(var w="",k=0,_=0;_<m.length;_++){x=m[_];for(var C=String(x[0]),T=s(f(c(x.index),p.length),0),O=[],E=1;E<x.length;E++)O.push(h(x[E]));var L=x.groups;if(d){var j=[C].concat(O,T,p);void 0!==L&&j.push(L);var P=String(e.apply(void 0,j))}else P=g(C,p,T,O,L,e);T>=k&&(w+=p.slice(k,T)+P,k=T+C.length)}return w+p.slice(k)}];function g(t,e,r,o,c,a){var
|
2019-12-15 20:04:31 +01:00
|
|
|
/*!
|
|
|
|
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
|
|
*
|
|
|
|
* Copyright (c) 2015, Jon Schlinkert.
|
|
|
|
* Licensed under the MIT License.
|
2020-12-05 23:56:57 +01:00
|
|
|
*/t.exports=function(t){return"undefined"!==typeof t&&null!==t&&("object"===typeof t||"function"===typeof t)}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},ebd6:function(t,e,n){var r=n("cb7c"),i=n("d8e8"),o=n("2b4c")("species");t.exports=function(t,e){var n,c=r(t).constructor;return void 0===c||void 0==(n=r(c)[o])?e:i(n)}},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));var i=function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return r("div",{staticClass:"prism-editor-wrapper"},[e.lineNumbers?r("div",{staticClass:"prism-editor__line-numbers",style:{"min-height":e.lineNumbersHeight},attrs:{"aria-hidden":"true"}},[r("div",{staticClass:"prism-editor__line-width-calc",staticStyle:{height:"0px",visibility:"hidden","pointer-events":"none"}},[e._v("\n 999\n ")]),e._l(e.lineNumbersCount,(function(t){return r("div",{key:t,staticClass:"prism-editor__line-number token comment"},[e._v("\n "+e._s(t)+"\n ")])}))],2):e._e(),r("pre",e._g({ref:"pre",staticClass:"prism-editor__code",class:(t={},t["language-"+e.language]=!0,t),attrs:{contenteditable:!e.readonly,spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false"},domProps:{innerHTML:e._s(e.content)},on:{keydown:e.handleKeyDown,keyup:e.handleKeyUp,click:e.handleClick}},e.$listeners))])},o=[],c=(n("ac6a"),n("cadf"),n("8615"),n("6762"),n("2fdb"),n("aef6"),n("28a5"),n("74a0")),a=n.n(c);function u(t,e,n){return"text"===e&&(t=a()(t)),'<code class="language-'.concat(n,'">').concat(t,"</code>")}var s=function(t,e){if(!e)return u(t,"text","text");e=e.toLowerCase();var n=e;if("vue"!==e&&"html"!==e||(e="markup"),"md"===e&&(e="markdown"),"ts"===e&&(e="typescript"),Prism.languages[e]){var r=Prism.highlight(t,Prism.languages[e],e);return u(r,n,e)}return u(t,"text","text")},f=(n("a481"),function(t){return t.replace("\n","<br>")}),l=f,p=n("954e"),d=n.n(p),h=function(t){return d()(t.replace(/<br>/gm,"\n").replace(/<\/?[^>]*>/gm,""))},v=h,g=(n("6b54"),n("72d6")),y=n.n(g);function b(t,e){if(document.activeElement===t){var n=window.getSelection();if(1==arguments.length){if(!n.rangeCount)return;var r={},i=n.getRangeAt(0),o=i.cloneRange();return o.selectNodeContents(t),o.setEnd(i.endContainer,i.endOffset),r.end=o.toString().length,o.setStart(i.startContainer,i.startOffset),r.start=r.end-o.toString().length,r.atStart=0===o.startOffset,r.commonAncestorContainer=o.commonAncestorContainer,r.endContainer=o.endContainer,r.startContainer=o.startContainer,r}var c,a,u=e.end&&e.end!==e.start,s=0,f=(i=document.createRange(),y()(t).select(Node.TEXT_NODE).revisit(!1)),l=e.start>t.textContent.length?t.textContent.length:e.start,p=e.end>t.textContent.length?t.textContent.length:e.end,d=e.atStart;while(c=f.next()){var h=s;s+=c.textContent.length;var v=d?s>l:s>=l;if(!a&&v&&(a=!0,i.setStart(c,l-h),!u)){i.collapse(!0),m(t,i);break}if(u&&s>=p){i.setEnd(c,p-h),m(t,i);break}}}}function m(t,e){var n=window.getSelection();t.focus(),n.removeAllRanges(),n.addRange(e)}var x=b,S=(n("4917"),function(t,e){var n=t.slice(0,e),r=n.lastIndexOf("\n")+1,i=n.slice(r);return i}),w=/^\s+/,k=function(t,e){var n=S(t,e),r=n.match(w);return null===r?"":r[0]||""},_=/^(\t| {2})* {2}$/,C=function(t,e){var n=S(t,e);return _.test(n)?2:0},T={shift:16,ctrl:17,alt:18,pauseBreak:19,capsLock:20,esc:27,pageUp:33,pageDown:34,end:35,home:36,arrowLeft:37,arrowUp:38,arrowRight:39,arrowDown:
|