additional_plugins/serendipity_event_social/shariff.min.js

7 lines
44 KiB
JavaScript
Raw Normal View History

2016-06-21 14:08:20 +02:00
/*!
* shariff - v3.0.1 - Sun, 22 Apr 2018 20:23:51 GMT
2016-06-21 14:08:20 +02:00
* https://github.com/heiseonline/shariff
* Copyright (c) 2018 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
2016-06-21 14:08:20 +02:00
* Licensed under the MIT license
*/
!function(e){function t(a){if(r[a])return r[a].exports;var n=r[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(e,t,r){if(e&&p.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}function i(e){return p.isString(e)&&(e=n(e)),e instanceof a?e.format():a.prototype.format.call(e)}function o(e,t){return n(e,!1,!0).resolve(t)}function s(e,t){return e?n(e,!1,!0).resolveObject(t):t}var l=r(9),p=r(11);t.parse=n,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=a;var h=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(c),m=["'"].concat(f),g=["%","/","?",";","#"].concat(m),b=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,k=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},z={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=r(12);a.prototype.parse=function(e,t,r){if(!p.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),n=-1!==a&&a<e.indexOf("#")?"?":"#",i=e.split(n),o=/\\/g;i[0]=i[0].replace(o,"/"),e=i.join(n);var s=e;if(s=s.trim(),!r&&1===e.split("#").length){var u=d.exec(s);if(u)return this.path=s,this.href=s,this.pathname=u[1],u[2]?(this.search=u[2],this.query=t?T.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=h.exec(s);if(c){c=c[0];var f=c.toLowerCase();this.protocol=f,s=s.substr(c.length)}if(r||c||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===s.substr(0,2);!w||c&&z[c]||(s=s.substr(2),this.slashes=!0)}if(!z[c]&&(w||c&&!y[c])){for(var P=-1,x=0;x<b.length;x++){var D=s.indexOf(b[x]);-1!==D&&(-1===P||D<P)&&(P=D)}var U,C;C=-1===P?s.lastIndexOf("@"):s.lastIndexOf("@",P),-1!==C&&(U=s.slice(0,C),s=s.slice(C+1),this.auth=decodeURIComponent(U)),P=-1;for(var x=0;x<g.length;x++){var D=s.indexOf(g[x]);-1!==D&&(-1===P||D<P)&&(P=D)}-1===P&&(P=s.length),this.host=s.slice(0,P),s=s.slice(P),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var I=this.hostname.split(/\./),x=0,S=I.length;x<S;x++){var L=I[x];if(L&&!L.match(v)){for(var F="",N=0,O=L.length;N<O;N++)L.charCodeAt(N)>127?F+="x":F+=L[N];if(!F.match(v)){var A=I.slice(0,x),G=I.slice(x+1),q=L.match(k);q&&(A.push(q[1]),G.unshift(q[2])),G.length&&(s="/"+G.join(".")+s),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=l.toASCII(this.hostname));var M=this.port?":"+this.port:"",J=this.hostname||"";this.host=J+M,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!j[f])for(var x=0,S=m.length;x<S;x++){var V=m[x];if(-1!==s.indexOf(V)){var W=encodeURIComponent(V);W===V&&(W=escape(V)),s=s.split(V).join(W)}}var Q=s.indexOf("#");-1!==Q&&(this.hash=s.substr(Q),s=s.slice(0,Q));var B=s.indexOf("?");if(-1!==B?(this.search=s.substr(B),this.query=s.substr(B+1),t&&(this.query=T.parse(this.query)),s=s.slice(0,B)):t&&(this.search="",this.query={}),s&&(this.pathname=s),y[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",X=this.search||"";this.path=M+X}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname