diff options
Diffstat (limited to 'js/vendor/vcard/dist/vcard.min.js')
-rw-r--r-- | js/vendor/vcard/dist/vcard.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/js/vendor/vcard/dist/vcard.min.js b/js/vendor/vcard/dist/vcard.min.js new file mode 100644 index 00000000..53337e11 --- /dev/null +++ b/js/vendor/vcard/dist/vcard.min.js @@ -0,0 +1 @@ +!function(e){function t(e){for(var t,n,a,f,i,u={},s=e.split(/\r\n|\r|\n/),c=s.length,p=0;c>p;p++)if(""!=s[p]&&s[p].toUpperCase()!=r&&s[p].toUpperCase()!=o){t=s[p].split(":"),n=t[0],a=t[1],i=!1,f={};var h=function(e){return c>e+1&&(" "==s[e+1][0]||" "==s[e+1][0])};if(h(p))for(;h(p);)a+=s[p+1].trim(),p++;if(n.match(/;/)){var l=n.split(";");n=l.shift(),l.forEach(function(e){var t=e.split("=");t[0]=t[0].toLowerCase(),f[t[0]]?f[t[0]].push(t[1]):f[t[0]]=[t[1]]})}if(a.match(/;/)&&(a=a.split(";")),n.match(/\./)){var v=n.split(".");n=v[1],i=v[0]}var m={value:a};Object.keys(f).length&&(m.meta=f),i&&(m.namespace=i),n=n.toLowerCase(),"undefined"==typeof u[n]?u[n]=[m]:u[n].push(m)}return u}function n(e,t){var n=[r],f="";return t&&!e.version&&(e.version=[{value:"3.0"}]),t&&!e.uid&&(e.uid=[{value:a()}]),Object.keys(e).forEach(function(t){e[t]&&"function"==typeof e[t].forEach&&e[t].forEach(function(e){if("undefined"!=typeof e.value)if(f="",e.namespace&&(f+=e.namespace+"."),f+=t.toUpperCase(),"object"==typeof e.meta&&Object.keys(e.meta).forEach(function(t){"function"==typeof e.meta[t].forEach&&e.meta[t].forEach(function(e){f+=";"+t.toUpperCase()+"="+e})}),f+=":",f+="string"==typeof e.value?e.value:e.value.join(";"),f.length>75){var r=f.substr(0,75),o=f.substr(75),a=o.match(/.{1,74}/g);n.push(r),a.forEach(function(e){n.push(" "+e)})}else n.push(f)})}),n.push(o),n.join("\r\n")}var r="BEGIN:VCARD",o="END:VCARD",a=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}();e.vCard={parse:t,generate:n}}("undefined"!=typeof window?window:module.exports);
\ No newline at end of file |