UNPKG

sparnatural

Version:

Visual client-side SPARQL query builder and knowledge graph exploration tool

2 lines 2.02 MB
/*! For license information please see sparnatural.js.LICENSE.txt */ (()=>{var e={6713:(e,t,r)=>{var{Buffer:i}=r(8764),n={},s=n.LEFT_BRACE=1,a=n.RIGHT_BRACE=2,o=n.LEFT_BRACKET=3,l=n.RIGHT_BRACKET=4,c=n.COLON=5,h=n.COMMA=6,u=n.TRUE=7,d=n.FALSE=8,p=n.NULL=9,f=n.STRING=10,g=n.NUMBER=11,m=n.START=17,_=n.STOP=18,y=n.TRUE1=33,b=n.TRUE2=34,v=n.TRUE3=35,w=n.FALSE1=49,E=n.FALSE2=50,x=n.FALSE3=51,S=n.FALSE4=52,T=n.NULL1=65,C=n.NULL2=66,L=n.NULL3=67,P=n.NUMBER1=81,k=n.NUMBER3=83,A=n.STRING1=97,I=n.STRING2=98,R=n.STRING3=99,O=n.STRING4=100,N=n.STRING5=101,D=n.STRING6=102,M=n.VALUE=113,j=n.KEY=114,B=n.OBJECT=129,F=n.ARRAY=130,q="\\".charCodeAt(0),V="/".charCodeAt(0),U="\b".charCodeAt(0),$="\f".charCodeAt(0),G="\n".charCodeAt(0),H="\r".charCodeAt(0),z="\t".charCodeAt(0),W=65536;function Y(e){return i.alloc?i.alloc(e):new i(e)}function Q(){this.tState=m,this.value=void 0,this.string=void 0,this.stringBuffer=Y(W),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=M,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:Y(2),3:Y(3),4:Y(4)},this.offset=-1}Q.toknam=function(e){for(var t=Object.keys(n),r=0,i=t.length;r<i;r++){var s=t[r];if(n[s]===e)return s}return e&&"0x"+e.toString(16)};var K=Q.prototype;K.onError=function(e){throw e},K.charError=function(e,t){this.tState=_,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(e[t]))+" at position "+t+" in state "+Q.toknam(this.tState)))},K.appendStringChar=function(e){this.stringBufferOffset>=W&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},K.appendStringBuf=function(e,t,r){var i=e.length;"number"==typeof t&&(i="number"==typeof r?r<0?e.length-t+r:r-t:e.length-t),i<0&&(i=0),this.stringBufferOffset+i>W&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,r),this.stringBufferOffset+=i},K.write=function(e){var t;"string"==typeof e&&(e=new i(e));for(var r=0,n=e.length;r<n;r++)if(this.tState===m){if(t=e[r],this.offset++,123===t)this.onToken(s,"{");else if(125===t)this.onToken(a,"}");else if(91===t)this.onToken(o,"[");else if(93===t)this.onToken(l,"]");else if(58===t)this.onToken(c,":");else if(44===t)this.onToken(h,",");else if(116===t)this.tState=y;else if(102===t)this.tState=w;else if(110===t)this.tState=T;else if(34===t)this.string="",this.stringBufferOffset=0,this.tState=A;else if(45===t)this.string="-",this.tState=P;else if(t>=48&&t<64)this.string=String.fromCharCode(t),this.tState=k;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,r)}else if(this.tState===A)if(t=e[r],this.bytes_remaining>0){for(var g=0;g<this.bytes_remaining;g++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+g]=e[g];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,r=r+g-1}else if(0===this.bytes_remaining&&t>=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+Q.toknam(this.tState)));if(t>=194&&t<=223&&(this.bytes_in_sequence=2),t>=224&&t<=239&&(this.bytes_in_sequence=3),t>=240&&t<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>e.length){for(var _=0;_<=e.length-1-r;_++)this.temp_buffs[this.bytes_in_sequence][_]=e[r+_];this.bytes_remaining=r+this.bytes_in_sequence-e.length,r=e.length-1}else this.appendStringBuf(e,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(34===t)this.tState=m,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(f,this.string),this.offset+=i.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=I;else{if(!(t>=32))return this.charError(e,r);this.appendStringChar(t)}else if(this.tState===I)if(34===(t=e[r]))this.appendStringChar(t),this.tState=A;else if(92===t)this.appendStringChar(q),this.tState=A;else if(47===t)this.appendStringChar(V),this.tState=A;else if(98===t)this.appendStringChar(U),this.tState=A;else if(102===t)this.appendStringChar($),this.tState=A;else if(110===t)this.appendStringChar(G),this.tState=A;else if(114===t)this.appendStringChar(H),this.tState=A;else if(116===t)this.appendStringChar(z),this.tState=A;else{if(117!==t)return this.charError(e,r);this.unicode="",this.tState=R}else if(this.tState===R||this.tState===O||this.tState===N||this.tState===D){if(!((t=e[r])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,r);if(this.unicode+=String.fromCharCode(t),this.tState++===D){var M=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&M>=56320&&M<57344?(this.appendStringBuf(new i(String.fromCharCode(this.highSurrogate,M))),this.highSurrogate=void 0):void 0===this.highSurrogate&&M>=55296&&M<56320?this.highSurrogate=M:(void 0!==this.highSurrogate&&(this.appendStringBuf(new i(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new i(String.fromCharCode(M)))),this.tState=A}}else if(this.tState===P||this.tState===k)switch(t=e[r]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(t),this.tState=k;break;default:this.tState=m;var j=this.numberReviver(this.string,e,r);if(j)return j;this.offset+=this.string.length-1,this.string=void 0,r--}else if(this.tState===y){if(114!==e[r])return this.charError(e,r);this.tState=b}else if(this.tState===b){if(117!==e[r])return this.charError(e,r);this.tState=v}else if(this.tState===v){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(u,!0),this.offset+=3}else if(this.tState===w){if(97!==e[r])return this.charError(e,r);this.tState=E}else if(this.tState===E){if(108!==e[r])return this.charError(e,r);this.tState=x}else if(this.tState===x){if(115!==e[r])return this.charError(e,r);this.tState=S}else if(this.tState===S){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(d,!1),this.offset+=4}else if(this.tState===T){if(117!==e[r])return this.charError(e,r);this.tState=C}else if(this.tState===C){if(108!==e[r])return this.charError(e,r);this.tState=L}else if(this.tState===L){if(108!==e[r])return this.charError(e,r);this.tState=m,this.onToken(p,null),this.offset+=3}},K.onToken=function(e,t){},K.parseError=function(e,t){this.tState=_,this.onError(new Error("Unexpected "+Q.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+Q.toknam(this.state)))},K.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},K.pop=function(){var e=this.value,t=this.stack.pop();this.value=t.value,this.key=t.key,this.mode=t.mode,this.emit(e),this.mode||(this.state=M)},K.emit=function(e){this.mode&&(this.state=h),this.onValue(e)},K.onValue=function(e){},K.onToken=function(e,t){if(this.state===M)if(e===f||e===g||e===u||e===d||e===p)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===s)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=j,this.mode=B;else if(e===o)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=F,this.state=M;else if(e===a){if(this.mode!==B)return this.parseError(e,t);this.pop()}else{if(e!==l)return this.parseError(e,t);if(this.mode!==F)return this.parseError(e,t);this.pop()}else if(this.state===j)if(e===f)this.key=t,this.state=c;else{if(e!==a)return this.parseError(e,t);this.pop()}else if(this.state===c){if(e!==c)return this.parseError(e,t);this.state=M}else{if(this.state!==h)return this.parseError(e,t);if(e===h)this.mode===F?(this.key++,this.state=M):this.mode===B&&(this.state=j);else{if(!(e===l&&this.mode===F||e===a&&this.mode===B))return this.parseError(e,t);this.pop()}}},K.numberReviver=function(e,t,r){var i=Number(e);if(isNaN(i))return this.charError(t,r);e.match(/[0-9]+/)==e&&i.toString()!=e?this.onToken(f,e):this.onToken(g,i)},Q.C=n,e.exports=Q},8778:function(e,t,r){!function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e=e&&e.hasOwnProperty("default")?e.default:e;var i={autoShow:!1,autoHide:!1,autoPick:!1,inline:!1,container:null,trigger:null,language:"",format:"mm/dd/yyyy",date:null,startDate:null,endDate:null,startView:0,weekStart:0,yearFirst:!1,yearSuffix:"",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],itemTag:"li",mutedClass:"muted",pickedClass:"picked",disabledClass:"disabled",highlightedClass:"highlighted",template:'<div class="datepicker-container"><div class="datepicker-panel" data-view="years picker"><ul><li data-view="years prev">&lsaquo;</li><li data-view="years current"></li><li data-view="years next">&rsaquo;</li></ul><ul data-view="years"></ul></div><div class="datepicker-panel" data-view="months picker"><ul><li data-view="year prev">&lsaquo;</li><li data-view="year current"></li><li data-view="year next">&rsaquo;</li></ul><ul data-view="months"></ul></div><div class="datepicker-panel" data-view="days picker"><ul><li data-view="month prev">&lsaquo;</li><li data-view="month current"></li><li data-view="month next">&rsaquo;</li></ul><ul data-view="week"></ul><ul data-view="days"></ul></div></div>',offset:10,zIndex:1e3,filter:null,show:null,hide:null,pick:null},n="undefined"!=typeof window,s=n?window:{},a=!!n&&"ontouchstart"in s.document.documentElement,o="datepicker",l="click.".concat(o),c="focus.".concat(o),h="hide.".concat(o),u="keyup.".concat(o),d="pick.".concat(o),p="resize.".concat(o),f="scroll.".concat(o),g="show.".concat(o),m="touchstart.".concat(o),_="".concat(o,"-hide"),y={},b=0,v=1,w=2,E=Object.prototype.toString;function x(e){return"string"==typeof e}var S=Number.isNaN||s.isNaN;function T(e){return"number"==typeof e&&!S(e)}function C(e){return void 0===e}function L(e){return"date"===(t=e,E.call(t).slice(8,-1).toLowerCase())&&!S(e.getTime());var t}function P(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return e.apply(t,i.concat(n))}}function k(e){return'[data-view="'.concat(e,'"]')}function A(e){return e%4==0&&e%100!=0||e%400==0}function I(e,t){return[31,A(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]}function R(e,t,r){return Math.min(r,I(e,t))}var O=/(y|m|d)+/g;function N(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e(t),n=i.css("position"),s="absolute"===n,a=r?/auto|scroll|hidden/:/auto|scroll/,o=i.parents().filter((function(t,r){var i=e(r);return(!s||"static"!==i.css("position"))&&a.test(i.css("overflow")+i.css("overflow-y")+i.css("overflow-x"))})).eq(0);return"fixed"!==n&&o.length?o:e(t.ownerDocument||document)}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=String(Math.abs(e)),i=r.length,n="";for(e<0&&(n+="-");i<t;)i+=1,n+="0";return n+r}var M=/\d+/g,j={show:function(){this.built||this.build(),this.shown||this.trigger(g).isDefaultPrevented()||(this.shown=!0,this.$picker.removeClass(_).on(l,e.proxy(this.click,this)),this.showView(this.options.startView),this.inline||(this.$scrollParent.on(f,e.proxy(this.place,this)),e(window).on(p,this.onResize=P(this.place,this)),e(document).on(l,this.onGlobalClick=P(this.globalClick,this)),e(document).on(u,this.onGlobalKeyup=P(this.globalKeyup,this)),a&&e(document).on(m,this.onTouchStart=P(this.touchstart,this)),this.place()))},hide:function(){this.shown&&(this.trigger(h).isDefaultPrevented()||(this.shown=!1,this.$picker.addClass(_).off(l,this.click),this.inline||(this.$scrollParent.off(f,this.place),e(window).off(p,this.onResize),e(document).off(l,this.onGlobalClick),e(document).off(u,this.onGlobalKeyup),a&&e(document).off(m,this.onTouchStart))))},toggle:function(){this.shown?this.hide():this.show()},update:function(){var e=this.getValue();e!==this.oldValue&&(this.setDate(e,!0),this.oldValue=e)},pick:function(e){var t=this.$element,r=this.date;this.trigger(d,{view:e||"",date:r}).isDefaultPrevented()||(r=this.formatDate(this.date),this.setValue(r),this.isInput&&(t.trigger("input"),t.trigger("change")))},reset:function(){this.setDate(this.initialDate,!0),this.setValue(this.initialValue),this.shown&&this.showView(this.options.startView)},getMonthName:function(t,r){var i=this.options,n=i.monthsShort,s=i.months;return e.isNumeric(t)?t=Number(t):C(r)&&(r=t),!0===r&&(s=n),s[T(t)?t:this.date.getMonth()]},getDayName:function(t,r,i){var n=this.options,s=n.days;return e.isNumeric(t)?t=Number(t):(C(i)&&(i=r),C(r)&&(r=t)),i?s=n.daysMin:r&&(s=n.daysShort),s[T(t)?t:this.date.getDay()]},getDate:function(e){var t=this.date;return e?this.formatDate(t):new Date(t)},setDate:function(t,r){var i=this.options.filter;if(L(t)||x(t)){if(t=this.parseDate(t),e.isFunction(i)&&!1===i.call(this.$element,t,"day"))return;this.date=t,this.viewDate=new Date(t),r||this.pick(),this.built&&this.render()}},setStartDate:function(e){L(e)||x(e)?this.startDate=this.parseDate(e):this.startDate=null,this.built&&this.render()},setEndDate:function(e){L(e)||x(e)?this.endDate=this.parseDate(e):this.endDate=null,this.built&&this.render()},parseDate:function(t){var r=this.format,i=[];return L(t)||(x(t)&&(i=t.match(M)||[]),L(t=t?new Date(t):new Date)||(t=new Date),i.length===r.parts.length&&(e.each(i,(function(e,i){var n=parseInt(i,10);switch(r.parts[e]){case"yy":t.setFullYear(2e3+n);break;case"yyyy":t.setFullYear(2===i.length?2e3+n:n);break;case"mm":case"m":t.setMonth(n-1)}})),e.each(i,(function(e,i){var n=parseInt(i,10);switch(r.parts[e]){case"dd":case"d":t.setDate(n)}})))),new Date(t.getFullYear(),t.getMonth(),t.getDate())},formatDate:function(t){var r=this.format,i="";if(L(t)){var n=t.getFullYear(),s=t.getMonth(),a=t.getDate(),o={d:a,dd:D(a,2),m:s+1,mm:D(s+1,2),yy:String(n).substring(2),yyyy:D(n,4)};i=r.source,e.each(r.parts,(function(e,t){i=i.replace(t,o[t])}))}return i},destroy:function(){this.unbind(),this.unbuild(),this.$element.removeData(o)}},B={click:function(t){var r=e(t.target),i=this.options,n=this.date,s=this.viewDate,a=this.format;if(t.stopPropagation(),t.preventDefault(),!r.hasClass("disabled")){var o=r.data("view"),l=s.getFullYear(),c=s.getMonth(),h=s.getDate();switch(o){case"years prev":case"years next":l="years prev"===o?l-10:l+10,s.setFullYear(l),s.setDate(R(l,c,h)),this.renderYears();break;case"year prev":case"year next":l="year prev"===o?l-1:l+1,s.setFullYear(l),s.setDate(R(l,c,h)),this.renderMonths();break;case"year current":a.hasYear&&this.showView(w);break;case"year picked":a.hasMonth?this.showView(v):(r.siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","year"),this.hideView()),this.pick("year");break;case"year":l=parseInt(r.text(),10),n.setDate(R(l,c,h)),n.setFullYear(l),s.setDate(R(l,c,h)),s.setFullYear(l),a.hasMonth?this.showView(v):(r.addClass(i.pickedClass).data("view","year picked").siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","year"),this.hideView()),this.pick("year");break;case"month prev":case"month next":(c="month prev"===o?c-1:c+1)<0?(l-=1,c+=12):c>11&&(l+=1,c-=12),s.setFullYear(l),s.setDate(R(l,c,h)),s.setMonth(c),this.renderDays();break;case"month current":a.hasMonth&&this.showView(v);break;case"month picked":a.hasDay?this.showView(b):(r.siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","month"),this.hideView()),this.pick("month");break;case"month":c=e.inArray(r.text(),i.monthsShort),n.setFullYear(l),n.setDate(R(l,c,h)),n.setMonth(c),s.setFullYear(l),s.setDate(R(l,c,h)),s.setMonth(c),a.hasDay?this.showView(b):(r.addClass(i.pickedClass).data("view","month picked").siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","month"),this.hideView()),this.pick("month");break;case"day prev":case"day next":case"day":"day prev"===o?c-=1:"day next"===o&&(c+=1),h=parseInt(r.text(),10),n.setDate(1),n.setFullYear(l),n.setMonth(c),n.setDate(h),s.setDate(1),s.setFullYear(l),s.setMonth(c),s.setDate(h),this.renderDays(),"day"===o&&this.hideView(),this.pick("day");break;case"day picked":this.hideView(),this.pick("day")}}},globalClick:function(e){for(var t=e.target,r=this.element,i=this.$trigger[0],n=!0;t!==document;){if(t===i||t===r){n=!1;break}t=t.parentNode}n&&this.hide()},keyup:function(){this.update()},globalKeyup:function(e){var t=e.target,r=e.key,i=e.keyCode;this.isInput&&t!==this.element&&this.shown&&("Tab"===r||9===i)&&this.hide()},touchstart:function(t){var r=t.target;this.isInput&&r!==this.element&&!e.contains(this.$picker[0],r)&&(this.hide(),this.element.blur())}},F={render:function(){this.renderYears(),this.renderMonths(),this.renderDays()},renderWeek:function(){var t=this,r=[],i=this.options,n=i.weekStart,s=i.daysMin;n=parseInt(n,10)%7,s=s.slice(n).concat(s.slice(0,n)),e.each(s,(function(e,i){r.push(t.createItem({text:i}))})),this.$week.html(r.join(""))},renderYears:function(){var e,t=this.options,r=this.startDate,i=this.endDate,n=t.disabledClass,s=t.filter,a=t.yearSuffix,o=this.viewDate.getFullYear(),l=(new Date).getFullYear(),c=this.date.getFullYear(),h=[],u=!1,d=!1;for(e=-5;e<=6;e+=1){var p=new Date(o+e,1,1),f=!1;r&&(f=p.getFullYear()<r.getFullYear(),-5===e&&(u=f)),!f&&i&&(f=p.getFullYear()>i.getFullYear(),6===e&&(d=f)),!f&&s&&(f=!1===s.call(this.$element,p,"year"));var g=o+e===c,m=g?"year picked":"year";h.push(this.createItem({picked:g,disabled:f,text:o+e,view:f?"year disabled":m,highlighted:p.getFullYear()===l}))}this.$yearsPrev.toggleClass(n,u),this.$yearsNext.toggleClass(n,d),this.$yearsCurrent.toggleClass(n,!0).html("".concat(o+-5+a," - ").concat(o+6).concat(a)),this.$years.html(h.join(""))},renderMonths:function(){var t,r=this.options,i=this.startDate,n=this.endDate,s=this.viewDate,a=r.disabledClass||"",o=r.monthsShort,l=e.isFunction(r.filter)&&r.filter,c=s.getFullYear(),h=new Date,u=h.getFullYear(),d=h.getMonth(),p=this.date.getFullYear(),f=this.date.getMonth(),g=[],m=!1,_=!1;for(t=0;t<=11;t+=1){var y=new Date(c,t,1),b=!1;i&&(b=(m=y.getFullYear()===i.getFullYear())&&y.getMonth()<i.getMonth()),!b&&n&&(b=(_=y.getFullYear()===n.getFullYear())&&y.getMonth()>n.getMonth()),!b&&l&&(b=!1===l.call(this.$element,y,"month"));var v=c===p&&t===f,w=v?"month picked":"month";g.push(this.createItem({disabled:b,picked:v,highlighted:c===u&&y.getMonth()===d,index:t,text:o[t],view:b?"month disabled":w}))}this.$yearPrev.toggleClass(a,m),this.$yearNext.toggleClass(a,_),this.$yearCurrent.toggleClass(a,m&&_).html(c+r.yearSuffix||""),this.$months.html(g.join(""))},renderDays:function(){var e,t,r,i=this.$element,n=this.options,s=this.startDate,a=this.endDate,o=this.viewDate,l=this.date,c=n.disabledClass,h=n.filter,u=n.months,d=n.weekStart,p=n.yearSuffix,f=o.getFullYear(),g=o.getMonth(),m=new Date,_=m.getFullYear(),y=m.getMonth(),b=m.getDate(),v=l.getFullYear(),w=l.getMonth(),E=l.getDate(),x=[],S=f,T=g,C=!1;0===g?(S-=1,T=11):T-=1,e=I(S,T);var L=new Date(f,g,1);for((r=L.getDay()-parseInt(d,10)%7)<=0&&(r+=7),s&&(C=L.getTime()<=s.getTime()),t=e-(r-1);t<=e;t+=1){var P=new Date(S,T,t),k=!1;s&&(k=P.getTime()<s.getTime()),!k&&h&&(k=!1===h.call(i,P,"day")),x.push(this.createItem({disabled:k,highlighted:S===_&&T===y&&P.getDate()===b,muted:!0,picked:S===v&&T===w&&t===E,text:t,view:"day prev"}))}var A=[],R=f,O=g,N=!1;11===g?(R+=1,O=0):O+=1,e=I(f,g),r=42-(x.length+e);var D=new Date(f,g,e);for(a&&(N=D.getTime()>=a.getTime()),t=1;t<=r;t+=1){var M=new Date(R,O,t),j=R===v&&O===w&&t===E,B=!1;a&&(B=M.getTime()>a.getTime()),!B&&h&&(B=!1===h.call(i,M,"day")),A.push(this.createItem({disabled:B,picked:j,highlighted:R===_&&O===y&&M.getDate()===b,muted:!0,text:t,view:"day next"}))}var F=[];for(t=1;t<=e;t+=1){var q=new Date(f,g,t),V=!1;s&&(V=q.getTime()<s.getTime()),!V&&a&&(V=q.getTime()>a.getTime()),!V&&h&&(V=!1===h.call(i,q,"day"));var U=f===v&&g===w&&t===E,$=U?"day picked":"day";F.push(this.createItem({disabled:V,picked:U,highlighted:f===_&&g===y&&q.getDate()===b,text:t,view:V?"day disabled":$}))}this.$monthPrev.toggleClass(c,C),this.$monthNext.toggleClass(c,N),this.$monthCurrent.toggleClass(c,C&&N).html(n.yearFirst?"".concat(f+p," ").concat(u[g]):"".concat(u[g]," ").concat(f).concat(p)),this.$days.html(x.join("")+F.join("")+A.join(""))}},q="".concat(o,"-top-left"),V="".concat(o,"-top-right"),U="".concat(o,"-bottom-left"),$="".concat(o,"-bottom-right"),G=[q,V,U,$].join(" "),H=function(){function n(r){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,n),this.$element=e(r),this.element=r,this.options=e.extend({},i,y[s.language],e.isPlainObject(s)&&s),this.$scrollParent=N(r,!0),this.built=!1,this.shown=!1,this.isInput=!1,this.inline=!1,this.initialValue="",this.initialDate=null,this.startDate=null,this.endDate=null,this.init()}return s=n,a=[{key:"init",value:function(){var t=this.$element,r=this.options,i=r.startDate,n=r.endDate,s=r.date;this.$trigger=e(r.trigger),this.isInput=t.is("input")||t.is("textarea"),this.inline=r.inline&&(r.container||!this.isInput),this.format=function(t){var r=String(t).toLowerCase(),i=r.match(O);if(!i||0===i.length)throw new Error("Invalid date format.");return t={source:r,parts:i},e.each(i,(function(e,r){switch(r){case"dd":case"d":t.hasDay=!0;break;case"mm":case"m":t.hasMonth=!0;break;case"yyyy":case"yy":t.hasYear=!0}})),t}(r.format);var a=this.getValue();this.initialValue=a,this.oldValue=a,s=this.parseDate(s||a),i&&(i=this.parseDate(i),s.getTime()<i.getTime()&&(s=new Date(i)),this.startDate=i),n&&(n=this.parseDate(n),i&&n.getTime()<i.getTime()&&(n=new Date(i)),s.getTime()>n.getTime()&&(s=new Date(n)),this.endDate=n),this.date=s,this.viewDate=new Date(s),this.initialDate=new Date(this.date),this.bind(),(r.autoShow||this.inline)&&this.show(),r.autoPick&&this.pick()}},{key:"build",value:function(){if(!this.built){this.built=!0;var t=this.$element,r=this.options,i=e(r.template);this.$picker=i,this.$week=i.find(k("week")),this.$yearsPicker=i.find(k("years picker")),this.$yearsPrev=i.find(k("years prev")),this.$yearsNext=i.find(k("years next")),this.$yearsCurrent=i.find(k("years current")),this.$years=i.find(k("years")),this.$monthsPicker=i.find(k("months picker")),this.$yearPrev=i.find(k("year prev")),this.$yearNext=i.find(k("year next")),this.$yearCurrent=i.find(k("year current")),this.$months=i.find(k("months")),this.$daysPicker=i.find(k("days picker")),this.$monthPrev=i.find(k("month prev")),this.$monthNext=i.find(k("month next")),this.$monthCurrent=i.find(k("month current")),this.$days=i.find(k("days")),this.inline?e(r.container||t).append(i.addClass("".concat(o,"-inline"))):(e(document.body).append(i.addClass("".concat(o,"-dropdown"))),i.addClass(_).css({zIndex:parseInt(r.zIndex,10)})),this.renderWeek()}}},{key:"unbuild",value:function(){this.built&&(this.built=!1,this.$picker.remove())}},{key:"bind",value:function(){var t=this.options,r=this.$element;e.isFunction(t.show)&&r.on(g,t.show),e.isFunction(t.hide)&&r.on(h,t.hide),e.isFunction(t.pick)&&r.on(d,t.pick),this.isInput&&r.on(u,e.proxy(this.keyup,this)),this.inline||(t.trigger?this.$trigger.on(l,e.proxy(this.toggle,this)):this.isInput?r.on(c,e.proxy(this.show,this)):r.on(l,e.proxy(this.show,this)))}},{key:"unbind",value:function(){var t=this.$element,r=this.options;e.isFunction(r.show)&&t.off(g,r.show),e.isFunction(r.hide)&&t.off(h,r.hide),e.isFunction(r.pick)&&t.off(d,r.pick),this.isInput&&t.off(u,this.keyup),this.inline||(r.trigger?this.$trigger.off(l,this.toggle):this.isInput?t.off(c,this.show):t.off(l,this.show))}},{key:"showView",value:function(e){var t=this.$yearsPicker,r=this.$monthsPicker,i=this.$daysPicker,n=this.format;if(n.hasYear||n.hasMonth||n.hasDay)switch(Number(e)){case w:r.addClass(_),i.addClass(_),n.hasYear?(this.renderYears(),t.removeClass(_),this.place()):this.showView(b);break;case v:t.addClass(_),i.addClass(_),n.hasMonth?(this.renderMonths(),r.removeClass(_),this.place()):this.showView(w);break;default:t.addClass(_),r.addClass(_),n.hasDay?(this.renderDays(),i.removeClass(_),this.place()):this.showView(v)}}},{key:"hideView",value:function(){!this.inline&&this.options.autoHide&&this.hide()}},{key:"place",value:function(){if(!this.inline){var t=this.$element,r=this.options,i=this.$picker,n=e(document).outerWidth(),s=e(document).outerHeight(),a=t.outerWidth(),o=t.outerHeight(),l=i.width(),c=i.height(),h=t.offset(),u=h.left,d=h.top,p=parseFloat(r.offset),f=q;S(p)&&(p=10),d>c&&d+o+c>s?(d-=c+p,f=U):d+=o+p,u+l>n&&(u+=a-l,f=f.replace("left","right")),i.removeClass(G).addClass(f).css({top:d,left:u})}}},{key:"trigger",value:function(t,r){var i=e.Event(t,r);return this.$element.trigger(i),i}},{key:"createItem",value:function(t){var r=this.options,i=r.itemTag,n={text:"",view:"",muted:!1,picked:!1,disabled:!1,highlighted:!1},s=[];return e.extend(n,t),n.muted&&s.push(r.mutedClass),n.highlighted&&s.push(r.highlightedClass),n.picked&&s.push(r.pickedClass),n.disabled&&s.push(r.disabledClass),"<".concat(i,' class="').concat(s.join(" "),'" data-view="').concat(n.view,'">').concat(n.text,"</").concat(i,">")}},{key:"getValue",value:function(){var e=this.$element;return this.isInput?e.val():e.text()}},{key:"setValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.$element;this.isInput?t.val(e):this.inline&&!this.options.container||t.text(e)}}],p=[{key:"setDefaults",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.extend(i,y[t.language],e.isPlainObject(t)&&t)}}],a&&r(s.prototype,a),p&&r(s,p),n;var s,a,p}();if(e.extend&&e.extend(H.prototype,F,B,j),e.fn){var z=e.fn.datepicker;e.fn.datepicker=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];var s;return this.each((function(r,n){var a=e(n),l="destroy"===t,c=a.data(o);if(!c){if(l)return;var h=e.extend({},a.data(),e.isPlainObject(t)&&t);c=new H(n,h),a.data(o,c)}if(x(t)){var u=c[t];e.isFunction(u)&&(s=u.apply(c,i),l&&a.removeData(o))}})),C(s)?this:s},e.fn.datepicker.Constructor=H,e.fn.datepicker.languages=y,e.fn.datepicker.setDefaults=H.setDefaults,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=z,this}}}(r(9755))},6527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTyped=void 0;const i=r(1890);class n extends i.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const t=e;return{handle:await this.runHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.getMediaTypes(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.getMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(e){if("handle"in e){const t=e;return{handle:await this.testHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.testMediaType(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.testMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}}t.ActorAbstractMediaTyped=n},1775:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTypedFixed=void 0;const i=r(6527);class n extends i.ActorAbstractMediaTyped{constructor(e){super(e);const t=this.priorityScale||0===this.priorityScale?this.priorityScale:1;this.mediaTypePriorities&&Object.entries(this.mediaTypePriorities).forEach((([e,r],i)=>{this.mediaTypePriorities[e]=t*r})),this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,t,r){if(!t||!(t in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e,r)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}t.ActorAbstractMediaTypedFixed=n},9737:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6527),t),n(r(1775),t)},5634:(e,t,r)=>{"use strict";var i=r(4155);Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpFetch=void 0;const n=r(2319),s=r(8199);r(1905);const a=r(9612);class o extends n.ActorHttp{constructor(e){super(e),this.userAgent=o.createUserAgent(),this.fetchInitPreprocessor=new a.FetchInitPreprocessor(e.agentOptions)}static createUserAgent(){return`Comunica/actor-http-fetch (${void 0===globalThis.navigator?`Node.js ${i.version}; ${i.platform}`:`Browser-${globalThis.navigator.userAgent}`})`}async test(e){return{time:Number.POSITIVE_INFINITY}}static async getResponse(e,t,r,i,n,s){let a,o=i+1;for(;o-- >0;)try{const i=await e(t,r);if(s&&i.status>=500&&i.status<600)throw new Error(`Server replied with response code ${i.status}: ${i.statusText}`);return i}catch(e){if(a=e,r.signal?.aborted)throw e;o>0&&await new Promise(((e,t)=>{setTimeout(e,n),r.signal?.addEventListener("abort",(()=>{t(new Error("Fetch aborted by timeout."))}))}))}throw i>0?new Error(`Number of fetch retries (${i}) exceeded. Last error: ${String(a)}`):a}async run(e){const t=e.init?.headers??{};e.init=e.init??{},e.init.headers=new Headers(t),e.init.headers.has("user-agent")||e.init.headers.append("user-agent",this.userAgent);const r=e.context.get(s.KeysHttp.auth);r&&e.init.headers.append("Authorization",`Basic ${Buffer.from(r).toString("base64")}`),this.logInfo(e.context,`Requesting ${"string"==typeof e.input?e.input:e.input.url}`,(()=>({headers:n.ActorHttp.headersToHash(new Headers(e.init.headers)),method:e.init.method||"GET"}))),e.init?.headers&&"append"in e.init.headers&&e.context.has(s.KeysHttp.fetch)&&(e.init.headers=n.ActorHttp.headersToHash(e.init.headers));let i={...e.init};e.context.get(s.KeysHttp.includeCredentials)&&(i.credentials="include");const a=e.context?.get(s.KeysHttp.httpTimeout);let l,c;if(void 0!==a){const e=await this.fetchInitPreprocessor.createAbortController();i.signal=e.signal,c=()=>e.abort(),l=setTimeout((()=>c()),a)}try{i=await this.fetchInitPreprocessor.handle(i);const t=e.context?.get(s.KeysHttp.httpRetryCount)??0,r=e.context?.get(s.KeysHttp.httpRetryDelay)??0,n=e.context?.get(s.KeysHttp.httpRetryOnServerError)??!1,a=e.context?.get(s.KeysHttp.fetch),h=await o.getResponse(a||fetch,e.input,i,t,r,n);return void 0!==l&&(e.context?.get(s.KeysHttp.httpBodyTimeout)&&h.body?(c=()=>h.body?.cancel(new Error(`HTTP timeout when reading the body of ${h.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`)),h.body.on("close",(()=>{clearTimeout(l)}))):clearTimeout(l)),h.body&&!h.body.cancel&&(h.body.cancel=async e=>{h.body.destroy(e),void 0!==l&&clearTimeout(l)}),h}catch(e){throw void 0!==l&&clearTimeout(l),e}}}t.ActorHttpFetch=o},9612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchInitPreprocessor=void 0;const i=r(2319);t.FetchInitPreprocessor=class{async handle(e){if(e.headers){const t=new Headers(e.headers);t.has("user-agent")&&t.delete("user-agent"),e.headers=t}if(e?.headers&&"append"in e.headers&&(e.headers=i.ActorHttp.headersToHash(e.headers)),e.body&&"string"!=typeof e.body&&"getReader"in e.body){const t=e.body.getReader(),r=[];for(;;){const{done:e,value:i}=await t.read();if(e)break;r.push(i)}e.body=r.join("")}return{keepalive:!e.body,...e}}async createAbortController(){return new AbortController}}},6845:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5634),t)},7862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpProxy=void 0;const i=r(2319),n=r(8199);class s extends i.ActorHttp{constructor(e){super(e)}async test(e){const t=e.context.get(n.KeysHttpProxy.httpProxyHandler);if(!t)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await t.getProxy(e))throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);return{time:Number.POSITIVE_INFINITY}}async run(e){const t="string"==typeof e.input?e.input:e.input.url,r=e.context.get(n.KeysHttpProxy.httpProxyHandler),i=await this.mediatorHttp.mediate({...await r.getProxy(e),context:e.context.delete(n.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(i,"url",{configurable:!0,enumerable:!0,get:()=>i.headers.get("x-final-url")??t}),i}}t.ActorHttpProxy=s},1270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyHandlerStatic=void 0,t.ProxyHandlerStatic=class{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return"string"==typeof e?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}},4020:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7862),t),n(r(1270),t)},4292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlMicrodata=void 0;const i=r(6913),n=r(8793);class s extends i.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(e.headers?e.headers.get("content-type"):null)?.includes("xml"),r=new n.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:t});r.on("error",e.error),r.on("data",e.emit);const i=r.onEnd;return r.onEnd=()=>{i.call(r),e.end()},{htmlParseListener:r}}}t.ActorRdfParseHtmlMicrodata=s},4252:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4292),t)},8561:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlRdfa=void 0;const i=r(6913),n=r(494);class s extends i.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=(e.headers&&e.headers.get("content-language"))??void 0,i=t&&t.includes("xml")?"xhtml":"html",s=new n.RdfaParser({baseIRI:e.baseIRI,profile:i,language:r});s.on("error",e.error),s.on("data",e.emit);const a=s.onEnd;return s.onEnd=()=>{a.call(s),e.end()},{htmlParseListener:s}}}t.ActorRdfParseHtmlRdfa=s},9118:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8561),t)},6104:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlScript=void 0;const i=r(6913),n=r(5084);class s extends i.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new n.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,t,e.context,e.baseIRI,e.headers)}}}t.ActorRdfParseHtmlScript=s},5084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlScriptListener=void 0;const i=r(8199),n=r(9827),s=r(8912);class a{constructor(e,t,r,n,s,a,o,l){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=t,this.cbError=r,this.cbEnd=n,this.supportedTypes=s,this.context=a.set(i.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=o,this.headers=l,this.onlyFirstScript=!1===a.get(i.KeysRdfParseHtmlScript.extractAllScripts);const c=this.baseIRI.indexOf("#");this.targetScriptId=c>0?this.baseIRI.slice(c+1,this.baseIRI.length):null}static newErrorCoded(e,t){const r=new Error(e);return r.code=t,r}onEnd(){0==--this.endBarrier&&(this.textChunksJsonLd.length>0?(this.handleMediaType="application/ld+json",this.textChunks=this.textChunksJsonLd,this.textChunks.push("]"),this.textChunksJsonLd=[],this.isFinalJsonLdProcessing=!0,this.endBarrier++,this.onTagClose()):(0===this.passedScripts&&this.targetScriptId&&this.cbError(a.newErrorCoded(`Failed to find targeted script id "${this.targetScriptId}"`,"loading document failed")),this.cbEnd()),this.isFinalJsonLdProcessing=!1)}onTagClose(){if(this.handleMediaType)if(this.requiresCustomJsonLdHandling(this.handleMediaType)&&!this.isFinalJsonLdProcessing)this.handleMediaType=void 0,this.textChunks=void 0,this.onEnd();else{const e=new n.Readable({objectMode:!0});e._read=()=>{};const t=this.textChunks,r={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(r).then((({handle:r})=>{r.data.on("error",(e=>this.cbError(a.newErrorCoded(e.message,"invalid script element")))).on("data",this.cbQuad).on("end",(()=>this.onEnd()));for(const r of t)e.push(r);e.push(null)})).catch((e=>{this.targetScriptId?this.cbError(a.newErrorCoded(e.message,"loading document failed")):this.onEnd()})),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,t){"base"===e&&t.href&&(this.baseIRI=(0,s.resolve)(t.href,this.baseIRI)),"script"!==e||this.targetScriptId&&t.id!==this.targetScriptId?this.handleMediaType=void 0:this.supportedTypes[t.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=t.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(0===this.textChunks.length?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(a.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed"))}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&"application/ld+json"===e}}t.HtmlScriptListener=a},6886:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6104),t)},9552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const i=r(254),n=r(3719),s=r(9827);class a extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const i=new s.Readable({objectMode:!0});return i._read=async()=>{i._read=()=>{};let t=1;function s(e){i.emit("error",e)}function a(){0==--t&&i.push(null)}const o={baseIRI:e.metadata?.baseIRI??"",context:r,emit:function(e){i.emit("data",e)},end:a,error:s,headers:e.headers};Promise.all(this.busRdfParseHtml.publish(o)).then((async r=>{t+=r.length;const i=[];for(const e of r){const{htmlParseListener:t}=await e.actor.run(o);i.push(t)}const l=new n.Parser({onclosetag(){try{for(const e of i)e.onTagClose()}catch(e){s(e)}},onend(){try{for(const e of i)e.onEnd()}catch(e){s(e)}a()},onopentag(e,t){try{for(const r of i)r.onTagOpen(e,t)}catch(e){s(e)}},ontext(e){try{for(const t of i)t.onText(e)}catch(e){s(e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1});e.data.on("error",s).on("data",(e=>l.write(e.toString()))).on("end",(()=>l.end()))})).catch(s)},{data:i}}}t.ActorRdfParseHtml=a},6915:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9552),t)},5967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseJsonLd=void 0;const i=r(254),n=r(8199),s=r(5758),a=r(2005);class o extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,t,r){if(r.has(n.KeysRdfParseHtmlScript.processingHtmlScript)&&"application/ld+json"!==t)throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!t||!(t in this.mediaTypePriorities)&&!t.endsWith("+json"))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e)}async runHandle(e,t,r){return{data:s.JsonLdParser.fromHttpResponse(e.metadata?.baseIRI??"",t,e.headers,{documentLoader:r.get(n.KeysRdfParseJsonLd.documentLoader)||new a.DocumentLoaderMediated(this.mediatorHttp,r),strictValues:r.get(n.KeysRdfParseJsonLd.strictValues),...r.get(n.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}t.ActorRdfParseJsonLd=o},2005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLoaderMediated=void 0;const i=r(2319),n=r(1288),s=r(3858);class a extends n.FetchDocumentLoader{constructor(e,t){super(a.createFetcher(e,t)),this.mediatorHttp=e,this.context=t}static createFetcher(e,t){return async(r,n)=>{const a=await e.mediate({input:r,init:n,context:t});return a.json=async()=>JSON.parse(await s(i.ActorHttp.toNodeReadable(a.body))),a}}}t.DocumentLoaderMediated=a},5745:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5967),t),n(r(2005),t)},8043:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseN3=void 0;const i=r(254),n=r(4254);class s extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>i.emit("error",e)));const i=e.data.pipe(new n.StreamParser({baseIRI:e.metadata?.baseIRI,format:t.endsWith("n3")?t:`${t}*`}));return{data:i,metadata:{triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}}t.ActorRdfParseN3=s},9241:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8043),t)},8717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseRdfXml=void 0;const i=r(254),n=r(5787);class s extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>i.emit("error",e)));const i=e.data.pipe(new n.RdfXmlParser({baseIRI:e.metadata?.baseIRI}));return{data:i,metadata:{triples:!0}}}}t.ActorRdfParseRdfXml=s},9076:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8717),t)},2171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseShaclc=void 0;const i=r(254),n=r(9827),s=r(8810),a=r(3858),o=r(4493);class l extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const i=new o.PrefixWrappingIterator(a(e.data).then((r=>(0,s.parse)(r,{extendedSyntax:"text/shaclc-ext"===t,baseIRI:e.metadata?.baseIRI})))),l=new n.Readable({objectMode:!0});return i.on("prefix",((...e)=>l.emit("prefix",...e))),{data:l.wrap(i),metadata:{triples:!0}}}}t.ActorRdfParseShaclc=l},4493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixWrappingIterator=void 0;const i=r(8377);class n extends i.WrappingIterator{constructor(e){super(e?.then((e=>(this.prefixes=e.prefixes,e))))}read(){if(this.prefixes){for(const e of Object.entries(this.prefixes))this.emit("prefix",...e);delete this.prefixes}return super.read()}}t.PrefixWrappingIterator=n},7523:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2171),t)},3273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseXmlRdfa=void 0;const i=r(254),n=r(494);class s extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const i=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",(e=>s.emit("error",e)));const s=e.data.pipe(new n.RdfaParser({baseIRI:e.metadata?.baseIRI,profile:"xml",language:i}));return{data:s,metadata:{triples:!0}}}}t.ActorRdfParseXmlRdfa=s},438:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3273),t)},6483:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttp=void 0;const i=r(1890),n=r(2166);globalThis.ReadableStream||(globalThis.ReadableStream=r(8568).ReadableStream);const s=r(4970),a=r(1742);class o extends i.Actor{constructor(e){super(e)}static toNodeReadable(e){return s(e)||null===e?e:new n.ReadableWebToNodeStream(e)}static toWebReadableStream(e){return a(e)}static headersToHash(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t}}t.ActorHttp=o},2319:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6483),t)},5168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const i=r(1890);class n extends i.Actor{constructor(e){super(e)}}t.ActorRdfParseHtml=n},6913:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0