blockbench/lib/VuePrismEditor.min.js
2020-09-30 22:38:32 +02:00

17 lines
30 KiB
JavaScript

(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")}({"0029":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"0a0d":function(t,e,n){t.exports=n("82e3")},"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}},"0f89":function(t,e,n){var r=n("6f8a");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"12fd":function(t,e,n){var r=n("6f8a"),i=n("da3c").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"1b8f":function(t,e,n){var r=n("a812"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"214f":function(t,e,n){"use strict";var r=n("32e9"),i=n("2aba"),o=n("79e5"),c=n("be13"),u=n("2b4c");t.exports=function(t,e,n){var a=u(t),s=n(c,a,""[t]),f=s[0],l=s[1];o(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,a,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},"230e":function(t,e,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},2418:function(t,e,n){var r=n("6a9b"),i=n("a5ab"),o=n("1b8f");t.exports=function(t){return function(e,n,c){var u,a=r(e),s=i(a.length),f=o(c,s);if(t&&n!=n){while(s>f)if(u=a[f++],u!=u)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},2695:function(t,e,n){var r=n("43c8"),i=n("6a9b"),o=n("2418")(!1),c=n("5d8f")("IE_PROTO");t.exports=function(t,e){var n,u=i(t),a=0,s=[];for(n in u)n!=c&&r(u,n)&&s.push(n);while(e.length>a)r(u,n=e[a++])&&(~o(s,n)||s.push(n));return s}},"28a5":function(t,e,n){n("214f")("split",2,function(t,e,r){"use strict";var i=n("aae3"),o=r,c=[].push,u="split",a="length",s="lastIndex";if("c"=="abbc"[u](/(b)*/)[1]||4!="test"[u](/(?:)/,-1)[a]||2!="ab"[u](/(?:ab)*/)[a]||4!="."[u](/(.?)(.?)/)[a]||"."[u](/()()/)[a]>1||""[u](/.?/)[a]){var f=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,u,l,p,d,h=[],v=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,y=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,v+"g");f||(r=new RegExp("^"+m.source+"$(?!\\s)",v));while(u=m.exec(n)){if(l=u.index+u[0][a],l>g&&(h.push(n.slice(g,u.index)),!f&&u[a]>1&&u[0].replace(r,function(){for(d=1;d<arguments[a]-2;d++)void 0===arguments[d]&&(u[d]=void 0)}),u[a]>1&&u.index<n[a]&&c.apply(h,u.slice(1)),p=u[0][a],g=l,h[a]>=y))break;m[s]===u.index&&m[s]++}return g===n[a]?!p&&m.test("")||h.push(""):h.push(n.slice(g)),h[a]>y?h.slice(0,y):h}}else"0"[u](void 0,0)[a]&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),c=void 0==n?void 0:n[e];return void 0!==c?c.call(n,o,i):r.call(String(o),n,i)},r]})},"2aba":function(t,e,n){var r=n("7726"),i=n("32e9"),o=n("69a8"),c=n("ca5a")("src"),u="toString",a=Function[u],s=(""+a).split(u);n("8378").inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,u){var a="function"==typeof n;a&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(a&&(o(n,c)||i(n,c,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,u,function(){return"function"==typeof this&&this[c]||a.call(this)})},"2b4c":function(t,e,n){var r=n("5537")("wks"),i=n("ca5a"),o=n("7726").Symbol,c="function"==typeof o,u=t.exports=function(t){return r[t]||(r[t]=c&&o[t]||(c?o:i)("Symbol."+t))};u.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2ea1":function(t,e,n){var r=n("6f8a");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),i=n("d2c8"),o="includes";r(r.P+r.F*n("5147")(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(t,e,n){var r=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},3846:function(t,e,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"3adc":function(t,e,n){var r=n("0f89"),i=n("a47f"),o=n("2ea1"),c=Object.defineProperty;e.f=n("7d95")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return c(t,e,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"3dcc":function(t,e,n){var r=n("d13f");r(r.S,"Date",{now:function(){return(new Date).getTime()}})},"412e":function(t,e,n){},"43c8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4917:function(t,e,n){n("214f")("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(i){}}return!0}},5537:function(t,e,n){var r=n("8378"),i=n("7726"),o="__core-js_shared__",c=i[o]||(i[o]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var r=n("7726"),i=n("8378"),o=n("32e9"),c=n("2aba"),u=n("9b43"),a="prototype",s=function(t,e,n){var f,l,p,d,h=t&s.F,v=t&s.G,g=t&s.S,y=t&s.P,m=t&s.B,b=v?r:g?r[e]||(r[e]={}):(r[e]||{})[a],x=v?i:i[e]||(i[e]={}),w=x[a]||(x[a]={});for(f in v&&(n=e),n)l=!h&&b&&void 0!==b[f],p=(l?b:n)[f],d=m&&l?u(p,r):y&&"function"==typeof p?u(Function.call,p):p,b&&c(b,f,p,t&s.U),x[f]!=p&&o(x,f,d),y&&w[f]!=p&&(w[f]=p)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},"5d8f":function(t,e,n){var r=n("7772")("keys"),i=n("7b00");t.exports=function(t){return r[t]||(r[t]=i(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6762:function(t,e,n){"use strict";var r=n("5ca1"),i=n("c366")(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),i=n("be13");t.exports=function(t){return r(i(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"6a9b":function(t,e,n){var r=n("8bab"),i=n("e5fa");t.exports=function(t){return r(i(t))}},"6b54":function(t,e,n){"use strict";n("3846");var r=n("cb7c"),i=n("0bfb"),o=n("9e1e"),c="toString",u=/./[c],a=function(t){n("2aba")(RegExp.prototype,c,t,!0)};n("79e5")(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?a(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):u.name!=c&&a(function(){return u.call(this)})},"6e1f":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6f8a":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},"72d6":function(t,e,n){var r=n("8a8d"),i=n("ad9a");function o(t,e){if(!(this instanceof o))return new o(t,e);if(this.node=this.start=this.peeked=t,this.root=e,this.closingTag=!1,this._revisit=!0,this._selects=[],this._rejects=[],t&&this.higher(t))throw new Error("root must be a parent or ancestor to node")}function c(t,e){var n="nextSibling"==t;return function(i,o,c){i=this.compile(i),o=o&&o>0?o:1;var u=this.node,a=this.closingTag,s=this._revisit;while(u){if(r(n,a)&&u[e])u=u[e],a=!n;else if(1==u.nodeType&&!u[e]&&r(n,a)){if(a=n,!s)continue}else if(u[t])u=u[t],a=!n;else if(u=u.parentNode,a=n,!s)continue;if(!u||this.higher(u,this.root))break;if(i(u)&&this.selects(u,c)&&this.rejects(u,c)){if(--o)continue;return c||(this.node=u),this.closingTag=a,u}}return null}}t.exports=o,o.prototype.reset=function(t){return this.node=t||this.start,this},o.prototype.revisit=function(t){return this._revisit=void 0==t||t,this},o.prototype.opening=function(){return 1==this.node.nodeType&&(this.closingTag=!1),this},o.prototype.atOpening=function(){return!this.closingTag},o.prototype.closing=function(){return 1==this.node.nodeType&&(this.closingTag=!0),this},o.prototype.atClosing=function(){return this.closingTag},o.prototype.next=c("nextSibling","firstChild"),o.prototype.previous=o.prototype.prev=c("previousSibling","lastChild"),o.prototype.select=function(t){return t=this.compile(t),this._selects.push(t),this},o.prototype.selects=function(t,e){var n=this._selects,r=n.length;if(!r)return!0;for(var i=0;i<r;i++)if(n[i].call(this,t,e))return!0;return!1},o.prototype.reject=function(t){return t=this.compile(t),this._rejects.push(t),this},o.prototype.rejects=function(t,e){var n=this._rejects,r=n.length;if(!r)return!0;for(var i=0;i<r;i++)if(n[i].call(this,t,e))return!1;return!0},o.prototype.higher=function(t){var e=this.root;if(!e)return!1;t=t.parentNode;while(t&&t!=e)t=t.parentNode;return t!=e},o.prototype.compile=function(t){switch(typeof t){case"number":return function(e){return t==e.nodeType};case"string":return new Function("node","return "+i(t,"node."));case"function":return t;default:return function(){return!0}}},o.prototype.peak=o.prototype.peek=function(t,e){return 1==arguments.length&&(e=t,t=!0),e=void 0==e?1:e,e?e>0?this.next(t,e,!0):this.prev(t,Math.abs(e),!0):this.node},o.prototype.use=function(t){return t(this),this}},"74a0":function(t,e,n){"use strict";
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/var r=/["'&<>]/;function i(t){var e,n=""+t,i=r.exec(n);if(!i)return n;var o="",c=0,u=0;for(c=i.index;c<n.length;c++){switch(n.charCodeAt(c)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 39:e="&#39;";break;case 60:e="&lt;";break;case 62:e="&gt;";break;default:continue}u!==c&&(o+=n.substring(u,c)),u=c+1,o+=e}return u!==c?o+n.substring(u,c):o}t.exports=i},7633:function(t,e,n){var r=n("2695"),i=n("0029");t.exports=Object.keys||function(t){return r(t,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)},7772:function(t,e,n){var r=n("a7d3"),i=n("da3c"),o="__core-js_shared__",c=i[o]||(i[o]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b457")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"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}}},"7b00":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"7d95":function(t,e,n){t.exports=!n("d782")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"82e3":function(t,e,n){n("3dcc"),t.exports=n("a7d3").Date.now},8378:function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},"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(u){}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},"8bab":function(t,e,n){var r=n("6e1f");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"8ce0":function(t,e,n){var r=n("3adc"),i=n("f845");t.exports=n("7d95")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"954e":function(t,e,n){"use strict";var r,i=n("cf4f"),o={},c={default:{"&quot;":'"',"&#34;":'"',"&apos;":"'","&#39;":"'","&amp;":"&","&#38;":"&","&gt;":">","&#62;":">","&lt;":"<","&#60;":"<"},extras:{"&cent;":"¢","&#162;":"¢","&copy;":"©","&#169;":"©","&euro;":"€","&#8364;":"€","&pound;":"£","&#163;":"£","&reg;":"®","&#174;":"®","&yen;":"¥","&#165;":"¥"}};function u(t,e){if(!s(t))return"";var n=c[e||"default"],r=a(e,n);return t.replace(r,function(t){return n[t]})}function a(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))}}),u.chars=c.default,u.extras=c.extras,Object.defineProperty(u,"all",{get:function(){return c.all}}),t.exports=u},"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})},a47f:function(t,e,n){t.exports=!n("7d95")&&!n("d782")(function(){return 7!=Object.defineProperty(n("12fd")("div"),"a",{get:function(){return 7}}).a})},a481:function(t,e,n){n("214f")("replace",2,function(t,e,n){return[function(r,i){"use strict";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)},n]})},a5ab:function(t,e,n){var r=n("a812"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},a7d3:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},a812:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},aae3:function(t,e,n){var r=n("d3f4"),i=n("2d95"),o=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},ad9a:function(t,e){var n=/\b(Array|Date|Object|Math|JSON)\b/g;function r(t){return t.replace(/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^\/]+)\//g,"").replace(n,"").match(/[a-zA-Z_]\w*/g)||[]}function i(t,e,n){var r=/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^\/]+)\/|[a-zA-Z_]\w*/g;return t.replace(r,function(t){return"("==t[t.length-1]?n(t):~e.indexOf(t)?n(t):t})}function o(t){for(var e=[],n=0;n<t.length;n++)~e.indexOf(t[n])||e.push(t[n]);return e}function c(t){return function(e){return t+e}}t.exports=function(t,e){var n=o(r(t));return e&&"string"==typeof e&&(e=c(e)),e?i(t,n,e):n}},aef6:function(t,e,n){"use strict";var r=n("5ca1"),i=n("9def"),o=n("d2c8"),c="endsWith",u=""[c];r(r.P+r.F*n("5147")(c),"String",{endsWith:function(t){var e=o(this,t,c),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),a=void 0===n?r:Math.min(i(n),r),s=String(t);return u?u.call(e,s,a):e.slice(a-s.length,a)===s}})},b16a:function(t,e,n){"use strict";var r=n("412e"),i=n.n(r);i.a},b457:function(t,e){t.exports=!0},bc25:function(t,e,n){var r=n("f2fe");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)}}},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var r=n("6821"),i=n("9def"),o=n("77f1");t.exports=function(t){return function(e,n,c){var u,a=r(e),s=i(a.length),f=o(c,s);if(t&&n!=n){while(s>f)if(u=a[f++],u!=u)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c764:function(t,e,n){n("dc9b"),t.exports=n("a7d3").Object.values},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},cf4f:function(t,e,n){"use strict";var r=n("d913");function i(t,e){for(var n in e)o(e,n)&&(t[n]=e[n])}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t){r(t)||(t={});for(var e=arguments.length,n=1;n<e;n++){var o=arguments[n];r(o)&&i(t,o)}return t}},cff3:function(t,e,n){var r=n("7633"),i=n("6a9b"),o=n("d74e").f;t.exports=function(t){return function(e){var n,c=i(e),u=r(c),a=u.length,s=0,f=[];while(a>s)o.call(c,n=u[s++])&&f.push(t?[n,c[n]]:c[n]);return f}}},d13f:function(t,e,n){var r=n("da3c"),i=n("a7d3"),o=n("bc25"),c=n("8ce0"),u=n("43c8"),a="prototype",s=function(t,e,n){var f,l,p,d=t&s.F,h=t&s.G,v=t&s.S,g=t&s.P,y=t&s.B,m=t&s.W,b=h?i:i[e]||(i[e]={}),x=b[a],w=h?r:v?r[e]:(r[e]||{})[a];for(f in h&&(n=e),n)l=!d&&w&&void 0!==w[f],l&&u(b,f)||(p=l?w[f]:n[f],b[f]=h&&"function"!=typeof w[f]?n[f]:y&&l?o(p,r):m&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[a]=t[a],e}(p):g&&"function"==typeof p?o(Function.call,p):p,g&&((b.virtual||(b.virtual={}))[f]=p,t&s.R&&x&&!x[f]&&c(x,f,p)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},d2c8:function(t,e,n){var r=n("aae3"),i=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d74e:function(t,e){e.f={}.propertyIsEnumerable},d782:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d913:function(t,e,n){"use strict";
/*!
* is-extendable <https://github.com/jonschlinkert/is-extendable>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/t.exports=function(t){return"undefined"!==typeof t&&null!==t&&("object"===typeof t||"function"===typeof t)}},da3c: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)},db0c:function(t,e,n){t.exports=n("c764")},dc9b:function(t,e,n){var r=n("d13f"),i=n("cff3")(!1);r(r.S,"Object",{values:function(t){return i(t)}})},e5fa:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},f2fe:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},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)},f845:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},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("db0c"),u=n.n(c),a=(n("6762"),n("2fdb"),n("0a0d")),s=n.n(a),f=(n("aef6"),n("28a5"),n("74a0")),l=n.n(f);function p(t,e,n){return"text"===e&&(t=l()(t)),'<code class="language-'.concat(n,'">').concat(t,"</code>")}var d=function(t,e){if(!e)return p(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 p(r,n,e)}return p(t,"text","text")},h=(n("a481"),function(t){return t.replace("\n","<br>")}),v=h,g=n("954e"),y=n.n(g),m=function(t){return y()(t.replace(/<br>/gm,"\n").replace(/<\/?[^>]*>/gm,""))},b=m,x=(n("6b54"),n("72d6")),w=n.n(x);function S(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,u,a=e.end&&e.end!==e.start,s=0,f=(i=document.createRange(),w()(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(!u&&v&&(u=!0,i.setStart(c,l-h),!a)){i.collapse(!0),_(t,i);break}if(a&&s>=p){i.setEnd(c,p-h),_(t,i);break}}}}function _(t,e){var n=window.getSelection();t.focus(),n.removeAllRanges(),n.addRange(e)}var k=S,C=(n("4917"),function(t,e){var n=t.slice(0,e),r=n.lastIndexOf("\n")+1,i=n.slice(r);return i}),O=/^\s+/,T=function(t,e){var n=C(t,e),r=n.match(O);return null===r?"":r[0]||""},E=/^(\t| {2})* {2}$/,j=function(t,e){var n=C(t,e);return E.test(n)?2:0},P={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:40,printScreen:44,meta:91,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numLock:144,scrollLock:145},M={model:{prop:"code",event:"change"},props:{emitEvents:{type:Boolean,default:!1},language:{type:String,default:"js"},lineNumbers:{type:Boolean,default:!1},autoStyleLineNumbers:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},code:{type:String,default:""}},data:function(){return{undoStack:[],selection:void 0,lineNumbersHeight:"20px",undoOffset:0,undoTimestamp:0,lastPos:0,codeData:"",composing:!1}},watch:{code:{immediate:!0,handler:function(t){this.codeData=t||""}},content:{immediate:!0,handler:function(){var t=this;this.lineNumbers&&this.$nextTick(function(){t.setLineNumbersHeight()})}},lineNumbers:function(){var t=this;this.$nextTick(function(){t.styleLineNumbers(),t.setLineNumbersHeight()})}},computed:{content:function(){return d(this.codeData||"",this.language)},lineNumbersCount:function(){var t=this.codeData.split(/\r\n|\n/).length;return this.codeData.endsWith("\n")&&t--,t}},updated:function(){this.selection&&k(this.$refs.pre,this.selection)},mounted:function(){var t=this;this.recordChange(this.getPlain()),this.undoTimestamp=0,this.styleLineNumbers();var e=function(e){e.preventDefault();var n=k(t.$refs.pre),r=(e.originalEvent||e).clipboardData.getData("Text");document.execCommand("insertHTML",!1,l()(r));var i=n.end+r.length;t.selection={start:i,end:i};var o=t.getPlain();t.recordChange(o,t.selection),t.updateContent(o),t.setLineNumbersHeight()},n=this.$refs.pre;n.addEventListener("paste",e),this.$once("hook:beforeDestroy",function(){n.removeEventListener("paste",e)}),n.addEventListener("compositionstart",function(){t.composing=!0}),n.addEventListener("compositionend",function(){t.composing=!1})},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(this.lineNumbers&&this.autoStyleLineNumbers){var t=this.$refs.pre,e=this.$el.querySelector(".prism-editor__line-numbers"),n=window.getComputedStyle(t);this.$nextTick(function(){var r="border-top-left-radius",i="border-bottom-left-radius";e.style[r]=n[r],e.style[i]=n[i],t.style[r]=0,t.style[i]=0;var o=["background-color","margin-top","padding-top","font-family","font-size","line-height"];o.forEach(function(t){e.style[t]=n[t]}),e.style["margin-bottom"]="-"+n["padding-top"]})}},handleClick:function(t){this.emitEvents&&this.$emit("editorClick",t),this.undoTimestamp=0,this.selection=k(this.$refs.pre)},getPlain:function(){if(this._innerHTML===this.$refs.pre.innerHTML)return this._plain;var t=b(v(this.$refs.pre.innerHTML));return this._innerHTML=this.$refs.pre.innerHTML,this._plain=t,this._plain},recordChange:function(t,e){if(t!==this.undoStack[this.undoStack.length-1]){this.undoOffset>0&&(this.undoStack=this.undoStack.slice(0,-this.undoOffset),this.undoOffset=0);var n=s()(),r={plain:t,selection:e};n-this.undoTimestamp<3e3?this.undoStack[this.undoStack.length-1]=r:(this.undoStack.push(r),this.undoStack.length>50&&this.undoStack.shift()),this.undoTimestamp=n}},updateContent:function(t){this.$emit("change",t),this.$emit("update:code",t)},restoreStackState:function(t){var e=this.undoStack[this.undoStack.length-1-t],n=e.plain,r=e.selection;this.selection=r,this.undoOffset=t,this.updateContent(n)},undo:function(){var t=this.undoOffset+1;t>=this.undoStack.length||this.restoreStackState(t)},redo:function(){var t=this.undoOffset-1;t<0||this.restoreStackState(t)},handleKeyDown:function(t){if(this.emitEvents&&this.$emit("keydown",t),9!==t.keyCode||this.ignoreTabKey)if(8===t.keyCode){var e=k(this.$refs.pre),n=e.start,r=e.end;if(n!==r)return;var i=j(this.$refs.pre.innerText,n);if(i<=0)return;for(var o=0;o<i;o++)document.execCommand("delete",!1);t.preventDefault()}else if(13===t.keyCode){var c=k(this.$refs.pre),u=c.start,a=T(this.$refs.pre.innerText,u);document.execCommand("insertHTML",!1,"\n "+a),document.execCommand("delete",!1),t.preventDefault()}else 90!==t.keyCode||t.metaKey===t.ctrlKey||t.altKey||(t.shiftKey?this.redo():this.undo(),t.preventDefault());else document.execCommand("insertHTML",!1," "),t.preventDefault()},handleKeyUp:function(t){var e=t.which;if(this.composing){if(13!==e)return;this.composing=!1}if(this.code||(this.codeData=t.target.innerText),this.emitEvents&&this.$emit("keyup",t),91!==t.keyCode&&93!==t.keyCode&&!t.ctrlKey&&!t.metaKey)if(13===t.keyCode&&(this.undoTimestamp=0),this.selection=k(this.$refs.pre),u()(P).includes(t.keyCode))this.undoTimestamp=0;else{var n=this.getPlain();this.recordChange(n,this.selection),this.updateContent(n)}}}},$=M;n("b16a");function N(t,e,n,r,i,o,c,u){var a,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),c?(a=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=a):i&&(a=u?function(){i.call(this,this.$root.$options.shadowRoot)}:i),a)if(s.functional){s._injectStyles=a;var f=s.render;s.render=function(t,e){return a.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,a):[a]}return{exports:t,options:s}}var L=N($,i,o,!1,null,null,null),D=L.exports;e["default"]=D}})["default"]});
//# sourceMappingURL=VuePrismEditor.umd.min.js.map
Vue.component('vue-prism-editor', VuePrismEditor)