From 789cf6e45db288f5636feb9b15643dda7cddc796 Mon Sep 17 00:00:00 2001 From: ronnyTodgers Date: Mon, 24 Jun 2024 14:13:40 +0000 Subject: [PATCH] Update gh-pages to output generated at 9269c64 --- js/harmony-export.js | 2 +- public/js/harmony-export.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 public/js/harmony-export.js diff --git a/js/harmony-export.js b/js/harmony-export.js index 5b9bba3..7a7e9f3 100644 --- a/js/harmony-export.js +++ b/js/harmony-export.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HarmonyExport=e():t.HarmonyExport=e()}(self,(()=>(()=>{"use strict";var t={113:(t,e,o)=>{o.r(e);const r="function"==typeof Buffer,n=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),a=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),A=((t=>{let e={};t.forEach(((t,o)=>e[t]=o))})(a),String.fromCharCode.bind(String)),i=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_"))),h="function"==typeof btoa?t=>btoa(t):r?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,o,r,n,A="";const i=t.length%3;for(let i=0;i255||(r=t.charCodeAt(i++))>255||(n=t.charCodeAt(i++))>255)throw new TypeError("invalid character found");e=o<<16|r<<8|n,A+=a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}return i?A.slice(0,i-3)+"===".substring(i):A},f=r?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let o=0,r=t.length;o{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?A(192|e>>>6)+A(128|63&e):A(224|e>>>12&15)+A(128|e>>>6&63)+A(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return A(240|e>>>18&7)+A(128|e>>>12&63)+A(128|e>>>6&63)+A(128|63&e)},l=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=r?t=>Buffer.from(t,"utf8").toString("base64"):n?t=>f(n.encode(t)):t=>h(t.replace(l,s)),c=(t,e=!1)=>e?i(g(t)):g(t);var d,u;t=o.hmd(t),d=void 0,u=function(){const t="https://harmony-staging.netlify.app/#/",e=({questions:e,instrument_name:o})=>{if(Array.isArray(e)&&e.length&&e.every((t=>("string"==typeof t||t instanceof String)&&t.question_text&&("string"==typeof t.question_text||t.question_text instanceof String)))){const r={instrument_name:o,questions:e.map(((t,e)=>({question_no:t.question_no||e,question_text:t.question_text||t})))};return t+"import/"+c(JSON.stringify(r),!0)}throw new Error("questions is not properly formatted - it must be an array of question texts, or an array of objects which each must have a question_text property")};class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`\n \n \n `}connectedCallback(){const t=JSON.parse(this.getAttribute("question_array")),o=(JSON.parse(this.getAttribute("instrument_name")),this.getAttribute("size")||"26px");try{const r=e(t);this.shadowRoot.getElementById("harmony-link").href=r,this.shadowRoot.getElementById("harmony-link").style.width=o,this.shadowRoot.getElementById("harmony-link").style.height=o}catch(t){this.shadowRoot.getElementById("harmony-link").text=t,this.shadowRoot.getElementById("harmony-link").classList.add="format-error"}}}return customElements.define("harmony-export",o),{createHarmonyUrl:e}},"object"==typeof exports?t.exports=u():"function"==typeof define&&o.amdO?define(u):(d="undefined"!=typeof globalThis?globalThis:d||self).MyDataSharingLib=u()}},e={};function o(r){var n=e[r];if(void 0!==n)return n.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r](a,a.exports,o),a.loaded=!0,a.exports}return o.amdO={},o.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(113)})())); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HarmonyExport=e():t.HarmonyExport=e()}(self,(()=>(()=>{"use strict";var t={113:(t,e,o)=>{o.r(e);const r="function"==typeof Buffer,n=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),a=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),s=((t=>{let e={};t.forEach(((t,o)=>e[t]=o))})(a),String.fromCharCode.bind(String)),i=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_"))),A="function"==typeof btoa?t=>btoa(t):r?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,o,r,n,s="";const i=t.length%3;for(let i=0;i255||(r=t.charCodeAt(i++))>255||(n=t.charCodeAt(i++))>255)throw new TypeError("invalid character found");e=o<<16|r<<8|n,s+=a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}return i?s.slice(0,i-3)+"===".substring(i):s},h=r?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let o=0,r=t.length;o{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?s(192|e>>>6)+s(128|63&e):s(224|e>>>12&15)+s(128|e>>>6&63)+s(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return s(240|e>>>18&7)+s(128|e>>>12&63)+s(128|e>>>6&63)+s(128|63&e)},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,u=r?t=>Buffer.from(t,"utf8").toString("base64"):n?t=>h(n.encode(t)):t=>A(t.replace(f,l)),g=(t,e=!1)=>e?i(u(t)):u(t);var c,d;t=o.hmd(t),c=void 0,d=function(){const t="https://harmonydata.ac.uk/app/#/",e=({questions:e,instrument_name:o})=>{if(Array.isArray(e)&&e.length&&e.every((t=>"string"==typeof t||t instanceof String||t.question_text&&("string"==typeof t.question_text||t.question_text instanceof String)))){const r={instrument_name:o,questions:e.map(((t,e)=>({question_no:t.question_no||e,question_text:t.question_text||t})))};return t+"import/"+g(JSON.stringify(r),!0)}throw new Error("questions is not properly formatted - it must be an array of question texts, or an array of objects which each must have a question_text property")};class o extends HTMLElement{constructor(){super(),this._questions=[],this._instrument_name="Imported Instrument",this._size="26px",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`\n \n \n `}get size(){return this._size}set size(t){this._size=t}get questions(){return this._questions}set questions(t){this._questions=t}get instrument_name(){return this._instrument_name}set instrument_name(t){this._instrument_name=t}connectedCallback(){let t;try{t=JSON.parse(this.getAttribute("questions")),Array.isArray(t)||(console.log("Could not parse question attibutes"),t=null)}catch(t){console.log("Could not parse question attibutes")}const o=this.getAttribute("instrument_name"),r=this.getAttribute("size")||this._size,n=t||this._questions,a=o||this._instrument_name;try{console.log("WCquestions",n),console.log("WClabel",a);const t=e({questions:n,instrument_name:a});console.log("WCurl",a),this.shadowRoot.getElementById("harmony-link").href=t,this.shadowRoot.getElementById("harmony-link").style.width=r,this.shadowRoot.getElementById("harmony-link").style.height=r}catch(t){this.shadowRoot.getElementById("harmony-link").text=t,this.shadowRoot.getElementById("harmony-link").classList.add="format-error"}}}return customElements.define("harmony-export",o),window.HarmonyExportComponent=o,window.createHarmonyUrl=e,{createHarmonyUrl:e,HarmonyExportComponent:o}},"object"==typeof exports?t.exports=d():"function"==typeof define&&o.amdO?define(d):(c="undefined"!=typeof globalThis?globalThis:c||self).HarmonyExport=d()}},e={};function o(r){var n=e[r];if(void 0!==n)return n.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r](a,a.exports,o),a.loaded=!0,a.exports}return o.amdO={},o.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(113)})())); \ No newline at end of file diff --git a/public/js/harmony-export.js b/public/js/harmony-export.js deleted file mode 100644 index 4bb902c..0000000 --- a/public/js/harmony-export.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HarmonyExport=e():t.HarmonyExport=e()}(self,(()=>(()=>{"use strict";var t={113:(t,e,o)=>{o.r(e);const r="function"==typeof Buffer,n=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),a=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),s=((t=>{let e={};t.forEach(((t,o)=>e[t]=o))})(a),String.fromCharCode.bind(String)),i=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_"))),A="function"==typeof btoa?t=>btoa(t):r?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,o,r,n,s="";const i=t.length%3;for(let i=0;i255||(r=t.charCodeAt(i++))>255||(n=t.charCodeAt(i++))>255)throw new TypeError("invalid character found");e=o<<16|r<<8|n,s+=a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}return i?s.slice(0,i-3)+"===".substring(i):s},h=r?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let o=0,r=t.length;o{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?s(192|e>>>6)+s(128|63&e):s(224|e>>>12&15)+s(128|e>>>6&63)+s(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return s(240|e>>>18&7)+s(128|e>>>12&63)+s(128|e>>>6&63)+s(128|63&e)},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,u=r?t=>Buffer.from(t,"utf8").toString("base64"):n?t=>h(n.encode(t)):t=>A(t.replace(f,l)),g=(t,e=!1)=>e?i(u(t)):u(t);var c,d;t=o.hmd(t),c=void 0,d=function(){const t="https://harmonydata.ac.uk/app/#/",e=({questions:e,instrument_name:o})=>{if(Array.isArray(e)&&e.length&&e.every((t=>"string"==typeof t||t instanceof String||t.question_text&&("string"==typeof t.question_text||t.question_text instanceof String)))){const r={instrument_name:o,questions:e.map(((t,e)=>({question_no:t.question_no||e,question_text:t.question_text||t})))};return t+"import/"+g(JSON.stringify(r),!0)}throw new Error("questions is not properly formatted - it must be an array of question texts, or an array of objects which each must have a question_text property")};class o extends HTMLElement{constructor(){super(),this._questions=[],this._instrument_name="Imported Instrument",this._size="26px",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`\n \n \n `}get size(){return this._size}set size(t){this._size=t}get questions(){return this._questions}set questions(t){this._questions=t}get instrument_name(){return this._instrument_name}set instrument_name(t){this._instrument_name=t}connectedCallback(){let t;try{t=JSON.parse(this.getAttribute("questions")),Array.isArray(t)||(console.log("Could not parse question attibutes"),t=null)}catch(t){console.log("Could not parse question attibutes")}const o=this.getAttribute("instrument_name"),r=this.getAttribute("size")||this._size,n=t||this._questions,a=o||this._instrument_name;try{console.log("WCquestions",n),console.log("WClabel",a);const t=e({questions:n,instrument_name:a});console.log("WCurl",a),this.shadowRoot.getElementById("harmony-link").href=t,this.shadowRoot.getElementById("harmony-link").style.width=r,this.shadowRoot.getElementById("harmony-link").style.height=r}catch(t){this.shadowRoot.getElementById("harmony-link").text=t,this.shadowRoot.getElementById("harmony-link").classList.add="format-error"}}}return customElements.define("harmony-export",o),window.HarmonyExportComponent=o,window.createHarmonyUrl=e,{createHarmonyUrl:e,HarmonyExportComponent:o}},"object"==typeof exports?t.exports=d():"function"==typeof define&&o.amdO?define(d):(c="undefined"!=typeof globalThis?globalThis:c||self).HarmonyExport=d()}},e={};function o(r){var n=e[r];if(void 0!==n)return n.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r](a,a.exports,o),a.loaded=!0,a.exports}return o.amdO={},o.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(113)})())); \ No newline at end of file