graphdb-workbench 2.2.2 → 2.2.3-TR2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/{0.77515462efcd257d336e.bundle.js → 0.4964bcb178968f458708.bundle.js} +3 -3
  2. package/dist/0.4964bcb178968f458708.bundle.js.map +1 -0
  3. package/dist/{11.e3c940aa59365084050b.bundle.js → 11.197b3f9dce29002dd6cd.bundle.js} +2 -2
  4. package/dist/11.197b3f9dce29002dd6cd.bundle.js.map +1 -0
  5. package/dist/148.45985ae23de642595544.bundle.js +1 -1
  6. package/dist/148.45985ae23de642595544.bundle.js.map +1 -1
  7. package/dist/20.4eb25ede434dc329ecf1.bundle.js +1 -1
  8. package/dist/20.4eb25ede434dc329ecf1.bundle.js.map +1 -1
  9. package/dist/{25.c2d2c79cbb29e36a4cce.bundle.js → 25.43e8246cada0c08ac331.bundle.js} +2 -2
  10. package/dist/25.43e8246cada0c08ac331.bundle.js.map +1 -0
  11. package/dist/27.fef157d9275358c9f1a0.bundle.js +1 -1
  12. package/dist/27.fef157d9275358c9f1a0.bundle.js.map +1 -1
  13. package/dist/{3.d06a0ca122c78522c911.bundle.js → 3.d446d752f9ceed06bb80.bundle.js} +2 -2
  14. package/dist/3.d446d752f9ceed06bb80.bundle.js.map +1 -0
  15. package/dist/33.fde8076c81c87c25c367.bundle.js +1 -1
  16. package/dist/33.fde8076c81c87c25c367.bundle.js.map +1 -1
  17. package/dist/40.10f42e3f6d8d87bd3221.bundle.js +1 -1
  18. package/dist/40.10f42e3f6d8d87bd3221.bundle.js.map +1 -1
  19. package/dist/94.94158487a9024ff3a623.bundle.js +1 -1
  20. package/dist/94.94158487a9024ff3a623.bundle.js.map +1 -1
  21. package/dist/{bundle.5121ea89a64d6feda4e1.bundle.js → bundle.405b38ce8626c8a60e4d.bundle.js} +3 -3
  22. package/dist/{bundle.5121ea89a64d6feda4e1.bundle.js.map → bundle.405b38ce8626c8a60e4d.bundle.js.map} +1 -1
  23. package/dist/css/yasr.custom.css +9 -7
  24. package/dist/index.html +4 -4
  25. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  26. package/dist/{main.59e407d8a8b46a1a9bad.css → main.c29920c7f6f6ecb00cae.css} +1 -1
  27. package/dist/pages/autocomplete.html +1 -1
  28. package/dist/pages/choose-repository-type.html +1 -1
  29. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  30. package/dist/pages/create-index.html +4 -4
  31. package/dist/pages/dependencies.html +1 -1
  32. package/dist/pages/domainRangeInfo.html +2 -2
  33. package/dist/pages/edit.html +1 -1
  34. package/dist/pages/explore.html +1 -1
  35. package/dist/pages/export.html +1 -1
  36. package/dist/pages/find.html +1 -1
  37. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  38. package/dist/pages/graphs-visualizations.html +7 -7
  39. package/dist/pages/guides.html +1 -1
  40. package/dist/pages/import.html +1 -1
  41. package/dist/pages/jdbc-create.html +5 -5
  42. package/dist/pages/monitor/queries.html +1 -1
  43. package/dist/pages/monitor/resources.html +2 -2
  44. package/dist/pages/namespaces.html +2 -2
  45. package/dist/pages/plugins.html +1 -1
  46. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  47. package/dist/pages/rdfrank.html +2 -2
  48. package/dist/pages/repositories.html +2 -2
  49. package/dist/pages/repository.html +2 -2
  50. package/dist/pages/similarity-indexes.html +1 -1
  51. package/dist/pages/sparql-template-create.html +5 -5
  52. package/dist/pages/sparql.html +3 -3
  53. package/dist/pages/webapi.html +2 -2
  54. package/dist/res/swagger/index.html +27 -27
  55. package/package.json +1 -1
  56. package/dist/0.77515462efcd257d336e.bundle.js.map +0 -1
  57. package/dist/11.e3c940aa59365084050b.bundle.js.map +0 -1
  58. package/dist/25.c2d2c79cbb29e36a4cce.bundle.js.map +0 -1
  59. package/dist/3.d06a0ca122c78522c911.bundle.js.map +0 -1
@@ -23,5 +23,5 @@
23
23
  *
24
24
  * Date: 2015-10-17
25
25
  */
26
- function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f,h,g,E,m,v,x,y="sizzle"+1*new Date,T=e.document,N=0,L=0,I=ie(),C=ie(),S=ie(),A=function(e,t){return e===t&&(p=!0),0},R={}.hasOwnProperty,b=[],O=b.pop,w=b.push,P=b.push,D=b.slice,_=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",k="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",G="\\["+k+"*("+F+")(?:"+k+"*([*^$|!~]?=)"+k+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+k+"*\\]",U=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+G+")*)|.*)\\)|)",B=new RegExp(k+"+","g"),V=new RegExp("^"+k+"+|((?:^|[^\\\\])(?:\\\\.)*)"+k+"+$","g"),j=new RegExp("^"+k+"*,"+k+"*"),H=new RegExp("^"+k+"*([>+~]|"+k+")"+k+"*"),q=new RegExp("="+k+"*([^\\]'\"]*?)"+k+"*\\]","g"),W=new RegExp(U),z=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+G),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+k+"*(even|odd|(([+-]|)(\\d*)n|)"+k+"*(?:([+-]|)"+k+"*(\\d+)|))"+k+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+k+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+k+"*((?:-\\d)?\\d*)"+k+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,J=/'|\\/g,ee=new RegExp("\\\\([\\da-f]{1,6}"+k+"?|("+k+")|.)","ig"),te=function(e,t,r){var n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},re=function(){d()};try{P.apply(b=D.call(T.childNodes),T.childNodes),b[T.childNodes.length].nodeType}catch(e){P={apply:b.length?function(e,t){w.apply(e,D.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}function ne(e,t,n,i){var o,a,u,c,p,h,m,v,N=t&&t.ownerDocument,L=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==L&&9!==L&&11!==L)return n;if(!i&&((t?t.ownerDocument||t:T)!==f&&d(t),t=t||f,g)){if(11!==L&&(h=K.exec(e)))if(o=h[1]){if(9===L){if(!(u=t.getElementById(o)))return n;if(u.id===o)return n.push(u),n}else if(N&&(u=N.getElementById(o))&&x(t,u)&&u.id===o)return n.push(u),n}else{if(h[2])return P.apply(n,t.getElementsByTagName(e)),n;if((o=h[3])&&r.getElementsByClassName&&t.getElementsByClassName)return P.apply(n,t.getElementsByClassName(o)),n}if(r.qsa&&!S[e+" "]&&(!E||!E.test(e))){if(1!==L)N=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(J,"\\$&"):t.setAttribute("id",c=y),a=(m=s(e)).length,p=z.test(c)?"#"+c:"[id='"+c+"']";a--;)m[a]=p+" "+he(m[a]);v=m.join(","),N=Z.test(e)&&de(t.parentNode)||t}if(v)try{return P.apply(n,N.querySelectorAll(v)),n}catch(e){}finally{c===y&&t.removeAttribute("id")}}}return l(e.replace(V,"$1"),t,n,i)}function ie(){var e=[];return function t(r,i){return e.push(r+" ")>n.cacheLength&&delete t[e.shift()],t[r+" "]=i}}function oe(e){return e[y]=!0,e}function se(e){var t=f.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ae(e,t){for(var r=e.split("|"),i=r.length;i--;)n.attrHandle[r[i]]=t}function le(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function ue(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ce(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}function pe(e){return oe((function(t){return t=+t,oe((function(r,n){for(var i,o=e([],r.length,t),s=o.length;s--;)r[i=o[s]]&&(r[i]=!(n[i]=r[i]))}))}))}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in r=ne.support={},o=ne.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=ne.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:T;return s!==f&&9===s.nodeType&&s.documentElement?(h=(f=s).documentElement,g=!o(f),(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),r.attributes=se((function(e){return e.className="i",!e.getAttribute("className")})),r.getElementsByTagName=se((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),r.getElementsByClassName=Y.test(f.getElementsByClassName),r.getById=se((function(e){return h.appendChild(e).id=y,!f.getElementsByName||!f.getElementsByName(y).length})),r.getById?(n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var r=t.getElementById(e);return r?[r]:[]}},n.filter.ID=function(e){var t=e.replace(ee,te);return function(e){return e.getAttribute("id")===t}}):(delete n.find.ID,n.filter.ID=function(e){var t=e.replace(ee,te);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}}),n.find.TAG=r.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):r.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,n=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;r=o[i++];)1===r.nodeType&&n.push(r);return n}return o},n.find.CLASS=r.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],E=[],(r.qsa=Y.test(f.querySelectorAll))&&(se((function(e){h.appendChild(e).innerHTML="<a id='"+y+"'></a><select id='"+y+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&E.push("[*^$]="+k+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||E.push("\\["+k+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+y+"-]").length||E.push("~="),e.querySelectorAll(":checked").length||E.push(":checked"),e.querySelectorAll("a#"+y+"+*").length||E.push(".#.+[+~]")})),se((function(e){var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&E.push("name"+k+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||E.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),E.push(",.*:")}))),(r.matchesSelector=Y.test(v=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se((function(e){r.disconnectedMatch=v.call(e,"div"),v.call(e,"[s!='']:x"),m.push("!=",U)})),E=E.length&&new RegExp(E.join("|")),m=m.length&&new RegExp(m.join("|")),t=Y.test(h.compareDocumentPosition),x=t||Y.test(h.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return p=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!r.sortDetached&&t.compareDocumentPosition(e)===n?e===f||e.ownerDocument===T&&x(T,e)?-1:t===f||t.ownerDocument===T&&x(T,t)?1:c?_(c,e)-_(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return p=!0,0;var r,n=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===f?-1:t===f?1:i?-1:o?1:c?_(c,e)-_(c,t):0;if(i===o)return le(e,t);for(r=e;r=r.parentNode;)s.unshift(r);for(r=t;r=r.parentNode;)a.unshift(r);for(;s[n]===a[n];)n++;return n?le(s[n],a[n]):s[n]===T?-1:a[n]===T?1:0},f):f},ne.matches=function(e,t){return ne(e,null,null,t)},ne.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&d(e),t=t.replace(q,"='$1']"),r.matchesSelector&&g&&!S[t+" "]&&(!m||!m.test(t))&&(!E||!E.test(t)))try{var n=v.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return ne(t,f,null,[e]).length>0},ne.contains=function(e,t){return(e.ownerDocument||e)!==f&&d(e),x(e,t)},ne.attr=function(e,t){(e.ownerDocument||e)!==f&&d(e);var i=n.attrHandle[t.toLowerCase()],o=i&&R.call(n.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:r.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ne.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ne.uniqueSort=function(e){var t,n=[],i=0,o=0;if(p=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),p){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return c=null,e},i=ne.getText=function(e){var t,r="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)r+=i(t);return r},(n=ne.selectors={cacheLength:50,createPseudo:oe,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ee,te),e[3]=(e[3]||e[4]||e[5]||"").replace(ee,te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ne.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ne.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&W.test(r)&&(t=s(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ee,te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=I[e+" "];return t||(t=new RegExp("(^|"+k+")"+e+"("+k+"|$)"))&&I(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,r){return function(n){var i=ne.attr(n,e);return null==i?"!="===t:!t||(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i.replace(B," ")+" ").indexOf(r)>-1:"|="===t&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,n,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===i?function(e){return!!e.parentNode}:function(t,r,l){var u,c,p,d,f,h,g=o!==s?"nextSibling":"previousSibling",E=t.parentNode,m=a&&t.nodeName.toLowerCase(),v=!l&&!a,x=!1;if(E){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?E.firstChild:E.lastChild],s&&v){for(x=(f=(u=(c=(p=(d=E)[y]||(d[y]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===N&&u[1])&&u[2],d=f&&E.childNodes[f];d=++f&&d&&d[g]||(x=f=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[N,f,x];break}}else if(v&&(x=f=(u=(c=(p=(d=t)[y]||(d[y]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===N&&u[1]),!1===x)for(;(d=++f&&d&&d[g]||(x=f=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(v&&((c=(p=d[y]||(d[y]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]=[N,x]),d!==t)););return(x-=i)===n||x%n==0&&x/n>=0}}},PSEUDO:function(e,t){var r,i=n.pseudos[e]||n.setFilters[e.toLowerCase()]||ne.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(r=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?oe((function(e,r){for(var n,o=i(e,t),s=o.length;s--;)e[n=_(e,o[s])]=!(r[n]=o[s])})):function(e){return i(e,0,r)}):i}},pseudos:{not:oe((function(e){var t=[],r=[],n=a(e.replace(V,"$1"));return n[y]?oe((function(e,t,r,i){for(var o,s=n(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,n(t,null,o,r),t[0]=null,!r.pop()}})),has:oe((function(e){return function(t){return ne(e,t).length>0}})),contains:oe((function(e){return e=e.replace(ee,te),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),lang:oe((function(e){return z.test(e||"")||ne.error("unsupported lang: "+e),e=e.replace(ee,te).toLowerCase(),function(t){var r;do{if(r=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe((function(){return[0]})),last:pe((function(e,t){return[t-1]})),eq:pe((function(e,t,r){return[r<0?r+t:r]})),even:pe((function(e,t){for(var r=0;r<t;r+=2)e.push(r);return e})),odd:pe((function(e,t){for(var r=1;r<t;r+=2)e.push(r);return e})),lt:pe((function(e,t,r){for(var n=r<0?r+t:r;--n>=0;)e.push(n);return e})),gt:pe((function(e,t,r){for(var n=r<0?r+t:r;++n<t;)e.push(n);return e}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=ue(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=ce(t);function fe(){}function he(e){for(var t=0,r=e.length,n="";t<r;t++)n+=e[t].value;return n}function ge(e,t,r){var n=t.dir,i=r&&"parentNode"===n,o=L++;return t.first?function(t,r,o){for(;t=t[n];)if(1===t.nodeType||i)return e(t,r,o)}:function(t,r,s){var a,l,u,c=[N,o];if(s){for(;t=t[n];)if((1===t.nodeType||i)&&e(t,r,s))return!0}else for(;t=t[n];)if(1===t.nodeType||i){if((a=(l=(u=t[y]||(t[y]={}))[t.uniqueID]||(u[t.uniqueID]={}))[n])&&a[0]===N&&a[1]===o)return c[2]=a[2];if(l[n]=c,c[2]=e(t,r,s))return!0}}}function Ee(e){return e.length>1?function(t,r,n){for(var i=e.length;i--;)if(!e[i](t,r,n))return!1;return!0}:e[0]}function me(e,t,r,n,i){for(var o,s=[],a=0,l=e.length,u=null!=t;a<l;a++)(o=e[a])&&(r&&!r(o,n,i)||(s.push(o),u&&t.push(a)));return s}function ve(e,t,r,n,i,o){return n&&!n[y]&&(n=ve(n)),i&&!i[y]&&(i=ve(i,o)),oe((function(o,s,a,l){var u,c,p,d=[],f=[],h=s.length,g=o||function(e,t,r){for(var n=0,i=t.length;n<i;n++)ne(e,t[n],r);return r}(t||"*",a.nodeType?[a]:a,[]),E=!e||!o&&t?g:me(g,d,e,a,l),m=r?i||(o?e:h||n)?[]:s:E;if(r&&r(E,m,a,l),n)for(u=me(m,f),n(u,[],a,l),c=u.length;c--;)(p=u[c])&&(m[f[c]]=!(E[f[c]]=p));if(o){if(i||e){if(i){for(u=[],c=m.length;c--;)(p=m[c])&&u.push(E[c]=p);i(null,m=[],u,l)}for(c=m.length;c--;)(p=m[c])&&(u=i?_(o,p):d[c])>-1&&(o[u]=!(s[u]=p))}}else m=me(m===s?m.splice(h,m.length):m),i?i(null,s,m,l):P.apply(s,m)}))}function xe(e){for(var t,r,i,o=e.length,s=n.relative[e[0].type],a=s||n.relative[" "],l=s?1:0,c=ge((function(e){return e===t}),a,!0),p=ge((function(e){return _(t,e)>-1}),a,!0),d=[function(e,r,n){var i=!s&&(n||r!==u)||((t=r).nodeType?c(e,r,n):p(e,r,n));return t=null,i}];l<o;l++)if(r=n.relative[e[l].type])d=[ge(Ee(d),r)];else{if((r=n.filter[e[l].type].apply(null,e[l].matches))[y]){for(i=++l;i<o&&!n.relative[e[i].type];i++);return ve(l>1&&Ee(d),l>1&&he(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(V,"$1"),r,l<i&&xe(e.slice(l,i)),i<o&&xe(e=e.slice(i)),i<o&&he(e))}d.push(r)}return Ee(d)}return fe.prototype=n.filters=n.pseudos,n.setFilters=new fe,s=ne.tokenize=function(e,t){var r,i,o,s,a,l,u,c=C[e+" "];if(c)return t?0:c.slice(0);for(a=e,l=[],u=n.preFilter;a;){for(s in r&&!(i=j.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),r=!1,(i=H.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(V," ")}),a=a.slice(r.length)),n.filter)!(i=$[s].exec(a))||u[s]&&!(i=u[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return t?a.length:a?ne.error(e):C(e,l).slice(0)},a=ne.compile=function(e,t){var r,i=[],o=[],a=S[e+" "];if(!a){for(t||(t=s(e)),r=t.length;r--;)(a=xe(t[r]))[y]?i.push(a):o.push(a);(a=S(e,function(e,t){var r=t.length>0,i=e.length>0,o=function(o,s,a,l,c){var p,h,E,m=0,v="0",x=o&&[],y=[],T=u,L=o||i&&n.find.TAG("*",c),I=N+=null==T?1:Math.random()||.1,C=L.length;for(c&&(u=s===f||s||c);v!==C&&null!=(p=L[v]);v++){if(i&&p){for(h=0,s||p.ownerDocument===f||(d(p),a=!g);E=e[h++];)if(E(p,s||f,a)){l.push(p);break}c&&(N=I)}r&&((p=!E&&p)&&m--,o&&x.push(p))}if(m+=v,r&&v!==m){for(h=0;E=t[h++];)E(x,y,s,a);if(o){if(m>0)for(;v--;)x[v]||y[v]||(y[v]=O.call(l));y=me(y)}P.apply(l,y),c&&!o&&y.length>0&&m+t.length>1&&ne.uniqueSort(l)}return c&&(N=I,u=T),x};return r?oe(o):o}(o,i))).selector=e}return a},l=ne.select=function(e,t,i,o){var l,u,c,p,d,f="function"==typeof e&&e,h=!o&&s(e=f.selector||e);if(i=i||[],1===h.length){if((u=h[0]=h[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&r.getById&&9===t.nodeType&&g&&n.relative[u[1].type]){if(!(t=(n.find.ID(c.matches[0].replace(ee,te),t)||[])[0]))return i;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(l=$.needsContext.test(e)?0:u.length;l--&&(c=u[l],!n.relative[p=c.type]);)if((d=n.find[p])&&(o=d(c.matches[0].replace(ee,te),Z.test(u[0].type)&&de(t.parentNode)||t))){if(u.splice(l,1),!(e=o.length&&he(u)))return P.apply(i,o),i;break}}return(f||a(e,h))(o,t,!g,i,!t||Z.test(e)&&de(t.parentNode)||t),i},r.sortStable=y.split("").sort(A).join("")===y,r.detectDuplicates=!!p,d(),r.sortDetached=se((function(e){return 1&e.compareDocumentPosition(f.createElement("div"))})),se((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ae("type|href|height|width",(function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),r.attributes&&se((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ae("value",(function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),se((function(e){return null==e.getAttribute("disabled")}))||ae(M,(function(e,t,r){var n;if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),ne}(e);d.find=v,d.expr=v.selectors,d.expr[":"]=d.expr.pseudos,d.uniqueSort=d.unique=v.uniqueSort,d.text=v.getText,d.isXMLDoc=v.isXML,d.contains=v.contains;var x=function(e,t,r){for(var n=[],i=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&d(e).is(r))break;n.push(e)}return n},y=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r},T=d.expr.match.needsContext,N=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,L=/^.[^:#\[\.,]*$/;function I(e,t,r){if(d.isFunction(t))return d.grep(e,(function(e,n){return!!t.call(e,n,e)!==r}));if(t.nodeType)return d.grep(e,(function(e){return e===t!==r}));if("string"==typeof t){if(L.test(t))return d.filter(t,e,r);t=d.filter(t,e)}return d.grep(e,(function(e){return a.call(t,e)>-1!==r}))}d.filter=function(e,t,r){var n=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?d.find.matchesSelector(n,e)?[n]:[]:d.find.matches(e,d.grep(t,(function(e){return 1===e.nodeType})))},d.fn.extend({find:function(e){var t,r=this.length,n=[],i=this;if("string"!=typeof e)return this.pushStack(d(e).filter((function(){for(t=0;t<r;t++)if(d.contains(i[t],this))return!0})));for(t=0;t<r;t++)d.find(e,i[t],n);return(n=this.pushStack(r>1?d.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&T.test(e)?d(e):e||[],!1).length}});var C,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(d.fn.init=function(e,t,r){var i,o;if(!e)return this;if(r=r||C,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:S.exec(e))||!i[1]&&t)return!t||t.jquery?(t||r).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof d?t[0]:t,d.merge(this,d.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:n,!0)),N.test(i[1])&&d.isPlainObject(t))for(i in t)d.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=n.getElementById(i[2]))&&o.parentNode&&(this.length=1,this[0]=o),this.context=n,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):d.isFunction(e)?void 0!==r.ready?r.ready(e):e(d):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),d.makeArray(e,this))}).prototype=d.fn,C=d(n);var A=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function b(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}d.fn.extend({has:function(e){var t=d(e,this),r=t.length;return this.filter((function(){for(var e=0;e<r;e++)if(d.contains(this,t[e]))return!0}))},closest:function(e,t){for(var r,n=0,i=this.length,o=[],s=T.test(e)||"string"!=typeof e?d(e,t||this.context):0;n<i;n++)for(r=this[n];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(s?s.index(r)>-1:1===r.nodeType&&d.find.matchesSelector(r,e))){o.push(r);break}return this.pushStack(o.length>1?d.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?a.call(d(e),this[0]):a.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(d.uniqueSort(d.merge(this.get(),d(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),d.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,r){return x(e,"parentNode",r)},next:function(e){return b(e,"nextSibling")},prev:function(e){return b(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,r){return x(e,"nextSibling",r)},prevUntil:function(e,t,r){return x(e,"previousSibling",r)},siblings:function(e){return y((e.parentNode||{}).firstChild,e)},children:function(e){return y(e.firstChild)},contents:function(e){return e.contentDocument||d.merge([],e.childNodes)}},(function(e,t){d.fn[e]=function(r,n){var i=d.map(this,t,r);return"Until"!==e.slice(-5)&&(n=r),n&&"string"==typeof n&&(i=d.filter(n,i)),this.length>1&&(R[e]||d.uniqueSort(i),A.test(e)&&i.reverse()),this.pushStack(i)}}));var O,w=/\S+/g;function P(){n.removeEventListener("DOMContentLoaded",P),e.removeEventListener("load",P),d.ready()}d.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return d.each(e.match(w)||[],(function(e,r){t[r]=!0})),t}(e):d.extend({},e);var t,r,n,i,o=[],s=[],a=-1,l=function(){for(i=e.once,n=t=!0;s.length;a=-1)for(r=s.shift();++a<o.length;)!1===o[a].apply(r[0],r[1])&&e.stopOnFalse&&(a=o.length,r=!1);e.memory||(r=!1),t=!1,i&&(o=r?[]:"")},u={add:function(){return o&&(r&&!t&&(a=o.length-1,s.push(r)),function t(r){d.each(r,(function(r,n){d.isFunction(n)?e.unique&&u.has(n)||o.push(n):n&&n.length&&"string"!==d.type(n)&&t(n)}))}(arguments),r&&!t&&l()),this},remove:function(){return d.each(arguments,(function(e,t){for(var r;(r=d.inArray(t,o,r))>-1;)o.splice(r,1),r<=a&&a--})),this},has:function(e){return e?d.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=r="",this},disabled:function(){return!o},lock:function(){return i=s=[],r||(o=r=""),this},locked:function(){return!!i},fireWith:function(e,r){return i||(r=[e,(r=r||[]).slice?r.slice():r],s.push(r),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},d.extend({Deferred:function(e){var t=[["resolve","done",d.Callbacks("once memory"),"resolved"],["reject","fail",d.Callbacks("once memory"),"rejected"],["notify","progress",d.Callbacks("memory")]],r="pending",n={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return d.Deferred((function(r){d.each(t,(function(t,o){var s=d.isFunction(e[t])&&e[t];i[o[1]]((function(){var e=s&&s.apply(this,arguments);e&&d.isFunction(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[o[0]+"With"](this===n?r.promise():this,s?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?d.extend(e,n):n}},i={};return n.pipe=n.then,d.each(t,(function(e,o){var s=o[2],a=o[3];n[o[1]]=s.add,a&&s.add((function(){r=a}),t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?n:this,arguments),this},i[o[0]+"With"]=s.fireWith})),n.promise(i),e&&e.call(i,i),i},when:function(e){var t,r,n,o=0,s=i.call(arguments),a=s.length,l=1!==a||e&&d.isFunction(e.promise)?a:0,u=1===l?e:d.Deferred(),c=function(e,r,n){return function(o){r[e]=this,n[e]=arguments.length>1?i.call(arguments):o,n===t?u.notifyWith(r,n):--l||u.resolveWith(r,n)}};if(a>1)for(t=new Array(a),r=new Array(a),n=new Array(a);o<a;o++)s[o]&&d.isFunction(s[o].promise)?s[o].promise().progress(c(o,r,t)).done(c(o,n,s)).fail(u.reject):--l;return l||u.resolveWith(n,s),u.promise()}}),d.fn.ready=function(e){return d.ready.promise().done(e),this},d.extend({isReady:!1,readyWait:1,holdReady:function(e){e?d.readyWait++:d.ready(!0)},ready:function(e){(!0===e?--d.readyWait:d.isReady)||(d.isReady=!0,!0!==e&&--d.readyWait>0||(O.resolveWith(n,[d]),d.fn.triggerHandler&&(d(n).triggerHandler("ready"),d(n).off("ready"))))}}),d.ready.promise=function(t){return O||(O=d.Deferred(),"complete"===n.readyState||"loading"!==n.readyState&&!n.documentElement.doScroll?e.setTimeout(d.ready):(n.addEventListener("DOMContentLoaded",P),e.addEventListener("load",P))),O.promise(t)},d.ready.promise();var D=function(e,t,r,n,i,o,s){var a=0,l=e.length,u=null==r;if("object"===d.type(r))for(a in i=!0,r)D(e,t,a,r[a],!0,o,s);else if(void 0!==n&&(i=!0,d.isFunction(n)||(s=!0),u&&(s?(t.call(e,n),t=null):(u=t,t=function(e,t,r){return u.call(d(e),r)})),t))for(;a<l;a++)t(e[a],r,s?n:n.call(e[a],a,t(e[a],r)));return i?e:u?t.call(e):l?t(e[0],r):o},_=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function M(){this.expando=d.expando+M.uid++}M.uid=1,M.prototype={register:function(e,t){var r=t||{};return e.nodeType?e[this.expando]=r:Object.defineProperty(e,this.expando,{value:r,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!_(e))return{};var t=e[this.expando];return t||(t={},_(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,r){var n,i=this.cache(e);if("string"==typeof t)i[t]=r;else for(n in t)i[n]=t[n];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,r){var n;return void 0===t||t&&"string"==typeof t&&void 0===r?void 0!==(n=this.get(e,t))?n:this.get(e,d.camelCase(t)):(this.set(e,t,r),void 0!==r?r:t)},remove:function(e,t){var r,n,i,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{d.isArray(t)?n=t.concat(t.map(d.camelCase)):(i=d.camelCase(t),n=t in o?[t,i]:(n=i)in o?[n]:n.match(w)||[]),r=n.length;for(;r--;)delete o[n[r]]}(void 0===t||d.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!d.isEmptyObject(t)}};var k=new M,F=new M,G=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function B(e,t,r){var n;if(void 0===r&&1===e.nodeType)if(n="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(r=e.getAttribute(n))){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:G.test(r)?d.parseJSON(r):r)}catch(e){}F.set(e,t,r)}else r=void 0;return r}d.extend({hasData:function(e){return F.hasData(e)||k.hasData(e)},data:function(e,t,r){return F.access(e,t,r)},removeData:function(e,t){F.remove(e,t)},_data:function(e,t,r){return k.access(e,t,r)},_removeData:function(e,t){k.remove(e,t)}}),d.fn.extend({data:function(e,t){var r,n,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=F.get(o),1===o.nodeType&&!k.get(o,"hasDataAttrs"))){for(r=s.length;r--;)s[r]&&0===(n=s[r].name).indexOf("data-")&&(n=d.camelCase(n.slice(5)),B(o,n,i[n]));k.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){F.set(this,e)})):D(this,(function(t){var r,n;if(o&&void 0===t)return void 0!==(r=F.get(o,e)||F.get(o,e.replace(U,"-$&").toLowerCase()))?r:(n=d.camelCase(e),void 0!==(r=F.get(o,n))||void 0!==(r=B(o,n,void 0))?r:void 0);n=d.camelCase(e),this.each((function(){var r=F.get(this,n);F.set(this,n,t),e.indexOf("-")>-1&&void 0!==r&&F.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){F.remove(this,e)}))}}),d.extend({queue:function(e,t,r){var n;if(e)return t=(t||"fx")+"queue",n=k.get(e,t),r&&(!n||d.isArray(r)?n=k.access(e,t,d.makeArray(r)):n.push(r)),n||[]},dequeue:function(e,t){t=t||"fx";var r=d.queue(e,t),n=r.length,i=r.shift(),o=d._queueHooks(e,t);"inprogress"===i&&(i=r.shift(),n--),i&&("fx"===t&&r.unshift("inprogress"),delete o.stop,i.call(e,(function(){d.dequeue(e,t)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return k.get(e,r)||k.access(e,r,{empty:d.Callbacks("once memory").add((function(){k.remove(e,[t+"queue",r])}))})}}),d.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?d.queue(this[0],e):void 0===t?this:this.each((function(){var r=d.queue(this,e,t);d._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&d.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){d.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,n=1,i=d.Deferred(),o=this,s=this.length,a=function(){--n||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=k.get(o[s],e+"queueHooks"))&&r.empty&&(n++,r.empty.add(a));return a(),i.promise(t)}});var V=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,j=new RegExp("^(?:([+-])=|)("+V+")([a-z%]*)$","i"),H=["Top","Right","Bottom","Left"],q=function(e,t){return e=t||e,"none"===d.css(e,"display")||!d.contains(e.ownerDocument,e)};function W(e,t,r,n){var i,o=1,s=20,a=n?function(){return n.cur()}:function(){return d.css(e,t,"")},l=a(),u=r&&r[3]||(d.cssNumber[t]?"":"px"),c=(d.cssNumber[t]||"px"!==u&&+l)&&j.exec(d.css(e,t));if(c&&c[3]!==u){u=u||c[3],r=r||[],c=+l||1;do{c/=o=o||".5",d.style(e,t,c+u)}while(o!==(o=a()/l)&&1!==o&&--s)}return r&&(c=+c||+l||0,i=r[1]?c+(r[1]+1)*r[2]:+r[2],n&&(n.unit=u,n.start=c,n.end=i)),i}var z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,Q=/^$|\/(?:java|ecma)script/i,X={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Y(e,t){var r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&d.nodeName(e,t)?d.merge([e],r):r}function K(e,t){for(var r=0,n=e.length;r<n;r++)k.set(e[r],"globalEval",!t||k.get(t[r],"globalEval"))}X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td;var Z,J,ee=/<|&#?\w+;/;function te(e,t,r,n,i){for(var o,s,a,l,u,c,p=t.createDocumentFragment(),f=[],h=0,g=e.length;h<g;h++)if((o=e[h])||0===o)if("object"===d.type(o))d.merge(f,o.nodeType?[o]:o);else if(ee.test(o)){for(s=s||p.appendChild(t.createElement("div")),a=($.exec(o)||["",""])[1].toLowerCase(),l=X[a]||X._default,s.innerHTML=l[1]+d.htmlPrefilter(o)+l[2],c=l[0];c--;)s=s.lastChild;d.merge(f,s.childNodes),(s=p.firstChild).textContent=""}else f.push(t.createTextNode(o));for(p.textContent="",h=0;o=f[h++];)if(n&&d.inArray(o,n)>-1)i&&i.push(o);else if(u=d.contains(o.ownerDocument,o),s=Y(p.appendChild(o),"script"),u&&K(s),r)for(c=0;o=s[c++];)Q.test(o.type||"")&&r.push(o);return p}Z=n.createDocumentFragment().appendChild(n.createElement("div")),(J=n.createElement("input")).setAttribute("type","radio"),J.setAttribute("checked","checked"),J.setAttribute("name","t"),Z.appendChild(J),p.checkClone=Z.cloneNode(!0).cloneNode(!0).lastChild.checked,Z.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!Z.cloneNode(!0).lastChild.defaultValue;var re=/^key/,ne=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ie=/^([^.]*)(?:\.(.+)|)/;function oe(){return!0}function se(){return!1}function ae(){try{return n.activeElement}catch(e){}}function le(e,t,r,n,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof r&&(n=n||r,r=void 0),t)le(e,a,r,n,t[a],o);return e}if(null==n&&null==i?(i=r,n=r=void 0):null==i&&("string"==typeof r?(i=n,n=void 0):(i=n,n=r,r=void 0)),!1===i)i=se;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return d().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=d.guid++)),e.each((function(){d.event.add(this,t,i,n,r)}))}d.event={global:{},add:function(e,t,r,n,i){var o,s,a,l,u,c,p,f,h,g,E,m=k.get(e);if(m)for(r.handler&&(r=(o=r).handler,i=o.selector),r.guid||(r.guid=d.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==d&&d.event.triggered!==t.type?d.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(w)||[""]).length;u--;)h=E=(a=ie.exec(t[u])||[])[1],g=(a[2]||"").split(".").sort(),h&&(p=d.event.special[h]||{},h=(i?p.delegateType:p.bindType)||h,p=d.event.special[h]||{},c=d.extend({type:h,origType:E,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&d.expr.match.needsContext.test(i),namespace:g.join(".")},o),(f=l[h])||((f=l[h]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(e,n,g,s)||e.addEventListener&&e.addEventListener(h,s)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),d.event.global[h]=!0)},remove:function(e,t,r,n,i){var o,s,a,l,u,c,p,f,h,g,E,m=k.hasData(e)&&k.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(w)||[""]).length;u--;)if(h=E=(a=ie.exec(t[u])||[])[1],g=(a[2]||"").split(".").sort(),h){for(p=d.event.special[h]||{},f=l[h=(n?p.delegateType:p.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!i&&E!==c.origType||r&&r.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&!1!==p.teardown.call(e,g,m.handle)||d.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)d.event.remove(e,h+t[u],r,n,!0);d.isEmptyObject(l)&&k.remove(e,"handle events")}},dispatch:function(e){e=d.event.fix(e);var t,r,n,o,s,a=[],l=i.call(arguments),u=(k.get(this,"events")||{})[e.type]||[],c=d.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=d.event.handlers.call(this,e,u),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(s.namespace)||(e.handleObj=s,e.data=s.data,void 0!==(n=((d.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var r,n,i,o,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(n=[],r=0;r<a;r++)void 0===n[i=(o=t[r]).selector+" "]&&(n[i]=o.needsContext?d(i,this).index(l)>-1:d.find(i,this,null,[l]).length),n[i]&&n.push(o);n.length&&s.push({elem:l,handlers:n})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var r,i,o,s=t.button;return null==e.pageX&&null!=t.clientX&&(i=(r=e.target.ownerDocument||n).documentElement,o=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),e.which||void 0===s||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[d.expando])return e;var t,r,i,o=e.type,s=e,a=this.fixHooks[o];for(a||(this.fixHooks[o]=a=ne.test(o)?this.mouseHooks:re.test(o)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new d.Event(s),t=i.length;t--;)e[r=i[t]]=s[r];return e.target||(e.target=n),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ae()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ae()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&d.nodeName(this,"input"))return this.click(),!1},_default:function(e){return d.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},d.removeEvent=function(e,t,r){e.removeEventListener&&e.removeEventListener(t,r)},d.Event=function(e,t){if(!(this instanceof d.Event))return new d.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?oe:se):this.type=e,t&&d.extend(this,t),this.timeStamp=e&&e.timeStamp||d.now(),this[d.expando]=!0},d.Event.prototype={constructor:d.Event,isDefaultPrevented:se,isPropagationStopped:se,isImmediatePropagationStopped:se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},d.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){d.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,n=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===n||d.contains(n,i))||(e.type=o.origType,r=o.handler.apply(this,arguments),e.type=t),r}}})),d.fn.extend({on:function(e,t,r,n){return le(this,e,t,r,n)},one:function(e,t,r,n){return le(this,e,t,r,n,1)},off:function(e,t,r){var n,i;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,d(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(r=t,t=void 0),!1===r&&(r=se),this.each((function(){d.event.remove(this,e,r,t)}))}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ce=/<script|<style|<link/i,pe=/checked\s*(?:[^=]|=\s*.checked.)/i,de=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function he(e,t){return d.nodeName(e,"table")&&d.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ee(e){var t=de.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function me(e,t){var r,n,i,o,s,a,l,u;if(1===t.nodeType){if(k.hasData(e)&&(o=k.access(e),s=k.set(t,o),u=o.events))for(i in delete s.handle,s.events={},u)for(r=0,n=u[i].length;r<n;r++)d.event.add(t,i,u[i][r]);F.hasData(e)&&(a=F.access(e),l=d.extend({},a),F.set(t,l))}}function ve(e,t,r,n){t=o.apply([],t);var i,s,a,l,u,c,f=0,h=e.length,g=h-1,E=t[0],m=d.isFunction(E);if(m||h>1&&"string"==typeof E&&!p.checkClone&&pe.test(E))return e.each((function(i){var o=e.eq(i);m&&(t[0]=E.call(this,i,o.html())),ve(o,t,r,n)}));if(h&&(s=(i=te(t,e[0].ownerDocument,!1,e,n)).firstChild,1===i.childNodes.length&&(i=s),s||n)){for(l=(a=d.map(Y(i,"script"),ge)).length;f<h;f++)u=i,f!==g&&(u=d.clone(u,!0,!0),l&&d.merge(a,Y(u,"script"))),r.call(e[f],u,f);if(l)for(c=a[a.length-1].ownerDocument,d.map(a,Ee),f=0;f<l;f++)u=a[f],Q.test(u.type||"")&&!k.access(u,"globalEval")&&d.contains(c,u)&&(u.src?d._evalUrl&&d._evalUrl(u.src):d.globalEval(u.textContent.replace(fe,"")))}return e}function xe(e,t,r){for(var n,i=t?d.filter(t,e):e,o=0;null!=(n=i[o]);o++)r||1!==n.nodeType||d.cleanData(Y(n)),n.parentNode&&(r&&d.contains(n.ownerDocument,n)&&K(Y(n,"script")),n.parentNode.removeChild(n));return e}d.extend({htmlPrefilter:function(e){return e.replace(ue,"<$1></$2>")},clone:function(e,t,r){var n,i,o,s,a,l,u,c=e.cloneNode(!0),f=d.contains(e.ownerDocument,e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||d.isXMLDoc(e)))for(s=Y(c),n=0,i=(o=Y(e)).length;n<i;n++)a=o[n],l=s[n],u=void 0,"input"===(u=l.nodeName.toLowerCase())&&z.test(a.type)?l.checked=a.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=a.defaultValue);if(t)if(r)for(o=o||Y(e),s=s||Y(c),n=0,i=o.length;n<i;n++)me(o[n],s[n]);else me(e,c);return(s=Y(c,"script")).length>0&&K(s,!f&&Y(e,"script")),c},cleanData:function(e){for(var t,r,n,i=d.event.special,o=0;void 0!==(r=e[o]);o++)if(_(r)){if(t=r[k.expando]){if(t.events)for(n in t.events)i[n]?d.event.remove(r,n):d.removeEvent(r,n,t.handle);r[k.expando]=void 0}r[F.expando]&&(r[F.expando]=void 0)}}}),d.fn.extend({domManip:ve,detach:function(e){return xe(this,e,!0)},remove:function(e){return xe(this,e)},text:function(e){return D(this,(function(e){return void 0===e?d.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||he(this,e).appendChild(e)}))},prepend:function(){return ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=he(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(d.cleanData(Y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return d.clone(this,e,t)}))},html:function(e){return D(this,(function(e){var t=this[0]||{},r=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ce.test(e)&&!X[($.exec(e)||["",""])[1].toLowerCase()]){e=d.htmlPrefilter(e);try{for(;r<n;r++)1===(t=this[r]||{}).nodeType&&(d.cleanData(Y(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ve(this,arguments,(function(t){var r=this.parentNode;d.inArray(this,e)<0&&(d.cleanData(Y(this)),r&&r.replaceChild(t,this))}),e)}}),d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){d.fn[e]=function(e){for(var r,n=[],i=d(e),o=i.length-1,a=0;a<=o;a++)r=a===o?this:this.clone(!0),d(i[a])[t](r),s.apply(n,r.get());return this.pushStack(n)}}));var ye,Te={HTML:"block",BODY:"block"};function Ne(e,t){var r=d(t.createElement(e)).appendTo(t.body),n=d.css(r[0],"display");return r.detach(),n}function Le(e){var t=n,r=Te[e];return r||("none"!==(r=Ne(e,t))&&r||((t=(ye=(ye||d("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),r=Ne(e,t),ye.detach()),Te[e]=r),r}var Ie=/^margin/,Ce=new RegExp("^("+V+")(?!px)[a-z%]+$","i"),Se=function(t){var r=t.ownerDocument.defaultView;return r&&r.opener||(r=e),r.getComputedStyle(t)},Ae=function(e,t,r,n){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=r.apply(e,n||[]),t)e.style[o]=s[o];return i},Re=n.documentElement;function be(e,t,r){var n,i,o,s,a=e.style;return""!==(s=(r=r||Se(e))?r.getPropertyValue(t)||r[t]:void 0)&&void 0!==s||d.contains(e.ownerDocument,e)||(s=d.style(e,t)),r&&!p.pixelMarginRight()&&Ce.test(s)&&Ie.test(t)&&(n=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=r.width,a.width=n,a.minWidth=i,a.maxWidth=o),void 0!==s?s+"":s}function Oe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var t,r,i,o,s=n.createElement("div"),a=n.createElement("div");function l(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Re.appendChild(s);var n=e.getComputedStyle(a);t="1%"!==n.top,o="2px"===n.marginLeft,r="4px"===n.width,a.style.marginRight="50%",i="4px"===n.marginRight,Re.removeChild(s)}a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),d.extend(p,{pixelPosition:function(){return l(),t},boxSizingReliable:function(){return null==r&&l(),r},pixelMarginRight:function(){return null==r&&l(),i},reliableMarginLeft:function(){return null==r&&l(),o},reliableMarginRight:function(){var t,r=a.appendChild(n.createElement("div"));return r.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",a.style.width="1px",Re.appendChild(s),t=!parseFloat(e.getComputedStyle(r).marginRight),Re.removeChild(s),a.removeChild(r),t}}))}();var we=/^(none|table(?!-c[ea]).+)/,Pe={position:"absolute",visibility:"hidden",display:"block"},De={letterSpacing:"0",fontWeight:"400"},_e=["Webkit","O","Moz","ms"],Me=n.createElement("div").style;function ke(e){if(e in Me)return e;for(var t=e[0].toUpperCase()+e.slice(1),r=_e.length;r--;)if((e=_e[r]+t)in Me)return e}function Fe(e,t,r){var n=j.exec(t);return n?Math.max(0,n[2]-(r||0))+(n[3]||"px"):t}function Ge(e,t,r,n,i){for(var o=r===(n?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===r&&(s+=d.css(e,r+H[o],!0,i)),n?("content"===r&&(s-=d.css(e,"padding"+H[o],!0,i)),"margin"!==r&&(s-=d.css(e,"border"+H[o]+"Width",!0,i))):(s+=d.css(e,"padding"+H[o],!0,i),"padding"!==r&&(s+=d.css(e,"border"+H[o]+"Width",!0,i)));return s}function Ue(e,t,r){var n=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Se(e),s="border-box"===d.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=be(e,t,o))<0||null==i)&&(i=e.style[t]),Ce.test(i))return i;n=s&&(p.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Ge(e,t,r||(s?"border":"content"),n,o)+"px"}function Be(e,t){for(var r,n,i,o=[],s=0,a=e.length;s<a;s++)(n=e[s]).style&&(o[s]=k.get(n,"olddisplay"),r=n.style.display,t?(o[s]||"none"!==r||(n.style.display=""),""===n.style.display&&q(n)&&(o[s]=k.access(n,"olddisplay",Le(n.nodeName)))):(i=q(n),"none"===r&&i||k.set(n,"olddisplay",i?r:d.css(n,"display"))));for(s=0;s<a;s++)(n=e[s]).style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[s]||"":"none"));return e}function Ve(e,t,r,n,i){return new Ve.prototype.init(e,t,r,n,i)}d.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=be(e,"opacity");return""===r?"1":r}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,r,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=d.camelCase(t),l=e.style;if(t=d.cssProps[a]||(d.cssProps[a]=ke(a)||a),s=d.cssHooks[t]||d.cssHooks[a],void 0===r)return s&&"get"in s&&void 0!==(i=s.get(e,!1,n))?i:l[t];"string"==(o=typeof r)&&(i=j.exec(r))&&i[1]&&(r=W(e,t,i),o="number"),null!=r&&r==r&&("number"===o&&(r+=i&&i[3]||(d.cssNumber[a]?"":"px")),p.clearCloneStyle||""!==r||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(r=s.set(e,r,n))||(l[t]=r))}},css:function(e,t,r,n){var i,o,s,a=d.camelCase(t);return t=d.cssProps[a]||(d.cssProps[a]=ke(a)||a),(s=d.cssHooks[t]||d.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,r)),void 0===i&&(i=be(e,t,n)),"normal"===i&&t in De&&(i=De[t]),""===r||r?(o=parseFloat(i),!0===r||isFinite(o)?o||0:i):i}}),d.each(["height","width"],(function(e,t){d.cssHooks[t]={get:function(e,r,n){if(r)return we.test(d.css(e,"display"))&&0===e.offsetWidth?Ae(e,Pe,(function(){return Ue(e,t,n)})):Ue(e,t,n)},set:function(e,r,n){var i,o=n&&Se(e),s=n&&Ge(e,t,n,"border-box"===d.css(e,"boxSizing",!1,o),o);return s&&(i=j.exec(r))&&"px"!==(i[3]||"px")&&(e.style[t]=r,r=d.css(e,t)),Fe(0,r,s)}}})),d.cssHooks.marginLeft=Oe(p.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(be(e,"marginLeft"))||e.getBoundingClientRect().left-Ae(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),d.cssHooks.marginRight=Oe(p.reliableMarginRight,(function(e,t){if(t)return Ae(e,{display:"inline-block"},be,[e,"marginRight"])})),d.each({margin:"",padding:"",border:"Width"},(function(e,t){d.cssHooks[e+t]={expand:function(r){for(var n=0,i={},o="string"==typeof r?r.split(" "):[r];n<4;n++)i[e+H[n]+t]=o[n]||o[n-2]||o[0];return i}},Ie.test(e)||(d.cssHooks[e+t].set=Fe)})),d.fn.extend({css:function(e,t){return D(this,(function(e,t,r){var n,i,o={},s=0;if(d.isArray(t)){for(n=Se(e),i=t.length;s<i;s++)o[t[s]]=d.css(e,t[s],!1,n);return o}return void 0!==r?d.style(e,t,r):d.css(e,t)}),e,t,arguments.length>1)},show:function(){return Be(this,!0)},hide:function(){return Be(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){q(this)?d(this).show():d(this).hide()}))}}),d.Tween=Ve,Ve.prototype={constructor:Ve,init:function(e,t,r,n,i,o){this.elem=e,this.prop=r,this.easing=i||d.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(d.cssNumber[r]?"":"px")},cur:function(){var e=Ve.propHooks[this.prop];return e&&e.get?e.get(this):Ve.propHooks._default.get(this)},run:function(e){var t,r=Ve.propHooks[this.prop];return this.options.duration?this.pos=t=d.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):Ve.propHooks._default.set(this),this}},Ve.prototype.init.prototype=Ve.prototype,Ve.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=d.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){d.fx.step[e.prop]?d.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[d.cssProps[e.prop]]&&!d.cssHooks[e.prop]?e.elem[e.prop]=e.now:d.style(e.elem,e.prop,e.now+e.unit)}}},Ve.propHooks.scrollTop=Ve.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},d.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},d.fx=Ve.prototype.init,d.fx.step={};var je,He,qe=/^(?:toggle|show|hide)$/,We=/queueHooks$/;function ze(){return e.setTimeout((function(){je=void 0})),je=d.now()}function $e(e,t){var r,n=0,i={height:e};for(t=t?1:0;n<4;n+=2-t)i["margin"+(r=H[n])]=i["padding"+r]=e;return t&&(i.opacity=i.width=e),i}function Qe(e,t,r){for(var n,i=(Xe.tweeners[t]||[]).concat(Xe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(n=i[o].call(r,t,e))return n}function Xe(e,t,r){var n,i,o=0,s=Xe.prefilters.length,a=d.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=je||ze(),r=Math.max(0,u.startTime+u.duration-t),n=1-(r/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(n);return a.notifyWith(e,[u,n,r]),n<1&&s?r:(a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:d.extend({},t),opts:d.extend(!0,{specialEasing:{},easing:d.easing._default},r),originalProperties:t,originalOptions:r,startTime:je||ze(),duration:r.duration,tweens:[],createTween:function(t,r){var n=d.Tween(e,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var r=0,n=t?u.tweens.length:0;if(i)return this;for(i=!0;r<n;r++)u.tweens[r].run(1);return t?(a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u,t])):a.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var r,n,i,o,s;for(r in e)if(i=t[n=d.camelCase(r)],o=e[r],d.isArray(o)&&(i=o[1],o=e[r]=o[0]),r!==n&&(e[n]=o,delete e[r]),(s=d.cssHooks[n])&&"expand"in s)for(r in o=s.expand(o),delete e[n],o)r in e||(e[r]=o[r],t[r]=i);else t[n]=i}(c,u.opts.specialEasing);o<s;o++)if(n=Xe.prefilters[o].call(u,e,c,u.opts))return d.isFunction(n.stop)&&(d._queueHooks(u.elem,u.opts.queue).stop=d.proxy(n.stop,n)),n;return d.map(c,Qe,u),d.isFunction(u.opts.start)&&u.opts.start.call(e,u),d.fx.timer(d.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}d.Animation=d.extend(Xe,{tweeners:{"*":[function(e,t){var r=this.createTween(e,t);return W(r.elem,e,j.exec(t),r),r}]},tweener:function(e,t){d.isFunction(e)?(t=e,e=["*"]):e=e.match(w);for(var r,n=0,i=e.length;n<i;n++)r=e[n],Xe.tweeners[r]=Xe.tweeners[r]||[],Xe.tweeners[r].unshift(t)},prefilters:[function(e,t,r){var n,i,o,s,a,l,u,c=this,p={},f=e.style,h=e.nodeType&&q(e),g=k.get(e,"fxshow");for(n in r.queue||(null==(a=d._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always((function(){c.always((function(){a.unqueued--,d.queue(e,"fx").length||a.empty.fire()}))}))),1===e.nodeType&&("height"in t||"width"in t)&&(r.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===("none"===(u=d.css(e,"display"))?k.get(e,"olddisplay")||Le(e.nodeName):u)&&"none"===d.css(e,"float")&&(f.display="inline-block")),r.overflow&&(f.overflow="hidden",c.always((function(){f.overflow=r.overflow[0],f.overflowX=r.overflow[1],f.overflowY=r.overflow[2]}))),t)if(i=t[n],qe.exec(i)){if(delete t[n],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[n])continue;h=!0}p[n]=g&&g[n]||d.style(e,n)}else u=void 0;if(d.isEmptyObject(p))"inline"===("none"===u?Le(e.nodeName):u)&&(f.display=u);else for(n in g?"hidden"in g&&(h=g.hidden):g=k.access(e,"fxshow",{}),o&&(g.hidden=!h),h?d(e).show():c.done((function(){d(e).hide()})),c.done((function(){var t;for(t in k.remove(e,"fxshow"),p)d.style(e,t,p[t])})),p)s=Qe(h?g[n]:0,n,c),n in g||(g[n]=s.start,h&&(s.end=s.start,s.start="width"===n||"height"===n?1:0))}],prefilter:function(e,t){t?Xe.prefilters.unshift(e):Xe.prefilters.push(e)}}),d.speed=function(e,t,r){var n=e&&"object"==typeof e?d.extend({},e):{complete:r||!r&&t||d.isFunction(e)&&e,duration:e,easing:r&&t||t&&!d.isFunction(t)&&t};return n.duration=d.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in d.fx.speeds?d.fx.speeds[n.duration]:d.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){d.isFunction(n.old)&&n.old.call(this),n.queue&&d.dequeue(this,n.queue)},n},d.fn.extend({fadeTo:function(e,t,r,n){return this.filter(q).css("opacity",0).show().end().animate({opacity:t},e,r,n)},animate:function(e,t,r,n){var i=d.isEmptyObject(e),o=d.speed(t,r,n),s=function(){var t=Xe(this,d.extend({},e),o);(i||k.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,r){var n=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=d.timers,s=k.get(this);if(i)s[i]&&s[i].stop&&n(s[i]);else for(i in s)s[i]&&s[i].stop&&We.test(i)&&n(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(r),t=!1,o.splice(i,1));!t&&r||d.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,r=k.get(this),n=r[e+"queue"],i=r[e+"queueHooks"],o=d.timers,s=n?n.length:0;for(r.finish=!0,d.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete r.finish}))}}),d.each(["toggle","show","hide"],(function(e,t){var r=d.fn[t];d.fn[t]=function(e,n,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate($e(t,!0),e,n,i)}})),d.each({slideDown:$e("show"),slideUp:$e("hide"),slideToggle:$e("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){d.fn[e]=function(e,r,n){return this.animate(t,e,r,n)}})),d.timers=[],d.fx.tick=function(){var e,t=0,r=d.timers;for(je=d.now();t<r.length;t++)(e=r[t])()||r[t]!==e||r.splice(t--,1);r.length||d.fx.stop(),je=void 0},d.fx.timer=function(e){d.timers.push(e),e()?d.fx.start():d.timers.pop()},d.fx.interval=13,d.fx.start=function(){He||(He=e.setInterval(d.fx.tick,d.fx.interval))},d.fx.stop=function(){e.clearInterval(He),He=null},d.fx.speeds={slow:600,fast:200,_default:400},d.fn.delay=function(t,r){return t=d.fx&&d.fx.speeds[t]||t,r=r||"fx",this.queue(r,(function(r,n){var i=e.setTimeout(r,t);n.stop=function(){e.clearTimeout(i)}}))},function(){var e=n.createElement("input"),t=n.createElement("select"),r=t.appendChild(n.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=r.selected,t.disabled=!0,p.optDisabled=!r.disabled,(e=n.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var Ye,Ke=d.expr.attrHandle;d.fn.extend({attr:function(e,t){return D(this,d.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){d.removeAttr(this,e)}))}}),d.extend({attr:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?d.prop(e,t,r):(1===o&&d.isXMLDoc(e)||(t=t.toLowerCase(),i=d.attrHooks[t]||(d.expr.match.bool.test(t)?Ye:void 0)),void 0!==r?null===r?void d.removeAttr(e,t):i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:(e.setAttribute(t,r+""),r):i&&"get"in i&&null!==(n=i.get(e,t))?n:null==(n=d.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&d.nodeName(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}},removeAttr:function(e,t){var r,n,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)for(;r=o[i++];)n=d.propFix[r]||r,d.expr.match.bool.test(r)&&(e[n]=!1),e.removeAttribute(r)}}),Ye={set:function(e,t,r){return!1===t?d.removeAttr(e,r):e.setAttribute(r,r),r}},d.each(d.expr.match.bool.source.match(/\w+/g),(function(e,t){var r=Ke[t]||d.find.attr;Ke[t]=function(e,t,n){var i,o;return n||(o=Ke[t],Ke[t]=i,i=null!=r(e,t,n)?t.toLowerCase():null,Ke[t]=o),i}}));var Ze=/^(?:input|select|textarea|button)$/i,Je=/^(?:a|area)$/i;d.fn.extend({prop:function(e,t){return D(this,d.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[d.propFix[e]||e]}))}}),d.extend({prop:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&d.isXMLDoc(e)||(t=d.propFix[t]||t,i=d.propHooks[t]),void 0!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:e[t]=r:i&&"get"in i&&null!==(n=i.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=d.find.attr(e,"tabindex");return t?parseInt(t,10):Ze.test(e.nodeName)||Je.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(d.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),d.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){d.propFix[this.toLowerCase()]=this}));var et=/[\t\r\n\f]/g;function tt(e){return e.getAttribute&&e.getAttribute("class")||""}d.fn.extend({addClass:function(e){var t,r,n,i,o,s,a,l=0;if(d.isFunction(e))return this.each((function(t){d(this).addClass(e.call(this,t,tt(this)))}));if("string"==typeof e&&e)for(t=e.match(w)||[];r=this[l++];)if(i=tt(r),n=1===r.nodeType&&(" "+i+" ").replace(et," ")){for(s=0;o=t[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");i!==(a=d.trim(n))&&r.setAttribute("class",a)}return this},removeClass:function(e){var t,r,n,i,o,s,a,l=0;if(d.isFunction(e))return this.each((function(t){d(this).removeClass(e.call(this,t,tt(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(w)||[];r=this[l++];)if(i=tt(r),n=1===r.nodeType&&(" "+i+" ").replace(et," ")){for(s=0;o=t[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");i!==(a=d.trim(n))&&r.setAttribute("class",a)}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):d.isFunction(e)?this.each((function(r){d(this).toggleClass(e.call(this,r,tt(this),t),t)})):this.each((function(){var t,n,i,o;if("string"===r)for(n=0,i=d(this),o=e.match(w)||[];t=o[n++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==r||((t=tt(this))&&k.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":k.get(this,"__className__")||""))}))},hasClass:function(e){var t,r,n=0;for(t=" "+e+" ";r=this[n++];)if(1===r.nodeType&&(" "+tt(r)+" ").replace(et," ").indexOf(t)>-1)return!0;return!1}});var rt=/\r/g,nt=/[\x20\t\r\n\f]+/g;d.fn.extend({val:function(e){var t,r,n,i=this[0];return arguments.length?(n=d.isFunction(e),this.each((function(r){var i;1===this.nodeType&&(null==(i=n?e.call(this,r,d(this).val()):e)?i="":"number"==typeof i?i+="":d.isArray(i)&&(i=d.map(i,(function(e){return null==e?"":e+""}))),(t=d.valHooks[this.type]||d.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=d.valHooks[i.type]||d.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(i,"value"))?r:"string"==typeof(r=i.value)?r.replace(rt,""):null==r?"":r:void 0}}),d.extend({valHooks:{option:{get:function(e){var t=d.find.attr(e,"value");return null!=t?t:d.trim(d.text(e)).replace(nt," ")}},select:{get:function(e){for(var t,r,n=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:n.length,l=i<0?a:o?i:0;l<a;l++)if(((r=n[l]).selected||l===i)&&(p.optDisabled?!r.disabled:null===r.getAttribute("disabled"))&&(!r.parentNode.disabled||!d.nodeName(r.parentNode,"optgroup"))){if(t=d(r).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var r,n,i=e.options,o=d.makeArray(t),s=i.length;s--;)((n=i[s]).selected=d.inArray(d.valHooks.option.get(n),o)>-1)&&(r=!0);return r||(e.selectedIndex=-1),o}}}}),d.each(["radio","checkbox"],(function(){d.valHooks[this]={set:function(e,t){if(d.isArray(t))return e.checked=d.inArray(d(e).val(),t)>-1}},p.checkOn||(d.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var it=/^(?:focusinfocus|focusoutblur)$/;d.extend(d.event,{trigger:function(t,r,i,o){var s,a,l,u,p,f,h,g=[i||n],E=c.call(t,"type")?t.type:t,m=c.call(t,"namespace")?t.namespace.split("."):[];if(a=l=i=i||n,3!==i.nodeType&&8!==i.nodeType&&!it.test(E+d.event.triggered)&&(E.indexOf(".")>-1&&(m=E.split("."),E=m.shift(),m.sort()),p=E.indexOf(":")<0&&"on"+E,(t=t[d.expando]?t:new d.Event(E,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),r=null==r?[t]:d.makeArray(r,[t]),h=d.event.special[E]||{},o||!h.trigger||!1!==h.trigger.apply(i,r))){if(!o&&!h.noBubble&&!d.isWindow(i)){for(u=h.delegateType||E,it.test(u+E)||(a=a.parentNode);a;a=a.parentNode)g.push(a),l=a;l===(i.ownerDocument||n)&&g.push(l.defaultView||l.parentWindow||e)}for(s=0;(a=g[s++])&&!t.isPropagationStopped();)t.type=s>1?u:h.bindType||E,(f=(k.get(a,"events")||{})[t.type]&&k.get(a,"handle"))&&f.apply(a,r),(f=p&&a[p])&&f.apply&&_(a)&&(t.result=f.apply(a,r),!1===t.result&&t.preventDefault());return t.type=E,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),r)||!_(i)||p&&d.isFunction(i[E])&&!d.isWindow(i)&&((l=i[p])&&(i[p]=null),d.event.triggered=E,i[E](),d.event.triggered=void 0,l&&(i[p]=l)),t.result}},simulate:function(e,t,r){var n=d.extend(new d.Event,r,{type:e,isSimulated:!0});d.event.trigger(n,null,t)}}),d.fn.extend({trigger:function(e,t){return this.each((function(){d.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var r=this[0];if(r)return d.event.trigger(e,t,r,!0)}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(e,t){d.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}})),d.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),p.focusin="onfocusin"in e,p.focusin||d.each({focus:"focusin",blur:"focusout"},(function(e,t){var r=function(e){d.event.simulate(t,e.target,d.event.fix(e))};d.event.special[t]={setup:function(){var n=this.ownerDocument||this,i=k.access(n,t);i||n.addEventListener(e,r,!0),k.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=k.access(n,t)-1;i?k.access(n,t,i):(n.removeEventListener(e,r,!0),k.remove(n,t))}}}));var ot=e.location,st=d.now(),at=/\?/;d.parseJSON=function(e){return JSON.parse(e+"")},d.parseXML=function(t){var r;if(!t||"string"!=typeof t)return null;try{r=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){r=void 0}return r&&!r.getElementsByTagName("parsererror").length||d.error("Invalid XML: "+t),r};var lt=/#.*$/,ut=/([?&])_=[^&]*/,ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,pt=/^(?:GET|HEAD)$/,dt=/^\/\//,ft={},ht={},gt="*/".concat("*"),Et=n.createElement("a");function mt(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var n,i=0,o=t.toLowerCase().match(w)||[];if(d.isFunction(r))for(;n=o[i++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(r)):(e[n]=e[n]||[]).push(r)}}function vt(e,t,r,n){var i={},o=e===ht;function s(a){var l;return i[a]=!0,d.each(e[a]||[],(function(e,a){var u=a(t,r,n);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function xt(e,t){var r,n,i=d.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&d.extend(!0,e,n),e}Et.href=ot.href,d.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ot.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?xt(xt(e,d.ajaxSettings),t):xt(d.ajaxSettings,e)},ajaxPrefilter:mt(ft),ajaxTransport:mt(ht),ajax:function(t,r){"object"==typeof t&&(r=t,t=void 0),r=r||{};var i,o,s,a,l,u,c,p,f=d.ajaxSetup({},r),h=f.context||f,g=f.context&&(h.nodeType||h.jquery)?d(h):d.event,E=d.Deferred(),m=d.Callbacks("once memory"),v=f.statusCode||{},x={},y={},T=0,N="canceled",L={readyState:0,getResponseHeader:function(e){var t;if(2===T){if(!a)for(a={};t=ct.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===T?s:null},setRequestHeader:function(e,t){var r=e.toLowerCase();return T||(e=y[r]=y[r]||e,x[e]=t),this},overrideMimeType:function(e){return T||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(T<2)for(t in e)v[t]=[v[t],e[t]];else L.always(e[L.status]);return this},abort:function(e){var t=e||N;return i&&i.abort(t),I(0,t),this}};if(E.promise(L).complete=m.add,L.success=L.done,L.error=L.fail,f.url=((t||f.url||ot.href)+"").replace(lt,"").replace(dt,ot.protocol+"//"),f.type=r.method||r.type||f.method||f.type,f.dataTypes=d.trim(f.dataType||"*").toLowerCase().match(w)||[""],null==f.crossDomain){u=n.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Et.protocol+"//"+Et.host!=u.protocol+"//"+u.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=d.param(f.data,f.traditional)),vt(ft,f,r,L),2===T)return L;for(p in(c=d.event&&f.global)&&0==d.active++&&d.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!pt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(at.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=ut.test(o)?o.replace(ut,"$1_="+st++):o+(at.test(o)?"&":"?")+"_="+st++)),f.ifModified&&(d.lastModified[o]&&L.setRequestHeader("If-Modified-Since",d.lastModified[o]),d.etag[o]&&L.setRequestHeader("If-None-Match",d.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||r.contentType)&&L.setRequestHeader("Content-Type",f.contentType),L.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+gt+"; q=0.01":""):f.accepts["*"]),f.headers)L.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(h,L,f)||2===T))return L.abort();for(p in N="abort",{success:1,error:1,complete:1})L[p](f[p]);if(i=vt(ht,f,r,L)){if(L.readyState=1,c&&g.trigger("ajaxSend",[L,f]),2===T)return L;f.async&&f.timeout>0&&(l=e.setTimeout((function(){L.abort("timeout")}),f.timeout));try{T=1,i.send(x,I)}catch(e){if(!(T<2))throw e;I(-1,e)}}else I(-1,"No Transport");function I(t,r,n,a){var u,p,x,y,N,I=r;2!==T&&(T=2,l&&e.clearTimeout(l),i=void 0,s=a||"",L.readyState=t>0?4:0,u=t>=200&&t<300||304===t,n&&(y=function(e,t,r){for(var n,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(i in a)if(a[i]&&a[i].test(n)){l.unshift(i);break}if(l[0]in r)o=l[0];else{for(i in r){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),r[o]}(f,L,n)),y=function(e,t,r,n){var i,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(r[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(i in u)if((a=i.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[i]:!0!==u[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,y,L,u),u?(f.ifModified&&((N=L.getResponseHeader("Last-Modified"))&&(d.lastModified[o]=N),(N=L.getResponseHeader("etag"))&&(d.etag[o]=N)),204===t||"HEAD"===f.type?I="nocontent":304===t?I="notmodified":(I=y.state,p=y.data,u=!(x=y.error))):(x=I,!t&&I||(I="error",t<0&&(t=0))),L.status=t,L.statusText=(r||I)+"",u?E.resolveWith(h,[p,I,L]):E.rejectWith(h,[L,I,x]),L.statusCode(v),v=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[L,f,u?p:x]),m.fireWith(h,[L,I]),c&&(g.trigger("ajaxComplete",[L,f]),--d.active||d.event.trigger("ajaxStop")))}return L},getJSON:function(e,t,r){return d.get(e,t,r,"json")},getScript:function(e,t){return d.get(e,void 0,t,"script")}}),d.each(["get","post"],(function(e,t){d[t]=function(e,r,n,i){return d.isFunction(r)&&(i=i||n,n=r,r=void 0),d.ajax(d.extend({url:e,type:t,dataType:i,data:r,success:n},d.isPlainObject(e)&&e))}})),d._evalUrl=function(e){return d.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},d.fn.extend({wrapAll:function(e){var t;return d.isFunction(e)?this.each((function(t){d(this).wrapAll(e.call(this,t))})):(this[0]&&(t=d(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this)},wrapInner:function(e){return d.isFunction(e)?this.each((function(t){d(this).wrapInner(e.call(this,t))})):this.each((function(){var t=d(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)}))},wrap:function(e){var t=d.isFunction(e);return this.each((function(r){d(this).wrapAll(t?e.call(this,r):e)}))},unwrap:function(){return this.parent().each((function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)})).end()}}),d.expr.filters.hidden=function(e){return!d.expr.filters.visible(e)},d.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var yt=/%20/g,Tt=/\[\]$/,Nt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Ct(e,t,r,n){var i;if(d.isArray(t))d.each(t,(function(t,i){r||Tt.test(e)?n(e,i):Ct(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,n)}));else if(r||"object"!==d.type(t))n(e,t);else for(i in t)Ct(e+"["+i+"]",t[i],r,n)}d.param=function(e,t){var r,n=[],i=function(e,t){t=d.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=d.ajaxSettings&&d.ajaxSettings.traditional),d.isArray(e)||e.jquery&&!d.isPlainObject(e))d.each(e,(function(){i(this.name,this.value)}));else for(r in e)Ct(r,e[r],t,i);return n.join("&").replace(yt,"+")},d.fn.extend({serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=d.prop(this,"elements");return e?d.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!d(this).is(":disabled")&&It.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!z.test(e))})).map((function(e,t){var r=d(this).val();return null==r?null:d.isArray(r)?d.map(r,(function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}})):{name:t.name,value:r.replace(Nt,"\r\n")}})).get()}}),d.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var St={0:200,1223:204},At=d.ajaxSettings.xhr();p.cors=!!At&&"withCredentials"in At,p.ajax=At=!!At,d.ajaxTransport((function(t){var r,n;if(p.cors||At&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);r=function(e){return function(){r&&(r=n=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(St[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=r(),n=a.onerror=r("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){r&&n()}))},r=r("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(r)throw e}},abort:function(){r&&r()}}})),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return d.globalEval(e),e}}}),d.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),d.ajaxTransport("script",(function(e){var t,r;if(e.crossDomain)return{send:function(i,o){t=d("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",r=function(e){t.remove(),r=null,e&&o("error"===e.type?404:200,e.type)}),n.head.appendChild(t[0])},abort:function(){r&&r()}}}));var Rt=[],bt=/(=)\?(?=&|$)|\?\?/;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Rt.pop()||d.expando+"_"+st++;return this[e]=!0,e}}),d.ajaxPrefilter("json jsonp",(function(t,r,n){var i,o,s,a=!1!==t.jsonp&&(bt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&bt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=d.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(bt,"$1"+i):!1!==t.jsonp&&(t.url+=(at.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||d.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},n.always((function(){void 0===o?d(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=r.jsonpCallback,Rt.push(i)),s&&d.isFunction(o)&&o(s[0]),s=o=void 0})),"script"})),d.parseHTML=function(e,t,r){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(r=t,t=!1),t=t||n;var i=N.exec(e),o=!r&&[];return i?[t.createElement(i[1])]:(i=te([e],t,o),o&&o.length&&d(o).remove(),d.merge([],i.childNodes))};var Ot=d.fn.load;function wt(e){return d.isWindow(e)?e:9===e.nodeType&&e.defaultView}d.fn.load=function(e,t,r){if("string"!=typeof e&&Ot)return Ot.apply(this,arguments);var n,i,o,s=this,a=e.indexOf(" ");return a>-1&&(n=d.trim(e.slice(a)),e=e.slice(0,a)),d.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&d.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(n?d("<div>").append(d.parseHTML(e)).find(n):e)})).always(r&&function(e,t){s.each((function(){r.apply(this,o||[e.responseText,t,e])}))}),this},d.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){d.fn[t]=function(e){return this.on(t,e)}})),d.expr.filters.animated=function(e){return d.grep(d.timers,(function(t){return e===t.elem})).length},d.offset={setOffset:function(e,t,r){var n,i,o,s,a,l,u=d.css(e,"position"),c=d(e),p={};"static"===u&&(e.style.position="relative"),a=c.offset(),o=d.css(e,"top"),l=d.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(s=(n=c.position()).top,i=n.left):(s=parseFloat(o)||0,i=parseFloat(l)||0),d.isFunction(t)&&(t=t.call(e,r,d.extend({},a))),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):c.css(p)}},d.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){d.offset.setOffset(this,e,t)}));var t,r,n=this[0],i={top:0,left:0},o=n&&n.ownerDocument;return o?(t=o.documentElement,d.contains(t,n)?(i=n.getBoundingClientRect(),r=wt(o),{top:i.top+r.pageYOffset-t.clientTop,left:i.left+r.pageXOffset-t.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,r=this[0],n={top:0,left:0};return"fixed"===d.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),d.nodeName(e[0],"html")||(n=e.offset()),n.top+=d.css(e[0],"borderTopWidth",!0),n.left+=d.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-d.css(r,"marginTop",!0),left:t.left-n.left-d.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===d.css(e,"position");)e=e.offsetParent;return e||Re}))}}),d.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var r="pageYOffset"===t;d.fn[e]=function(n){return D(this,(function(e,n,i){var o=wt(e);if(void 0===i)return o?o[t]:e[n];o?o.scrollTo(r?o.pageXOffset:i,r?i:o.pageYOffset):e[n]=i}),e,n,arguments.length)}})),d.each(["top","left"],(function(e,t){d.cssHooks[t]=Oe(p.pixelPosition,(function(e,r){if(r)return r=be(e,t),Ce.test(r)?d(e).position()[t]+"px":r}))})),d.each({Height:"height",Width:"width"},(function(e,t){d.each({padding:"inner"+e,content:t,"":"outer"+e},(function(r,n){d.fn[n]=function(n,i){var o=arguments.length&&(r||"boolean"!=typeof n),s=r||(!0===n||!0===i?"margin":"border");return D(this,(function(t,r,n){var i;return d.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===n?d.css(t,r,s):d.style(t,r,n,s)}),t,o?n:void 0,o,null)}}))})),d.fn.extend({bind:function(e,t,r){return this.on(e,null,t,r)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,r,n){return this.on(t,e,r,n)},undelegate:function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},size:function(){return this.length}}),d.fn.andSelf=d.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return d}));var Pt=e.jQuery,Dt=e.$;return d.noConflict=function(t){return e.$===d&&(e.$=Dt),t&&e.jQuery===d&&(e.jQuery=Pt),d},t||(e.jQuery=e.$=d),d}))},{}],17:[function(e,t,r){var n=e("../src/store-engine"),i=e("../storages/all"),o=[e("../plugins/json2")];t.exports=n.createStore(i,o)},{"../plugins/json2":18,"../src/store-engine":20,"../storages/all":22}],18:[function(e,t,r){t.exports=function(){return e("./lib/json2"),{}}},{"./lib/json2":19}],19:[function(require,module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var r,n,i,o,s,a=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,r=0;r<o;r+=1)s[r]=str(r,l)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(o=rep.length,r=0;r<o;r+=1)"string"==typeof rep[r]&&(i=str(n=rep[r],l))&&s.push(quote(n)+(gap?": ":":")+i);else for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(i=str(n,l))&&s.push(quote(n)+(gap?": ":":")+i);return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var r,n,i=e[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(void 0!==(n=walk(i,r))?i[r]=n:delete i[r]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],20:[function(e,t,r){var n=e("./util"),i=n.slice,o=n.pluck,s=n.each,a=n.bind,l=n.create,u=n.isList,c=n.isFunction,p=n.isObject;t.exports={createStore:f};var d={version:"2.0.12",enabled:!1,get:function(e,t){var r=this.storage.read(this._namespacePrefix+e);return this._deserialize(r,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(r,n){e.call(t,t._deserialize(r),(n||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return f(this.storage,this.plugins,e)}};function f(e,t,r){r||(r=""),e&&!u(e)&&(e=[e]),t&&!u(t)&&(t=[t]);var n=r?"__storejs_"+r+"_":"",f=r?new RegExp("^"+n):null;if(!/^[a-zA-Z0-9_\-]*$/.test(r))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h=l({_namespacePrefix:n,_namespaceRegexp:f,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var r=e.read(t)===t;return e.remove(t),r}catch(e){return!1}},_assignPluginFnProp:function(e,t){var r=this[t];this[t]=function(){var t=i(arguments,0),n=this;function o(){if(r)return s(arguments,(function(e,r){t[r]=e})),r.apply(n,t)}var a=[o].concat(t);return e.apply(n,a)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var r="";try{r=JSON.parse(e)}catch(t){r=e}return void 0!==r?r:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(u(e))s(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!c(e))throw new Error("Plugins must be function values that return objects");var r=e.call(this);if(!p(r))throw new Error("Plugins must return an object of function properties");s(r,(function(r,n){if(!c(r))throw new Error("Bad plugin property: "+n+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(r,n)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},d,{plugins:[]});return h.raw={},s(h,(function(e,t){c(e)&&(h.raw[t]=a(h,e))})),s(e,(function(e){h._addStorage(e)})),s(t,(function(e){h._addPlugin(e)})),h}},{"./util":21}],21:[function(e,t,r){(function(e){(function(){var r=Object.assign?Object.assign:function(e,t,r,n){for(var i=1;i<arguments.length;i++)a(Object(arguments[i]),(function(t,r){e[r]=t}));return e},n=function(){if(Object.create)return function(e,t,n,i){var o=s(arguments,1);return r.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,n,i,o){var a=s(arguments,1);return e.prototype=t,r.apply(this,[new e].concat(a))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function s(e,t){return Array.prototype.slice.call(e,t||0)}function a(e,t){l(e,(function(e,r){return t(e,r),!1}))}function l(e,t){if(u(e)){for(var r=0;r<e.length;r++)if(t(e[r],r))return e[r]}else for(var n in e)if(e.hasOwnProperty(n)&&t(e[n],n))return e[n]}function u(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}t.exports={assign:r,create:n,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:s,each:a,map:function(e,t){var r=u(e)?[]:{};return l(e,(function(e,n){return r[n]=t(e,n),!1})),r},pluck:l,isList:u,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:o}}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(e,t,r){t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":23,"./localStorage":24,"./memoryStorage":25,"./oldFF-globalStorage":26,"./oldIE-userDataStorage":27,"./sessionStorage":28}],23:[function(e,t,r){var n=e("../src/util"),i=n.Global,o=n.trim;t.exports={name:"cookieStorage",read:function(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(s.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(s.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:a,remove:l,clearAll:function(){a((function(e,t){l(t)}))}};var s=i.document;function a(e){for(var t=s.cookie.split(/; ?/g),r=t.length-1;r>=0;r--)if(o(t[r])){var n=t[r].split("="),i=unescape(n[0]);e(unescape(n[1]),i)}}function l(e){e&&u(e)&&(s.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(s.cookie)}},{"../src/util":21}],24:[function(e,t,r){var n=e("../src/util").Global;function i(){return n.localStorage}function o(e){return i().getItem(e)}t.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],25:[function(e,t,r){t.exports={name:"memoryStorage",read:function(e){return n[e]},write:function(e,t){n[e]=t},each:function(e){for(var t in n)n.hasOwnProperty(t)&&e(n[t],t)},remove:function(e){delete n[e]},clearAll:function(e){n={}}};var n={}},{}],26:[function(e,t,r){var n=e("../src/util").Global;t.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=n.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var r=i.key(t);e(i[r],r)}}},{"../src/util":21}],27:[function(e,t,r){var n=e("../src/util").Global;t.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!s){var r=l(e);o((function(e){e.setAttribute(r,t),e.save("storejs")}))}},read:function(e){if(!s){var t=l(e),r=null;return o((function(e){r=e.getAttribute(t)})),r}},each:function(e){o((function(t){for(var r=t.XMLDocument.documentElement.attributes,n=r.length-1;n>=0;n--){var i=r[n];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);o((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var r=t.length-1;r>=0;r--)e.removeAttribute(t[r].name);e.save("storejs")}))}};var i=n.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,r;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,r=e.createElement("div")}catch(t){r=i.createElement("div"),e=i.body}return function(t){var n=[].slice.call(arguments,0);n.unshift(r),e.appendChild(r),r.addBehavior("#default#userData"),r.load("storejs"),t.apply(this,n),e.removeChild(r)}}(),s=(n.navigator?n.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),a=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(a,"___")}},{"../src/util":21}],28:[function(e,t,r){var n=e("../src/util").Global;function i(){return n.sessionStorage}function o(e){return i().getItem(e)}t.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],29:[function(e,t,r){t.exports={_args:[[{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},"/home/sava/IntellijProjects/YASQE-Ontotext"]],_from:"yasgui-utils@>=1.6.0 <2.0.0",_id:"yasgui-utils@1.6.7",_inCache:!0,_location:"/yasgui-utils",_nodeVersion:"7.10.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/yasgui-utils-1.6.7.tgz_1495459781202_0.06725964159704745"},_npmUser:{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"},_npmVersion:"4.2.0",_phantomChildren:{},_requested:{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",_shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",_shrinkwrap:null,_spec:"yasgui-utils@^1.6.0",_where:"/home/sava/IntellijProjects/YASQE-Ontotext",author:{name:"Laurens Rietveld"},bugs:{url:"https://github.com/YASGUI/Utils/issues"},dependencies:{store:"^2.0.4"},description:"Utils for YASGUI libs",devDependencies:{},directories:{},dist:{shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",tarball:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz"},gitHead:"6031b1cb732d390b29cd5376dceb9a9d665bbd11",homepage:"https://github.com/YASGUI/Utils",licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],main:"src/main.js",maintainers:[{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"}],name:"yasgui-utils",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},scripts:{},version:"1.6.7"}},{}],30:[function(e,t,r){window.console=window.console||{log:function(){}},t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version},nestedExists:function(e){for(var t=Array.prototype.slice.call(arguments,1),r=0;r<t.length;r++){if(!e||!e.hasOwnProperty(t[r]))return!1;e=e[t[r]]}return!0}}},{"../package.json":29,"./storage.js":31,"./svg.js":32}],31:[function(e,t,r){var n=e("store"),i={day:function(){return 864e5},month:function(){i.day()},year:function(){i.month()}},o=t.exports={set:function(e,t,r,o){if(n.enabled&&e&&void 0!==t){"string"==typeof r&&(r=i[r]()),t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));try{n.set(e,{val:t,exp:r,time:(new Date).getTime()})}catch(e){if(e.quotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}(e),!e.quotaExceeded||!o)throw e;o(e)}}},remove:function(e){n.enabled&&e&&n.remove(e)},removeAll:function(e){n.enabled&&(e?"function"==typeof e&&n.each((function(t,r){e(r,t)&&o.remove(r)})):n.clearAll())},get:function(e){if(!n.enabled)return null;if(e){var t=n.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}},{store:17}],32:[function(e,t,r){t.exports={draw:function(e,r){if(e){var n=t.exports.getElement(r);n&&(e.append?e.append(n):e.appendChild(n))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=(new DOMParser).parseFromString(e,"text/xml").documentElement,r=document.createElement("div");return r.className="svgImg",r.appendChild(t),r}return!1}}},{}],33:[function(e,t,r){t.exports={name:"yasgui-yasqe",description:"Yet Another SPARQL Query Editor",version:"2.10.5",main:"src/main.js",license:"MIT",author:"Laurens Rietveld",homepage:"http://yasqe.yasgui.org",scripts:{dev:"gulp serve",build:"gulp",patch:"gulp patch",minor:"gulp minor",major:"gulp major"},devDependencies:{"gulp-bump":"^2.2.0","gulp-connect":"^4.2.0","gulp-embedlr":"^0.5.2","gulp-git":"^1.10.0","gulp-livereload":"^3.8.1","gulp-tag-version":"^1.3.0",watchify:"^3.7.0"},bugs:"https://github.com/YASGUI/YASQE/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASQE.git"},dependencies:{"bootstrap-sass":"~3.3.1",browserify:"^13.1.0","browserify-transform-tools":"^1.6.0",codemirror:"5.17.0",exorcist:"^0.4.0",gulp:"~3.9.0","gulp-autoprefixer":"^3.1.0","gulp-concat":"^2.6.0","gulp-cssimport":"^3.1.0","gulp-cssnano":"^2.1.2","gulp-filter":"^4.0.0","gulp-jsvalidate":"^2.1.0","gulp-notify":"^2.2.0","gulp-rename":"^1.2.2","gulp-sass":"^2.2.0","gulp-sourcemaps":"^1.6.0","gulp-streamify":"1.0.2","gulp-uglify":"~0.2.1",jquery:"^2.2.4","require-dir":"^0.3.0","run-sequence":"^1.2.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~1.1.0","vinyl-transform":"1.0.0","yasgui-utils":"^1.6.0"},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"}}}},{}],34:[function(e,t,r){"use strict";var n=e("jquery"),i=e("../utils.js"),o=e("yasgui-utils"),s=e("../../lib/trie.js");e("../main.js"),t.exports=function(t,r){var l={},u={},c={},p=!1;r.translate=e("../translate.js")(r),r.on("cursorActivity",(function(e,t){d(!0)})),r.on("keyHandled",(function(e,t,r){"Esc"===t&&(p=!1)})),r.on("change",(function(e,t,r){void 0!==r&&" "==r.text&&(p=!1);var i=[];for(var o in l)l[o].is(":visible")&&i.push(l[o]);if(i.length>0){var s=n(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),a=0;s.is(":visible")&&(a=s.outerWidth()),i.forEach((function(e){e.css("right",a)}))}}));var d=function(e){if(!r.somethingSelected()){r.fromAutoShow=e;var i=function(n){if(e&&!p)return!1;if(e&&!n.autoShow)return!1;e||(p=!0);var i={closeCharacters:/(?=a)b/,completeSingle:!1};return!n.bulk&&n.async&&(i.async=!0),t.showHint(r,(function(e,t){return f(n,t)}),i),!0};for(var o in u)if(-1!=n.inArray(o,r.options.autocompleters)){var s=u[o];if(s.isValidCompletionPosition)if(s.isValidCompletionPosition()){if((!s.callbacks||!s.callbacks.validPosition||!1!==s.callbacks.validPosition(r,s))&&i(s))break}else s.callbacks&&s.callbacks.invalidPosition&&s.callbacks.invalidPosition(r,s)}}},f=function(e,t){var n=r.getCompleteToken();if(e.preProcessToken&&(n=e.preProcessToken(n)),n){if(e.bulk||!e.async)return function(t){var r=t.autocompletionString||t.string,n=[];if(c[e.name])n=c[e.name].autoComplete(r);else if("function"==typeof e.get&&0==e.async)n=e.get(r);else if("object"==typeof e.get)for(var i=r.length,o=0;o<e.get.length;o++){var s=e.get[o];s.slice(0,i)==r&&n.push(s)}return g(n,e,t)}(n);e.get(n,(function(r){t(g(r,e,n))}))}},h=function(e,t,r){return e.replace(new RegExp(t,"g"),r)},g=function(e,i,o){for(var s,l=[],u=0;u<e.length;u++){var c=e[u];if(c.value){var d=c.value,f=c.description;if("prefix"===c.type?d+=":":i.postProcessToken&&(d=i.postProcessToken(o,d)),(!d.startsWith("<")||!d.endsWith(">"))&&d.indexOf(":")>0){var g=d.indexOf(":");d=d.substring(0,g+1)+((s=d.substring(g+1)).trim().startsWith("<")&&s.trim().endsWith(">")?s:(s=encodeURIComponent(s),s=h(s,"[*]","%2a"),s=h(s,"[!]","%21"),s=h(s,"[(]","%28"),s=h(s,"[)]","%29"),s=h(s,"[~]","%7e"),s=h(s,"[']","%27")))}l.push({text:d,displayText:f,hint:function(e,t,r){p=!1,a(e,t,r)},render:function(e,t,r){n(e).append(r.displayText)}})}}var E=r.getCursor(),m={completionToken:o.string,list:l,from:{line:E.line,ch:o.start},to:{line:E.line,ch:o.end}};if(i.callbacks)for(var v in i.callbacks)i.callbacks[v]&&t.on(m,v,i.callbacks[v]);return m};return{init:function(e,t){var n=u[e]=new t(r,e);if(n.name=e,n.bulk){var a=function(e){e&&e instanceof Array&&e.length>0&&function(e,t){c[e.name]=new s;for(var n=0;n<t.length;n++)c[e.name].insert(t[n]);var a=i.getPersistencyId(r,e.persistent);a&&o.storage.set(a,t,"month")}(n,e)};if(n.get instanceof Array)a(n.get);else{var l=null,p=i.getPersistencyId(r,n.persistent);p&&(l=o.storage.get(p)),l&&l.length>0?a(l):n.get instanceof Function&&(n.async?n.get(null,a):a(n.get()))}}},completers:u,notifications:{getEl:function(e){return n(l[e.name])},show:function(e,t){t.autoshow||(l[t.name]||(l[t.name]=n("<div class='completionNotification'></div>")),n("#keyboardShortcuts").hide(),l[t.name].show().text(e.translate("yasqe.autocompleterBase.message")).appendTo(n(e.getWrapperElement())))},hide:function(e,t){l[t.name]&&(l[t.name].hide(),n("#keyboardShortcuts").show())}},autoComplete:d,getTrie:function(e){return"string"==typeof e?c[e]:c[e.name]}}};var a=function(e,t,r){r.text!=e.getTokenAt(e.getCursor()).string&&e.replaceRange(r.text,t.from,t.to)}},{"../../lib/trie.js":4,"../main.js":48,"../translate.js":54,"../utils.js":55,jquery:16,"yasgui-utils":30}],35:[function(e,t,r){"use strict";e("jquery"),t.exports=function(r,n){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(r)},get:function(t,n){return e("./utils").fetchFromLov(r,this,t,n)},preProcessToken:function(e){return t.exports.preProcessToken(r,e)},postProcessToken:function(e,n){return t.exports.postProcessToken(r,e,n)},async:!0,bulk:!1,autoShow:!1,persistent:n,callbacks:{validPosition:r.autocompleters.notifications.show,invalidPosition:r.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.indexOf("?"))return!1;var r=e.getCursor(),n=e.getPreviousNonWsToken(r.line,t);return"a"==n.string||"rdf:type"==n.string||"rdfs:domain"==n.string||"rdfs:range"==n.string},t.exports.preProcessToken=function(t,r){return e("./utils.js").preprocessResourceTokenForCompletion(t,r)},t.exports.postProcessToken=function(t,r,n){return e("./utils.js").postprocessResourceTokenForCompletion(t,r,n)}},{"./utils":40,"./utils.js":40,jquery:16}],36:[function(e,t,r){"use strict";var n,i,o=e("jquery");t.exports=function(e,r){return e.on("repositoryOrAuthorizationChanged",(function(e,t){i=e,n=t})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(r,n){return t.exports.fetchAutocomplete(e,r,n)},preProcessToken:function(r){return t.exports.preProcessToken(e,r)},postProcessToken:function(r,n){return t.exports.postProcessToken(e,r,n)},async:!0,bulk:!1,autoShow:!0,persistent:r,callbacks:{validPosition:e.autocompleters.notifications.show,invalidPosition:e.autocompleters.notifications.hide}}},t.exports.fetchAutocomplete=function(e,t,r){if(i&&"SYSTEM"!==i){if(!t||!t.string||0===t.string.trim().length)return!1;var s;s=t.tokenPrefix?t.tokenPrefixUri+";"+t.string.substring(t.tokenPrefix.length):t.autocompletionString.startsWith("http://")?t.autocompletionString+";":t.autocompletionString;var a={"X-GraphDB-Repository":i};n&&(a.Authorization=n),o.get({url:"rest/autocomplete/query",data:{q:s},success:function(t,n,i){204!==i.status||e.fromAutoShow?t&&r(t.suggestions):e.toastBuildIndex()},dataType:"json",headers:a}).fail((function(t){e.fromAutoShow||e.toastError(t)}))}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor();if(e.getTokenAt(t),0==e.getLine(t.line).toUpperCase().trim().indexOf("PREFIX"))return!1;var r=e.getCompleteToken();return-1!=o.inArray("IRI_REF",r.state.possibleCurrent)&&0!=r.string.length&&0!=r.string.indexOf("?")},t.exports.preProcessToken=function(t,r){return e("./utils.js").preprocessResourceTokenForCompletion(t,r)},t.exports.postProcessToken=function(t,r,n){return e("./utils.js").postprocessResourceTokenForCompletion(t,r,n)}},{"./utils.js":40,jquery:16}],37:[function(e,t,r){"use strict";var n=e("jquery");t.exports=function(r,n){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(r)},get:function(t,n){return e("./utils").fetchFromLov(r,this,t,n)},preProcessToken:function(e){return t.exports.preProcessToken(r,e)},postProcessToken:function(e,n){return t.exports.postProcessToken(r,e,n)},async:!0,bulk:!1,autoShow:!1,persistent:n,callbacks:{validPosition:r.autocompleters.notifications.show,invalidPosition:r.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.length)return!1;if(0==t.string.indexOf("?"))return!1;if(n.inArray("a",t.state.possibleCurrent)>=0)return!0;var r=e.getCursor();return"rdfs:subPropertyOf"==e.getPreviousNonWsToken(r.line,t).string},t.exports.preProcessToken=function(t,r){return e("./utils.js").preprocessResourceTokenForCompletion(t,r)},t.exports.postProcessToken=function(t,r,n){return e("./utils.js").postprocessResourceTokenForCompletion(t,r,n)}},{"./utils":40,"./utils.js":40,jquery:16}],38:[function(e,t,r){"use strict";var n,i=e("jquery"),o=(e("./utils"),{"string-2":"prefixed",atom:"var"});t.exports=function(e,r){return e.on("change",(function(){t.exports.appendPrefixIfNeeded(e,r)})),e.on("namespacesChanged",(function(r){t.exports.updateNamespaces(e,r)})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(e,t){n=t},preProcessToken:function(r){return t.exports.preprocessPrefixTokenForCompletion(e,r)},async:!0,bulk:!0,autoShow:!0,persistent:null}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor(),r=e.getTokenAt(t);if(e.getLine(t.line).length>t.ch)return!1;if("ws"!=r.type&&(r=e.getCompleteToken()),0==!r.string.indexOf("a")&&-1==i.inArray("PNAME_NS",r.state.possibleCurrent))return!1;var n=e.getPreviousNonWsToken(t.line,r);return!(!n||"PREFIX"!=n.string.toUpperCase())},t.exports.preprocessPrefixTokenForCompletion=function(e,t){var r=e.getPreviousNonWsToken(e.getCursor().line,t);return r&&r.string&&":"==r.string.slice(-1)&&(t={start:r.start,end:t.end,string:r.string+" "+t.string,state:t.state}),t},t.exports.appendPrefixIfNeeded=function(e,t){if(e.autocompleters.getTrie(t)&&e.options.autocompleters&&-1!=e.options.autocompleters.indexOf(t)){var r=e.getCursor(),n=e.getTokenAt(r);if("prefixed"==o[n.type]){var i=n.string.indexOf(":");if(-1!==i){var s=e.getPreviousNonWsToken(r.line,n).string.toUpperCase(),a=e.getTokenAt({line:r.line,ch:n.start});if("PREFIX"!=s&&("ws"==a.type||null==a.type)){var l=n.string.substring(0,i+1);if(null==e.getPrefixesFromQuery()[l.slice(0,-1)]){var u=e.autocompleters.getTrie(t).autoComplete(l);u.length>0&&e.addPrefixes(u[0])}}}}}},t.exports.updateNamespaces=function(e,t){var r=!1,o=i.map(t,(function(e,t){return"onto"===t&&(r=!0),t+": <"+e+">"}));r||o.push("onto: <http://www.ontotext.com/>"),o.sort(),n(o)}},{"./utils":40,jquery:16}],39:[function(e,t,r){t.exports=function(e,t){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return"ws"!=t.type&&(t=e.getCompleteToken()).string.length>1},get:function(e,t){for(var r=["COUNT","SUM","MIN","MAX","AVG","SAMPLE","STR","LANG","LANGMATCHES","DATATYPE","BOUND","IRI","URI","BNODE","RAND","ABS","CEIL","FLOOR","ROUND","CONCAT","SUBSTR","STRLEN","REPLACE","UCASE","LCASE","ENCODE_FOR_URI","CONTAINS","STRSTARTS","STRENDS","STRBEFORE","STRAFTER","YEAR","MONTH","DAY","HOURS","MINUTES","SECONDS","TIMEZONE","TZ","NOW","UUID","STRUUID","MD5","SHA1","SHA256","SHA384","SHA512","COALESCE","IF","STRLANG","STRDT","sameTerm","isIRI","isURI","isBLANK","isLITERAL","isNUMERIC","REGEX","EXISTS","FILTER"],n=[],i=0;i<r.length;i++){var o=r[i],s=o.toLowerCase(),a=e.toLowerCase();0===s.indexOf(a)&&n.push(o+"(")}return n.sort(),n},preProcessToken:null,postProcessToken:null,async:!1,bulk:!1,autoShow:!0,persistent:null,handlers:{validPosition:null,invalidPosition:null,shown:null,select:null,pick:null,close:null}}}},{}],40:[function(e,t,r){"use strict";var n=e("jquery"),i=(e("./utils.js"),e("yasgui-utils")),o=0===window.location.protocol.indexOf("http")?"//":"http://";t.exports={fetchFromLov:function(t,r,s,a){if(!s||!s.string||0==s.string.trim().length)return t.autocompleters.notifications.getEl(r).empty().append(t.translate("yasqe.utils.message1")),!1;var l={q:s.autocompletionString,page:1};"classes"==r.name?l.type="class":l.type="property";var u=[],c="",p=function(){c=o+"lov.okfn.org/dataset/lov/api/v2/autocomplete/terms?"+n.param(l)};p();var d=function(){n.get(c,(function(e){for(var i=0;i<e.results.length;i++)n.isArray(e.results[i].uri)&&e.results[i].uri.length>0?u.push(e.results[i].uri[0]):u.push(e.results[i].uri);u.length<e.total_results&&u.length<50?(l.page++,p(),d()):(u.length>0?t.autocompleters.notifications.hide(t,r):t.autocompleters.notifications.getEl(r).text(t.translate("yasqe.utils.message2")),a(u))})).fail((function(e,n,i){t.autocompleters.notifications.getEl(r).empty().append(t.translate("yasqe.utils.message3"))}))};t.autocompleters.notifications.getEl(r).empty().append(n("<span>Fetchting autocompletions &nbsp;</span>")).append(n(i.svg.getElement(e("../imgs.js").loader)).addClass("notificationLoader")),d()},preprocessResourceTokenForCompletion:function(t,r){var n=t.getPrefixesFromQuery();if(0==!r.string.indexOf("<")&&(r.tokenPrefix=r.string.substring(0,r.string.indexOf(":")+1),null!=n[r.tokenPrefix.slice(0,-1)]&&(r.tokenPrefixUri=n[r.tokenPrefix.slice(0,-1)])),t.translate=e("../translate.js")(t),r.autocompletionString=r.string.trim(),0==!r.string.indexOf("<")&&r.string.indexOf(":")>-1)for(var i in n)if(0==r.string.indexOf(i)){r.autocompletionString=n[i],r.autocompletionString+=r.string.substring(i.length+1);break}return 0==r.autocompletionString.indexOf("<")&&(r.autocompletionString=r.autocompletionString.substring(1)),-1!==r.autocompletionString.indexOf(">",r.length-1)&&(r.autocompletionString=r.autocompletionString.substring(0,r.autocompletionString.length-1)),r},postprocessResourceTokenForCompletion:function(e,t,r){if(t.tokenPrefix&&t.autocompletionString&&t.tokenPrefixUri)r=t.tokenPrefix+r.substring(t.tokenPrefixUri.length);else{var n=e.getPrefixesFromQuery(),i=_.filter(_.values(n),(function(e){return r.startsWith(e)}));if(i.length>0){var o=_.findKey(n,(function(e){return e===i[0]}));r=o+":"+r.substring(n[o].length)}else{if(0===r.indexOf("<b>"+t.string))return r;if(r.startsWith("<<")&&r.endsWith(">>"))return r;r="<"+r+">"}}return r}}},{"../imgs.js":47,"../translate.js":54,"./utils.js":40,jquery:16,"yasgui-utils":30}],41:[function(e,t,r){"use strict";var n=e("jquery");t.exports=function(e){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return!("ws"==t.type||!(t=e.getCompleteToken(t))||0!=t.string.indexOf("?"))},get:function(t){if(0==t.trim().length)return[];var r={};n(e.getWrapperElement()).find(".cm-atom").each((function(){var e=this.innerHTML;if(0==e.indexOf("?")){var i=n(this).next();if(i.attr("class")&&i.attr("class").indexOf("cm-atom")>=0&&(e+=i.text()),e.length<=1)return;if(0!==e.indexOf(t))return;if(e==t)return;r[e]=!0}}));var i=[];for(var o in r)i.push(o);return i.sort(),i},async:!1,bulk:!1,autoShow:!0}}},{jquery:16}],42:[function(e,t,r){var n=e("./sparql.js"),i=e("jquery"),o=function(e){return"'"+e+"'"};t.exports={createCurlString:function(e,t){var r=n.getAjaxConfig(e,t),s=r.url;0!==r.url.indexOf("http")&&(s=window.location.protocol+"//"+window.location.host,0===r.url.indexOf("/")?s+=r.url:s+=window.location.pathname+r.url);var a=["curl",s,"-X",e.options.sparql.requestMethod];for(var l in"POST"==e.options.sparql.requestMethod&&a.push("--data "+o(i.param(r.data))),r.headers)a.push("-H "+o(l+": "+r.headers[l]));return a.join(" ")}}},{"./sparql.js":51,jquery:16}],43:[function(e,t,r){var n=e("jquery"),i=e("./main.js");i.defaults=n.extend(!0,{},i.defaults,{mode:"sparql11",value:"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nSELECT * WHERE {\n ?sub ?pred ?obj .\n} \nLIMIT 10",highlightSelectionMatches:{showToken:/\w/},tabMode:"indent",autoCloseBrackets:!0,lineNumbers:!0,lineWrapping:!0,backdrop:!1,foldGutter:{rangeFinder:new i.fold.combine(i.fold.brace,i.fold.prefix)},collapsePrefixesOnLoad:!1,gutters:["gutterErrorBar","CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:!0,fixedGutter:!0,syntaxErrorCheck:!0,extraKeys:{"Alt-Enter":i.autoComplete,"Ctrl-Space":i.autoComplete,"Cmd-Space":i.autoComplete,"Ctrl-D":i.deleteLine,"Ctrl-K":i.deleteLine,"Cmd-D":i.deleteLine,"Cmd-K":i.deleteLine,"Ctrl-/":i.commentLines,"Cmd-/":i.commentLines,"Ctrl-Alt-Down":i.copyLineDown,"Ctrl-Alt-Up":i.copyLineUp,"Cmd-Alt-Down":i.copyLineDown,"Cmd-Alt-Up":i.copyLineUp,"Shift-Ctrl-F":i.doAutoFormat,"Shift-Cmd-F":i.doAutoFormat,"Ctrl-]":i.indentMore,"Cmd-]":i.indentMore,"Ctrl-[":i.indentLess,"Cmd-[":i.indentLess,"Ctrl-S":i.storeQuery,"Cmd-S":i.storeQuery,"Ctrl-Enter":i.executeQuery,"Cmd-Enter":i.executeQuery,F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}},cursorHeight:.9,createShareLink:i.createShareLink,createShortLink:null,consumeShareLink:i.consumeShareLink,persistent:function(e){return"yasqe_"+n(e.getWrapperElement()).closest("[id]").attr("id")+"_queryVal"},sparql:{queryName:function(e){return e.getQueryMode()},showQueryButton:!1,endpoint:"http://dbpedia.org/sparql",requestMethod:"POST",acceptHeaderGraph:"text/turtle,*/*;q=0.9",acceptHeaderSelect:"application/sparql-results+json,*/*;q=0.9",acceptHeaderUpdate:"text/plain,*/*;q=0.9",namedGraphs:[],defaultGraphs:[],args:[],headers:{},getQueryForAjax:null,callbacks:{beforeSend:null,complete:null,error:null,success:null},handlers:{}}})},{"./main.js":48,jquery:16}],44:[function(e,t,r){t.exports=e("./main.js")},{"./main.js":48}],45:[function(e,t,r){t.exports={"yasqe.invalid.line":"This line is invalid. Expected: ","yasqe.btn.title.fullscreen":"Set editor full screen","yasqe.btn.title.normalsize":"Set editor to normal size","yasqe.btn.title.share":"Share your query","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Shorten","yasqe.autocompleterBase.message":"Press Alt+Enter to autocomplete","yasqe.utils.message1":"Nothing to autocomplete yet!","yasqe.utils.message2":"0 matches found...","yasqe.utils.message3":"Failed fetching suggestions.."}},{}],46:[function(e,t,r){t.exports={"yasqe.invalid.line":"Cette ligne n'est pas valide. Attendu:","yasqe.btn.title.fullscreen":"Configurer l'éditeur en plein écran","yasqe.btn.title.normalsize":"Configurer l'éditeur à la taille normale","yasqe.btn.title.share":"Partagez votre requête","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Raccourcir","yasqe.autocompleterBase.message":"Appuyez sur Alt+Enter pour l'autocomplétion.","yasqe.utils.message1":"Rien à autocompléter encore !","yasqe.utils.message2":"0 correspondances trouvées ...","yasqe.utils.message3":"Échec de la récupération des suggestions..."}},{}],47:[function(e,t,r){"use strict";t.exports={query:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"><g ></g><g >\t<path d="M64.622,2.411H14.995c-6.627,0-12,5.373-12,12v49.897c0,6.627,5.373,12,12,12h49.627c6.627,0,12-5.373,12-12V14.411 C76.622,7.783,71.249,2.411,64.622,2.411z M24.125,63.906V15.093L61,39.168L24.125,63.906z"/></g></svg>',queryInvalid:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 73.627 73.897" enable-background="new 0 0 80 80" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="warning.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" inkscape:zoom="3.1936344" inkscape:cx="36.8135" inkscape:cy="36.9485" inkscape:window-x="2625" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /><g transform="translate(-2.995,-2.411)" /><g transform="translate(-2.995,-2.411)" ><path d="M 64.622,2.411 H 14.995 c -6.627,0 -12,5.373 -12,12 v 49.897 c 0,6.627 5.373,12 12,12 h 49.627 c 6.627,0 12,-5.373 12,-12 V 14.411 c 0,-6.628 -5.373,-12 -12,-12 z M 24.125,63.906 V 15.093 L 61,39.168 24.125,63.906 z" inkscape:connector-curvature="0" /></g><path d="M 66.129381,65.903784 H 49.769875 c -1.64721,0 -2.889385,-0.581146 -3.498678,-1.63595 -0.609293,-1.055608 -0.491079,-2.422161 0.332391,-3.848223 l 8.179753,-14.167069 c 0.822934,-1.42633 1.9477,-2.211737 3.166018,-2.211737 1.218319,0 2.343086,0.785407 3.166019,2.211737 l 8.179751,14.167069 c 0.823472,1.426062 0.941686,2.792615 0.33239,3.848223 -0.609023,1.054804 -1.851197,1.63595 -3.498138,1.63595 z M 59.618815,60.91766 c 0,-0.850276 -0.68944,-1.539719 -1.539717,-1.539719 -0.850276,0 -1.539718,0.689443 -1.539718,1.539719 0,0.850277 0.689442,1.539718 1.539718,1.539718 0.850277,0 1.539717,-0.689441 1.539717,-1.539718 z m 0.04155,-9.265919 c 0,-0.873061 -0.707939,-1.580998 -1.580999,-1.580998 -0.873061,0 -1.580999,0.707937 -1.580999,1.580998 l 0.373403,5.610965 h 0.0051 c 0.05415,0.619747 0.568548,1.10761 1.202504,1.10761 0.586239,0 1.075443,-0.415756 1.188563,-0.968489 0.0092,-0.04476 0.0099,-0.09248 0.01392,-0.138854 h 0.01072 l 0.367776,-5.611232 z" inkscape:connector-curvature="0" style="fill:#aa8800" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g ></g><g >\t<path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',share:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M36.764,50c0,0.308-0.07,0.598-0.088,0.905l32.247,16.119c2.76-2.338,6.293-3.797,10.195-3.797 C87.89,63.228,95,70.338,95,79.109C95,87.89,87.89,95,79.118,95c-8.78,0-15.882-7.11-15.882-15.891c0-0.316,0.07-0.598,0.088-0.905 L31.077,62.085c-2.769,2.329-6.293,3.788-10.195,3.788C12.11,65.873,5,58.771,5,50c0-8.78,7.11-15.891,15.882-15.891 c3.902,0,7.427,1.468,10.195,3.797l32.247-16.119c-0.018-0.308-0.088-0.598-0.088-0.914C63.236,12.11,70.338,5,79.118,5 C87.89,5,95,12.11,95,20.873c0,8.78-7.11,15.891-15.882,15.891c-3.911,0-7.436-1.468-10.195-3.806L36.676,49.086 C36.693,49.394,36.764,49.684,36.764,50z"/></svg>',warning:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 66.399998 66.399998" enable-background="new 0 0 69.3 69.3" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" ><g transform="translate(-1.5,-1.5)" style="fill:#ff0000"><path d="M 34.7,1.5 C 16.4,1.5 1.5,16.4 1.5,34.7 1.5,53 16.4,67.9 34.7,67.9 53,67.9 67.9,53 67.9,34.7 67.9,16.4 53,1.5 34.7,1.5 z m 0,59.4 C 20.2,60.9 8.5,49.1 8.5,34.7 8.5,20.2 20.3,8.5 34.7,8.5 c 14.4,0 26.2,11.8 26.2,26.2 0,14.4 -11.8,26.2 -26.2,26.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.6,47.1 c -1.4,0 -2.5,0.5 -3.5,1.5 -0.9,1 -1.4,2.2 -1.4,3.6 0,1.6 0.5,2.8 1.5,3.8 1,0.9 2.1,1.3 3.4,1.3 1.3,0 2.4,-0.5 3.4,-1.4 1,-0.9 1.5,-2.2 1.5,-3.7 0,-1.4 -0.5,-2.6 -1.4,-3.6 -0.9,-1 -2.1,-1.5 -3.5,-1.5 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.8,13.9 c -1.5,0 -2.8,0.5 -3.7,1.6 -0.9,1 -1.4,2.4 -1.4,4.2 0,1.1 0.1,2.9 0.2,5.6 l 0.8,13.1 c 0.2,1.8 0.4,3.2 0.9,4.1 0.5,1.2 1.5,1.8 2.9,1.8 1.3,0 2.3,-0.7 2.9,-1.9 0.5,-1 0.7,-2.3 0.9,-4 L 39.4,25 c 0.1,-1.3 0.2,-2.5 0.2,-3.8 0,-2.2 -0.3,-3.9 -0.8,-5.1 -0.5,-1 -1.6,-2.2 -4,-2.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /></g></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],48:[function(e,t,r){"use strict";window.console=window.console||{log:function(){}};var n=e("jquery"),i=e("codemirror"),o=e("./utils.js"),s=e("yasgui-utils"),a=e("./imgs.js");e("../lib/deparam.js"),e("codemirror/addon/fold/foldcode.js"),e("codemirror/addon/fold/foldgutter.js"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/fold/brace-fold.js"),e("./prefixFold.js"),e("codemirror/addon/hint/show-hint.js"),e("codemirror/addon/search/searchcursor.js"),e("codemirror/addon/edit/matchbrackets.js"),e("codemirror/addon/runmode/runmode.js"),e("codemirror/addon/display/fullscreen.js"),e("../lib/grammar/tokenizer.js"),e("codemirror/addon/edit/closebrackets.js");var l=t.exports=function(e,t){var r=n("<div>",{class:"yasqe"}).appendTo(n(e));t=u(t);var o=c(i(r[0],t));return f(o),o},u=function(e){return n.extend(!0,{},l.defaults,e)},c=function(t){t.translate=e("./translate.js")(t),t.autocompleters=e("./autocompleters/autocompleterBase.js")(l,t),t.options.autocompleters&&t.options.autocompleters.forEach((function(e){l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])})),t.lastQueryDuration=null,t.getCompleteToken=function(r,n){return e("./tokenUtils.js").getCompleteToken(t,r,n)},t.getPreviousNonWsToken=function(r,n){return e("./tokenUtils.js").getPreviousNonWsToken(t,r,n)},t.getNextNonWsToken=function(r,n){return e("./tokenUtils.js").getNextNonWsToken(t,r,n)},t.collapsePrefixes=function(r){void 0===r&&(r=!0),t.foldCode(e("./prefixFold.js").findFirstPrefixLine(t),l.fold.prefix,r?"fold":"unfold")};var r=null,i=null;return t.setBackdrop=function(e){(t.options.backdrop||0===t.options.backdrop||"0"===t.options.backdrop)&&(null===i&&1==(i=+t.options.backdrop)&&(i=400),r||(r=n("<div>",{class:"backdrop"}).click((function(){n(this).hide()})).insertAfter(n(t.getWrapperElement()))),e?r.show(i):r.hide(i))},t.query=function(e){l.executeQuery(t,e)},t.getUrlArguments=function(e){return l.getUrlArguments(t,e)},t.getPrefixesFromQuery=function(){return e("./prefixUtils.js").getPrefixesFromQuery(t)},t.addPrefixes=function(r){return e("./prefixUtils.js").addPrefixes(t,r)},t.removePrefixes=function(r){return e("./prefixUtils.js").removePrefixes(t,r)},t.getValueWithoutComments=function(){var e="";return l.runMode(t.getValue(),"sparql11",(function(t,r){"comment"!=r&&(e+=t)})),e},t.getQueryType=function(){return t.queryType},t.getQueryMode=function(){var e=t.getQueryType();return"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e?"update":"query"},t.setCheckSyntaxErrors=function(e){t.options.syntaxErrorCheck=e,E(t)},t.enableCompleter=function(e){p(t.options,e),l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])},t.disableCompleter=function(e){d(t.options,e)},t},p=function(e,t){e.autocompleters||(e.autocompleters=[]),e.autocompleters.push(t)},d=function(e,t){if("object"==typeof e.autocompleters){var r=n.inArray(t,e.autocompleters);r>=0&&(e.autocompleters.splice(r,1),d(e,t))}},f=function(e){var t=o.getPersistencyId(e,e.options.persistent);if(t){var r=s.storage.get(t);r&&e.setValue(r)}l.drawButtons(e),e.on("blur",(function(e,t){l.storeQuery(e)})),e.on("change",(function(e,t){E(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("changes",(function(){E(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("language-changed",(function(){E(e),l.drawButtons(e),l.autoComplete(e)})),e.on("cursorActivity",(function(e,t){g(e)})),e.prevQueryValid=!1,E(e),l.positionButtons(e),n(e.getWrapperElement()).on("mouseenter",".cm-atom",(function(){var t=n(this).text();n(e.getWrapperElement()).find(".cm-atom").filter((function(){return n(this).text()===t})).addClass("matchingVar")})).on("mouseleave",".cm-atom",(function(){n(e.getWrapperElement()).find(".matchingVar").removeClass("matchingVar")})),e.options.consumeShareLink&&(e.options.consumeShareLink(e,h()),window.addEventListener("hashchange",(function(){e.options.consumeShareLink(e,h())}))),e.options.collapsePrefixesOnLoad&&e.collapsePrefixes(!0)},h=function(){var e=null;return window.location.hash.length>1&&(e=n.deparam(location.href.split("#")[1])),e&&"query"in e||!(window.location.search.length>1)||(e=n.deparam(window.location.search.substring(1))),e},g=function(e){e.cursor=n(".CodeMirror-cursor"),e.buttons&&e.buttons.is(":visible")&&e.cursor.length>0&&(o.elementsOverlap(e.cursor,e.buttons)?e.buttons.find("svg").attr("opacity","0.2"):e.buttons.find("svg").attr("opacity","1.0"))},E=function(t,r){t.queryValid=!0,t.clearGutter("gutterErrorBar");for(var i=null,o=0;o<t.lineCount();++o){var l=!1;if(t.prevQueryValid||(l=!0),i=t.getTokenAt({line:o,ch:t.getLine(o).length},l).state,t.queryType=i.queryType,0==i.OK){if(!t.options.syntaxErrorCheck)return void n(t.getWrapperElement).find(".sp-error").css("color","black");var u=s.svg.getElement(a.warning);i.possibleCurrent&&i.possibleCurrent.length>0&&e("./tooltip")(t,u,(function(){var e=[];return i.possibleCurrent.forEach((function(t){e.push("<strong style='text-decoration:underline'>"+n("<div/>").text(t).html()+"</strong>")})),t.translate("yasqe.invalid.line")+e.join(", ")})),u.style.marginTop="2px",u.style.marginLeft="2px",u.className="parseErrorIcon",t.setGutterMarker(o,"gutterErrorBar",u),t.queryValid=!1;break}}if(t.prevQueryValid=t.queryValid,r&&null!=i&&null!=i.stack){var c=i.stack,p=i.stack.length;(p>1||1==p&&"solutionModifier"!=c[0]&&"?limitOffsetClauses"!=c[0]&&"?offsetClause"!=c[0])&&(t.queryValid=!1)}};n.extend(l,i),l.Autocompleters={},l.registerAutocompleter=function(e,t){l.Autocompleters[e]=t,p(l.defaults,e)},l.autoComplete=function(e){e.autocompleters.autoComplete(!1)},l.registerAutocompleter("sesame-prefixes",e("./autocompleters/sesame-prefixes.js")),l.registerAutocompleter("localNames",e("./autocompleters/localNames.js")),l.registerAutocompleter("properties",e("./autocompleters/properties.js")),l.registerAutocompleter("classes",e("./autocompleters/classes.js")),l.registerAutocompleter("standard",e("./autocompleters/standard.js")),l.registerAutocompleter("variables",e("./autocompleters/variables.js")),l.positionButtons=function(e){var t=n(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),r=0;t.is(":visible")&&(r=t.outerWidth()),e.buttons.is(":visible")&&e.buttons.css("right",r+4)},l.createShareLink=function(e){var t={};return window.location.hash.length>1&&(t=n.deparam(window.location.hash.substring(1))),t.query=e.getValue(),t},l.getAsCurl=function(t,r){return e("./curl.js").createCurlString(t,r)},l.consumeShareLink=function(e,t){t&&t.query&&e.setValue(t.query)},l.drawButtons=function(e){if(e.buttons=n("<div class='yasqe_buttons'></div>").appendTo(n(e.getWrapperElement())),e.options.createShareLink){var t=n(s.svg.getElement(a.share));t.click((function(r){r.stopPropagation();var i=n("<div class='yasqe_sharePopup'></div>").appendTo(e.buttons);n("html").click((function(){i&&i.remove()})),i.click((function(e){e.stopPropagation()}));var o=n("<input>").val(location.protocol+"//"+location.host+location.pathname+location.search+"#"+n.param(e.options.createShareLink(e)));if(o.focus((function(){var e=n(this);e.select(),e.mouseup((function(){return e.unbind("mouseup"),!1}))})),i.empty().append(n("<div>",{class:"inputWrapper"}).append(o)),e.options.createShortLink){i.addClass("enableShort");const t=e.translate("yasqe.btn.lbl.shorten");n("<button>"+t+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){n(this).parent().find("button").attr("disabled","disabled"),e.options.createShortLink(o.val(),(function(e,t){e?(o.remove(),i.find(".inputWrapper").append(n("<span>",{class:"shortlinkErr"}).text(e))):o.val(t).focus()}))})).appendTo(i)}const s=e.translate("yasqe.btn.lbl.curl");n("<button>"+s+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){n(this).parent().find("button").attr("disabled","disabled"),o.val(l.getAsCurl(e)).focus()})).appendTo(i);var a=t.position();i.css("top",a.top+t.outerHeight()+parseInt(i.css("padding-top"))+"px").css("left",a.left+t.outerWidth()-i.outerWidth()+"px"),o.focus()})).addClass("yasqe_share").attr("title",e.translate("yasqe.btn.title.share")).appendTo(e.buttons)}var r=n("<div>",{class:"fullscreenToggleBtns"}).append(n(s.svg.getElement(a.fullscreen)).addClass("yasqe_fullscreenBtn").attr("title",e.translate("yasqe.btn.title.fullscreen")).click((function(){e.setOption("fullScreen",!0)}))).append(n(s.svg.getElement(a.smallscreen)).addClass("yasqe_smallscreenBtn").attr("title",e.translate("yasqe.btn.title.normalsize")).click((function(){e.setOption("fullScreen",!1)})));e.buttons.append(r),e.options.sparql.showQueryButton&&(n("<div>",{class:"yasqe_queryButton"}).click((function(){n(this).hasClass("query_busy")?(e.xhr&&e.xhr.abort(),l.updateQueryButton(e)):e.query()})).appendTo(e.buttons),l.updateQueryButton(e))};var m={busy:"loader",valid:"query",error:"queryInvalid"};l.updateQueryButton=function(e,t){var r=n(e.getWrapperElement()).find(".yasqe_queryButton");0!=r.length&&(t||(t="valid",!1===e.queryValid&&(t="error")),t!=e.queryStatus&&(r.empty().removeClass((function(e,t){return t.split(" ").filter((function(e){return 0==e.indexOf("query_")})).join(" ")})),"busy"==t?(r.append(n("<div>",{class:"loader"})),e.queryStatus=t):"valid"!=t&&"error"!=t||(r.addClass("query_"+t),s.svg.draw(r,a[m[t]]),e.queryStatus=t)))},l.fromTextArea=function(e,t){t=u(t),n("<div>",{class:"yasqe"}).insertBefore(n(e)).append(n(e));var r=c(i.fromTextArea(e,t));return f(r),r},l.storeQuery=function(e){var t=o.getPersistencyId(e,e.options.persistent);t&&s.storage.set(t,e.getValue(),"month")},l.commentLines=function(e){for(var t=e.getCursor(!0).line,r=e.getCursor(!1).line,n=Math.min(t,r),i=Math.max(t,r),o=!0,s=n;s<=i;s++){var a=e.getLine(s);if(0==a.length||"#"!=a.substring(0,1)){o=!1;break}}for(s=n;s<=i;s++)o?e.replaceRange("",{line:s,ch:0},{line:s,ch:1}):e.replaceRange("#",{line:s,ch:0})},l.copyLineUp=function(e){var t=e.getCursor(),r=e.lineCount();e.replaceRange("\n",{line:r-1,ch:e.getLine(r-1).length});for(var n=r;n>t.line;n--){var i=e.getLine(n-1);e.replaceRange(i,{line:n,ch:0},{line:n,ch:e.getLine(n).length})}},l.copyLineDown=function(e){l.copyLineUp(e);var t=e.getCursor();t.line++,e.setCursor(t)},l.doAutoFormat=function(e){if(e.somethingSelected()){var t={line:e.getCursor(!1).line,ch:e.getSelection().length};v(e,e.getCursor(!0),t)}else{var r=e.lineCount(),n=e.getTextArea().value.length;v(e,{line:0,ch:0},{line:r,ch:n})}};var v=function(e,t,r){var n=e.indexFromPos(t),i=e.indexFromPos(r),o=x(e.getValue(),n,i);e.operation((function(){e.replaceRange(o,t,r);for(var i=e.posFromIndex(n).line,s=e.posFromIndex(n+o.length).line,a=i;a<=s;a++)e.indentLine(a,"smart")}))},x=function(e,t,r){e=e.substring(t,r);var o=[["keyword","ws","prefixed","ws","uri"],["keyword","ws","uri"]],s=["{",".",";"],a=["}"],l="",u="",c=[];return i.runMode(e,"sparql11",(function(e,t){c.push(t);var r=function(e,t){for(var r=0;r<o.length;r++)if(c.valueOf().toString()==o[r].valueOf().toString())return 1;for(r=0;r<s.length;r++)if(e==s[r])return 1;for(r=0;r<a.length;r++)if(""!=n.trim(u)&&e==a[r])return-1;return 0}(e);0!=r?(1==r?(l+=e+"\n",u=""):(l+="\n"+e,u=e),c=[]):(u+=e,l+=e),1==c.length&&"sp-ws"==c[0]&&(c=[])})),n.trim(l.replace(/\n\s*\n/g,"\n"))};e("./sparql.js"),e("./defaults.js"),l.$=n,l.version={CodeMirror:i.version,YASQE:e("../package.json").version,jquery:n.fn.jquery,"yasgui-utils":s.version}},{"../lib/deparam.js":1,"../lib/grammar/tokenizer.js":3,"../package.json":33,"./autocompleters/autocompleterBase.js":34,"./autocompleters/classes.js":35,"./autocompleters/localNames.js":36,"./autocompleters/properties.js":37,"./autocompleters/sesame-prefixes.js":38,"./autocompleters/standard.js":39,"./autocompleters/variables.js":41,"./curl.js":42,"./defaults.js":43,"./imgs.js":47,"./prefixFold.js":49,"./prefixUtils.js":50,"./sparql.js":51,"./tokenUtils.js":52,"./tooltip":53,"./translate.js":54,"./utils.js":55,codemirror:15,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/edit/closebrackets.js":6,"codemirror/addon/edit/matchbrackets.js":7,"codemirror/addon/fold/brace-fold.js":8,"codemirror/addon/fold/foldcode.js":9,"codemirror/addon/fold/foldgutter.js":10,"codemirror/addon/fold/xml-fold.js":11,"codemirror/addon/hint/show-hint.js":12,"codemirror/addon/runmode/runmode.js":13,"codemirror/addon/search/searchcursor.js":14,jquery:16,"yasgui-utils":30}],49:[function(e,t,r){var n=e("codemirror"),i=e("./tokenUtils.js");function o(e,t,r,i){if(!i||!("#"===i.charAt(0)||i.startsWith('"')&&i.endsWith('"'))){r||(r=0),i||(i=e.getLine(t));for(var o=(i=i.toUpperCase()).length+1,s=r,a=0;;){var l=i.indexOf("PREFIX",s);if(l===o)return;if(o=l,-1!=l){if(1==a&&l<r)break;if(i.length-l>"PREFIX".length&&":"===i.charAt(l+"PREFIX".length))return;if(l>0&&":"===i.charAt(l-1))return;var u=e.getTokenTypeAt(n.Pos(t,l+1));if(!/^(comment|string)/.test(u))return l+1;s=l-1}else{if(1==a)break;a=1,s=i.length}}}}t.exports={findFirstPrefixLine:function(e){for(var t=e.lastLine(),r=0;r<=t;++r)if(o(e,r)>=0)return r}},n.registerHelper("fold","prefix",(function(e,t){if(t){var r=t.line,s=e.getLine(r),a=function(t,r){var o=e.getTokenAt(n.Pos(t,r+1));if(!o||"keyword"!=o.type)return-1;var s=i.getNextNonWsToken(e,t,o.end+1);if(!s||"string-2"!=s.type)return-1;var a=i.getNextNonWsToken(e,t,s.end+1);return a&&"variable-3"==a.type?a.end:-1};if(!function(){for(var t=!1,n=r-1;n>=0;n--)if(e.getLine(n).toUpperCase().indexOf("PREFIX")>=0){t=!0;break}return t}()){var l=o(e,r,t.ch,s);if(null!=l){for(var u,c=!1,p=e.lastLine(),d=a(r,l),f=r,h=r;h<=p&&!c;++h)for(var g=e.getLine(h),E=h==r?l+1:0;;){!c&&g.indexOf("{")>=0&&(c=!0);var m=g.toUpperCase().indexOf("PREFIX",E);if(!(m>=0))break;(u=a(h,m))>0&&(f=h,E=d=u),E++}return{from:n.Pos(r,l+"PREFIX".length),to:n.Pos(f,d)}}}}}))},{"./tokenUtils.js":52,codemirror:15}],50:[function(e,t,r){"use strict";var n=function(e,t){for(var r=null,n=0,o=e.lineCount(),s=0;s<o;s++){var a=e.getNextNonWsToken(s);null==a||"PREFIX"!=a.string&&"BASE"!=a.string||(r=a,n=s)}if(null==r)e.replaceRange("PREFIX "+t+"\n",{line:0,ch:0});else{var l=i(e,n);e.replaceRange("\n"+l+"PREFIX "+t,{line:n})}e.collapsePrefixes(!1)},i=function(e,t,r){null==r&&(r=1);var n=e.getTokenAt({line:t,ch:r});return null==n||null==n||"ws"!=n.type?"":n.string+i(e,t,n.end+1)};t.exports={addPrefixes:function(e,t){var r=e.getPrefixesFromQuery();if("string"==typeof t)n(e,t);else for(var i in t)i in r||n(e,i+": <"+t[i]+">");e.collapsePrefixes(!1)},getPrefixesFromQuery:function(e){for(var t={},r=!0,n=function(i,s){if(r){s||(s=1);var a=e.getNextNonWsToken(o,s);if(a)if(-1==a.state.possibleCurrent.indexOf("PREFIX")&&-1==a.state.possibleNext.indexOf("PREFIX")&&(r=!1),"PREFIX"==a.string.toUpperCase()){var l=e.getNextNonWsToken(o,a.end+1);if(l){var u=e.getNextNonWsToken(o,l.end+1);if(u){var c=u.string;0==c.indexOf("<")&&(c=c.substring(1)),">"==c.slice(-1)&&(c=c.substring(0,c.length-1)),t[l.string.slice(0,-1)]=c,n(i,u.end+1)}else n(i,l.end+1)}else n(i,a.end+1)}else n(i,a.end+1)}},i=e.lineCount(),o=0;o<i&&r;o++)n(o);return t},removePrefixes:function(e,t){for(var r in t)e.setValue(e.getValue().replace(new RegExp("PREFIX\\s*"+r+":\\s*"+("<"+t[r]+">").replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"\\s*","ig"),""));e.collapsePrefixes(!1)}}},{}],51:[function(e,t,r){"use strict";var n=e("jquery"),i=e("./utils.js"),o=e("./main.js");o.getAjaxConfig=function(t,r){var i="function"==typeof r?r:null,a="object"==typeof r?r:{};if(t.options.sparql&&(a=n.extend({},t.options.sparql,a)),a.handlers&&n.extend(!0,a.callbacks,a.handlers),a.endpoint&&0!=a.endpoint.length){var l={url:"function"==typeof a.endpoint?a.endpoint(t):a.endpoint,type:"function"==typeof a.requestMethod?a.requestMethod(t):a.requestMethod,headers:{Accept:s(t,a)}};a.xhrFields&&(l.xhrFields=a.xhrFields);var u=!1;if(a.callbacks)for(var c in a.callbacks)a.callbacks[c]&&(u=!0,l[c]=a.callbacks[c]);if("GET"===l.type){var p=!0;n.each(t.getUrlArguments(a),(function(e,t){l.url+=(p?"?":"&")+t.name+"="+encodeURIComponent(t.value),p=!1}))}else l.data=t.getUrlArguments(a),a.setQueryLimit&&"function"==typeof a.setQueryLimit&&l.data.forEach((function(e){"query"==e.name&&(e.value=a.setQueryLimit(e.value))}));if(u||i){i&&(l.complete=i),a.headers&&!n.isEmptyObject(a.headers)&&n.extend(l.headers,a.headers);var d=new Date,f=[function(){e("./main.js").signal(t,"queryFinish",arguments)},function(){t.lastQueryDuration=new Date-d,o.updateQueryButton(t),t.setBackdrop(!1)}];return l.complete&&(f.push(l.complete),f.push((function(e,t,r){var i={};n.extend(!0,i,l),"update"===window.editor.getQueryMode()&&"ASK"===window.editor.getQueryType()||a.callbacks.countCallback&&"function"==typeof a.callbacks.countCallback&&(i.data=i.data.filter((function(e){return"offset"!==e.name&&"limit"!==e.name})),i.data.push({name:"count",value:"1"}),i.complete=a.callbacks.countCallback),window.editor&&200===e.status&&n.ajax(i)}))),l.complete=f,l}}},o.executeQuery=function(e,t){o.signal(e,"query",e,t),o.updateQueryButton(e,"busy"),e.setBackdrop(!0),e.xhr=n.ajax(o.getAjaxConfig(e,t))},o.getUrlArguments=function(e,t){var r=e.getQueryMode(),o=[{name:i.getString(e,e.options.sparql.queryName),value:t.getQueryForAjax?t.getQueryForAjax(e):e.getValue()}];if(t.namedGraphs&&t.namedGraphs.length>0)for(var s="query"==r?"named-graph-uri":"using-named-graph-uri ",a=0;a<t.namedGraphs.length;a++)o.push({name:s,value:t.namedGraphs[a]});if(t.defaultGraphs&&t.defaultGraphs.length>0)for(s="query"==r?"default-graph-uri":"using-graph-uri ",a=0;a<t.defaultGraphs.length;a++)o.push({name:s,value:t.defaultGraphs[a]});return t.args&&t.args.length>0&&n.merge(o,t.args),o};var s=function(e,t){var r=null;if(!t.acceptHeader||t.acceptHeaderGraph||t.acceptHeaderSelect||t.acceptHeaderUpdate)if("update"==e.getQueryMode())r="function"==typeof t.acceptHeader?t.acceptHeaderUpdate(e):t.acceptHeaderUpdate;else{var n=e.getQueryType();r="DESCRIBE"==n||"CONSTRUCT"==n?"function"==typeof t.acceptHeaderGraph?t.acceptHeaderGraph(e):t.acceptHeaderGraph:"function"==typeof t.acceptHeaderSelect?t.acceptHeaderSelect(e):t.acceptHeaderSelect}else r="function"==typeof t.acceptHeader?t.acceptHeader(e):t.acceptHeader;return r};t.exports={getAjaxConfig:o.getAjaxConfig}},{"./main.js":48,"./utils.js":55,jquery:16}],52:[function(e,t,r){"use strict";var n=function(e,t,r){r||(r=e.getCursor()),t||(t=e.getTokenAt(r));var i=e.getTokenAt({line:r.line,ch:t.start});return null!=i.type&&"ws"!=i.type&&"punc"!=i.type&&null!=t.type&&"ws"!=t.type?(t.start=i.start,t.string=i.string+t.string,n(e,t,{line:r.line,ch:i.start})):null!=t.type&&"ws"==t.type?(t.start=t.start+1,t.string=t.string.substring(1),t):t},i=function(e,t,r){var n=e.getTokenAt({line:t,ch:r.start});return null!=n&&"ws"==n.type&&(n=i(e,t,n)),n},o=function(e,t,r){null==r&&(r=1);var n=e.getTokenAt({line:t,ch:r});return null==n||null==n||n.end<r?null:"ws"==n.type?o(e,t,n.end+1):n};t.exports={getPreviousNonWsToken:i,getCompleteToken:n,getNextNonWsToken:o}},{}],53:[function(e,t,r){"use strict";var n=e("jquery");e("./utils.js"),t.exports=function(e,t,r){var i;(t=n(t)).hover((function(){"function"==typeof r&&(r=r()),i=n("<div>").addClass("yasqe_tooltip").html(r).appendTo(t),o()}),(function(){n(".yasqe_tooltip").remove()}));var o=function(){n(e.getWrapperElement()).offset().top>=i.offset().top&&(i.css("bottom","auto"),i.css("top","26px"))}}},{"./utils.js":55,jquery:16}],54:[function(e,t,r){const n={en:e("./i18n/locale-en"),fr:e("./i18n/locale-fr")};var i="en",o=function(e){const t=i;if(!n||!n[t])return console.warn("Missing locale file for ["+t+"]"),e;let r=n[t][e];return r||(r=n.en[e]),r};t.exports=function(e){return e.on("language-changed",(function(){i=e.options.locale})),e.options.locale&&(i=e.options.locale),o}},{"./i18n/locale-en":45,"./i18n/locale-fr":46}],55:[function(e,t,r){"use strict";var n=e("jquery"),i=function(){function e(e){var t,r,i;return t=n(e).offset(),r=n(e).width(),i=n(e).height(),[[t.left,t.left+r],[t.top,t.top+i]]}function t(e,t){var r,n;return r=e[0]<t[0]?e:t,n=e[0]<t[0]?t:e,r[1]>n[0]||r[0]===n[0]}return function(r,n){var i=e(r),o=e(n);return t(i[0],o[0])&&t(i[1],o[1])}}();t.exports={keyExists:function(e,t){var r=!1;try{void 0!==e[t]&&(r=!0)}catch(e){}return r},getPersistencyId:function(e,t){var r=null;return t&&(r="string"==typeof t?t:t(e)),r},elementsOverlap:i,getString:function(e,t){return"function"==typeof t?t(e):t}}},{jquery:16}]},{},[44])(44)},module.exports=f()}).call(this,__webpack_require__(6))},42:function(e,t){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",r),r.$inject=["$http"];function r(e){return{getConnectors:function(){return e.get("rest/connectors")},initConnector:function(t){return e.get("rest/connectors/options?prefix="+t)},hasConnector:function(t){return e.get("rest/connectors/existing?prefix="+t)},checkConnector:function(t){return e.post("rest/connectors/check",t,{headers:{"Content-Type":"text/plain"}})}}}},45:function(e,t,r){"use strict";r.r(t);r(15),r(42);function n(e){const t=[];return Object.keys(e).forEach((function(r){t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]))})),t.join("&")}function i(e,t){return _.reduce(e,(function(e,r){if(""===r.key&&""===r.value);else{if(""===r.key)throw new Error(t.instant("externalsync.empty.value.key.error",{value:r.value}));if(e.hasOwnProperty(r.key))throw new Error(t.instant("externalsync.duplicate.key.error",{key:r.key}));e[r.key]=r.value}return e}),{})}function o(e,t){for(let n=0;n<t.length;n++){const i=t[n];if("StringArray"===i.__type)e[i.__name]||(e[i.__name]=[""]);else if("OptionArray"===i.__type)if(e[i.__name])for(let t=0;t<i.__childOptions.length;t++){const r=i.__childOptions[t];if("Boolean"===r.__type)for(let t=0;t<e[i.__name].length;t++){const n=e[i.__name][t];!n.hasOwnProperty([r.__name])&&angular.isDefined(r.__defaultValue)&&(n[r.__name]=r.__defaultValue)}}else{e[i.__name]=[];const t={};for(let e=0;e<i.__childOptions.length;e++){const r=i.__childOptions[e];"StringArray"===r.__type?t[r.__name]=[""]:t[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue}e[i.__name].push(t)}else"Map"===i.__type?e[i.__name]?e[i.__name]=(r=e[i.__name],_.map(r,(function(e,t){return{key:t,value:e}}))):e[i.__name]=[]:"JsonString"===i.__type?!e[i.__name]||e[i.__name]instanceof String||"string"==typeof e[i.__name]||(e[i.__name]=angular.toJson(e[i.__name],2)):angular.isUndefined(e[i.__name])&&(e[i.__name]=angular.isUndefined(i.__defaultValue)?"":i.__defaultValue)}var r;return e}function s(e,t,r){return e.post("repositories/"+t,n({query:r}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function a(e){return e.substring(0,e.length-1)+"/instance#"}function l(e,t,r,n,o){const s=function e(t,r){const n={};return _.each(r,(function(r){angular.isDefined(t[r.__name])&&("OptionArray"===r.__type?(n[r.__name]=[],_.each(t[r.__name],(function(t){n[r.__name].push(e(t,r.__childOptions))}))):n[r.__name]=angular.copy(t[r.__name]))})),n}(r,n);for(let e=0;e<n.length;e++)try{"Map"===n[e].__type?s[n[e].__name]=i(s[n[e].__name],$translate):"JsonString"===n[e].__type&&(s[n[e].__name]=angular.fromJson(s[n[e].__name]))}catch(t){return o(n[e].__label,t.message),null}!function e(t){Array.isArray(t)&&(t=_.filter(t,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(t).forEach((function(r){""!==t[r]&&null!=t[r]||!1===t[r]?"object"==typeof t[r]&&(t[r]=e(t[r])):delete t[r]})),t}(s);let l="";l+="PREFIX :<"+t+">\n";return l+="PREFIX inst:<"+a(t)+">\n",l+="INSERT DATA {\n",l+="\tinst:"+e+" :createConnector '''\n",l+=angular.toJson(s,2),l+="\n''' .\n}\n",l=l.replace(/\\/g,"\\\\\\"),l}function u(e,t,r,i,u,c,p,d,f,h){function g(t){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?h.instant("externalsync.repairing"):h.instant("externalsync.creating"),waitOnRepairStartOnce:!!t,eta:"-",inline:!1,iri:null}}function E(t,r,n){return g(n),$.extend(e.beingBuiltConnector,{iri:a(t)+r,name:r,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=i.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function m(t,i,o){const s=E(t.value,i.name,!1);d.addStatements(r.getActiveRepository(),n({update:i.query})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(t.value)).then((function(r){e.existing[t.key]=r.data}))})),u.success(h.instant("created.connector",{name:i.name}))}),(function(e){u.error(getError(e)),o()})).finally((function(){s.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const t=(Date.now()-e.loaderStartTime)/1e3,r=e.getHumanReadableSeconds(t);let n="";return n=e.progressMessage?e.progressMessage+"... "+r:h.instant("common.running.operation",{timeHuman:r}),e.extraMessage&&t>10&&(n+="\n"+e.extraMessage),n},e.setLoader=function(t,r,n){t?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=r,e.extraMessage=n):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(t){return f.initConnector(encodeURIComponent(t.value)).then((function(r){return e.definitions[t.key]=r.data,f.hasConnector(encodeURIComponent(t.value)).then((function(r){e.existing[t.key]=r.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,h.instant("externalsync.fetching.connectors"),h.instant("common.extra.message")),f.getConnectors().then((function(n){e.connectors=Object.keys(n.data).map((function(e){return{key:e,value:n.data[e]}})),p.all(_.map(e.connectors,(function(t){return e.initConnector(t)}))).finally((function(){g();const n=function(e){const t=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return t?"SELECT ?connector ?status { ?connector "+t+" ?status }":null}(e.connectors);n?function(e){return s(t,r.getActiveRepository(),e)}(n).then((function(t){const r=function(e){if(e.bindings)for(let t=0;t<e.bindings.length;t++)try{const r=JSON.parse(e.bindings[t].status.value);if("BUILDING"===r.status)return{connector:e.bindings[t].connector.value,status:r}}catch(e){console.error(e)}return{}}(t.data.results);if(r.connector){const t=r.connector.split(/#/);t[0]=t[0].replace(/\/instance$/,"#"),n=t[0],i=t[1],g(),$.extend(e.beingBuiltConnector,{iri:a(n)+i,name:i,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var n,i})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(t){e.setLoader(!1),u.error(getError(t),h.instant("externalsync.could.not.get.connectors.error"))})),e.existing={})},e.getOptions=function(t){return e.definitions[t.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return r.getActiveRepository()}),e.getConnectors),e.$watch((function(){return r.getActiveLocation()}),e.getConnectors),e.copyConnector=function(t,r){let n;angular.isUndefined(r)||(n=angular.copy(r),n.name=n.name+"-copy");i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(n)?{name:"",values:{}}:n},options:function(){return e.getOptions(t)}}}).result.then((function(r){m(t,r,(function(){r.skipConversion=!0,e.newConnector(t,r)}))}))},e.newConnector=function(t,r){i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(r)?{name:"",values:{}}:r},options:function(){return e.getOptions(t)}}}).result.then((function(r){m(t,r,(function(){r.skipConversion=!0,e.newConnector(t,r)}))}))},e.repair=function(t,i){c.openSimpleModal({title:h.instant("externalsync.confirm.repair"),message:h.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const o=E(i.value,t.name,!0),s=(l=t.name,"PREFIX prefix:<"+(c=i.value)+">\nINSERT DATA {\n\t<"+a(c)+l+'> prefix:repairConnector ""\n}');var l,c;d.addStatements(r.getActiveRepository(),n({update:s})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(i.value)).then((function(t){e.existing[i.key]=t.data}))})),u.success(h.instant("externalsync.repair.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){o.dismiss("cancel")}))}))},e.delete=function(t,o){const s=o.key.indexOf("Elastic")>=0||o.key.indexOf("Solr")>=0;i.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return s?h.instant("delete.connector.conditional",{type:o.key}):""}}}).result.then((function(i){e.setLoader(!0,h.instant("externalsync.delete.progress.msg",{name:t.name}),h.instant("externalsync.extra.message.warning"));const a=function(e,t,r){const n=t.substring(0,t.length-1)+"/instance#";return"PREFIX prefix:<"+t+">\nINSERT DATA {\n\t<"+n+e+'> prefix:dropConnector "'+(r?"force":"")+'"\n}'}(t.name,o.value,i);d.addStatements(r.getActiveRepository(),n({update:a})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(o.value)).then((function(t){e.existing[o.key]=t.data}))})),i?(u.success(h.instant("externalsync.delete.force.success.msg",{name:t.name})),s&&u.warning(h.instant("externalsync.delete.remote.warning",{key:o.key}))):u.success(h.instant("externalsync.delete.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(t,r){i.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const n=e.getOptions(t);return l(r.name,t.value,o(r.values,n),n)}}})}}function c(e,t,r){e.force=!1,e.popoverMsg=r,e.ok=function(){t.close(e.force)},e.cancel=function(){t.dismiss()}}function p(e,t,r,n,i){function o(){return l(e.name,r.value,e.values,e.options,(function(e,t){i.error(t,e)}))}e.connector=r,e.addField=function(t,r){const n=angular.copy(e.defaultValues[r][0]);e.values[r].splice(t+1,0,n)},e.addOption=function(e,t){t.splice(e+1,0,"")},e.deleteOption=function(e,t){t.splice(e,1)},e.addMapOption=function(e,t){t.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,t){t.splice(e,1)},e.ok=function(){if(e.form.$valid){const r=o();r&&t.close({name:e.name,values:e.values,options:e.options,query:r})}},e.viewQuery=function(){const e=o();e&&n.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){t.dismiss("cancel")}}function d(e,t,r,n,i,s,a,l){angular.extend(this,t("ExtendNewConnectorCtrl",{$scope:e,$uibModalInstance:n,connector:i,$uibModal:s})),e.values=a.values,e.options=l,e.name=a.name,a.skipConversion||(e.values=o(e.values,e.options)),e.defaultValues=angular.copy(e.values)}function f(e,t,r,n,i){function o(){const o=function(e){const t=e.replace(/\/instance#.+$/,"#connectorStatus");let r="";return r+="SELECT ?status {\n",r+="\t<"+e+"> <"+t+"> ?status",r+="\n}",r}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=t((function(){(function(e){return s(r,n.getActiveRepository(),e)})(o).then((function(r){const n=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(r.data.results);"BUILDING"===n.status?(e.beingBuiltConnector.status=n,e.beingBuiltConnector.percentDone=(100*n.processedEntities/n.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(n.etaSeconds),e.beingBuiltConnector.actionName=n.repair?i.instant("externalsync.repairing"):i.instant("externalsync.creating"),e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==n.status||e.beingBuiltConnector.waitOnRepairStartOnce||(t.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){t.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&o(),e.$watch("beingBuiltConnector.iri",(function(t){e.beingBuiltConnector.inline&&t&&o()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",p).controller("CreateConnectorCtrl",d).controller("CreateProgressCtrl",f).controller("DeleteConnectorCtrl",c).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],c.$inject=["$scope","$uibModalInstance","popoverMsg"],p.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],d.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],f.$inject=["$scope","$interval","$http","$repositories","$translate"]},56:function(e,t,r){"use strict";r.r(t);r(5),r(17);var n=r(0);function i(e,t,r,i,o,s,a,l,u,c,p,d,f,h,g){const E={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let m,v;function x(t){!function(){if(i.isActiveRepoOntopType())return;const t=document.getElementById("sameAs");!t||e.currentQuery.inference||t.disabled?e.currentQuery.inference&&t.disabled&&(t.removeAttribute("disabled"),e.currentQuery.sameAs=m.appSettings.DEFAULT_SAMEAS):(t.disabled=!0,e.currentQuery.sameAs=!1)}(),e.tabs.forEach((function(r,n){r.id===t.id&&(e.tabs[n].query=t.query,i.isActiveRepoOntopType()||(e.tabs[n].inference=t.inference,e.tabs[n].sameAs=t.sameAs))})),f.set(h.TABS_STATE,e.tabs)}function y(t,r,n,i){const o=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=r,e.extraMessage=n,e.noLoaderTimer=i,o.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,o.removeClass("hide")),null===e.$$phase&&e.$apply()}function T(r){function n(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=n()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=n()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let n;n=t(r?function(){e.fixSizesOnHorizontalViewModeSwitch(r)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(n)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function N(){T(!0)}function L(t,r){r.newRepo&&(e.tabsData=f.get(h.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),f.set(h.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function I(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function C(n,o){if(e.executedQueryTab=e.currentQuery,o){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType())return void r.warning(g.instant("query.editor.warning.msg"));if(i.isActiveRepoOntopType())return void r.warning(g.instant("query.editor.virtual.repo.warning.msg"))}if(e.explainRequested=o,!e.queryIsRunning){if(n?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&i.isActiveRepoOntopType())return void r.warning(g.instant("query.editor.virtual.repo.update.warning.msg"));if(y(!0,"update"===e.lastRunQueryMode?g.instant("query.editor.executing.update"):g.instant("query.editor.evaluating.query")),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const r=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(r)}))}else window.editor.query()}}function S(){e.showSampleQueries=!e.showSampleQueries,e.showSampleQueries?a.getSavedQueries().success((function(t){e.sampleQueries=t,$("#sampleQueriesCollapse").collapse("show").width("300px")})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.get.saved.queries.error"))})):$("#sampleQueriesCollapse").collapse("hide")}function A(t){let r=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return r=e.id,e})),r}function R(t){return function(r,n,i){e.savedQuery={name:r,query:n||window.editor.getValue(),shared:i},$(t).modal("show")}}function b(t){for(let r=0;r<e.tabsData.length;r++){if(e.tabsData[r].id===t)return r}}e.getPrincipal=function(){return c.getPrincipal().then(t=>{m=t,function(e,t){E.inference=t.appSettings.DEFAULT_INFERENCE,E.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=f.get(h.TABS_STATE)||[E],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,r){x(r.currentQuery)})),e.$on("repositoryIsSet",L)}(e,m)})},e.getPrincipal(),this.hint=document.createElement("span"),this.hint.innerHTML=g.instant("query.editor.autocomplete.hint"),this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const r=b(t);if(void 0===r)return{};const n=e.tabsData[r];return e.saveQueryToLocal(n),n},e.loadTab=function(r){e.tabsData=f.get(h.TABS_STATE)||[E];const n=b(r),o=e.tabsData[n];o.yasrData&&y(!0,g.instant("query.editor.render.results.msg"),null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=o.outputType,o.yasrData&&(o.yasrData.customError?(e.yasr.results={getException:function(){return o.yasrData.customError}},y(!1)):t((function(){e.setYasrResponse(o.yasrData,o.textStatus,o.jqXhrOrErrorString),y(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),f.set(h.TABS_STATE_CURRENT_ID,r),e.currentQuery=o,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=o.queryType,e.currentTabConfig.resultsCount=o.resultsCount,e.currentTabConfig.offset=o.offset,e.currentTabConfig.allResultsCount=o.allResultsCount,e.currentTabConfig.allResultsCountExact=o.allResultsCountExact,e.currentTabConfig.page=o.page,e.currentTabConfig.pageSize=o.pageSize,e.currentTabConfig.timeFinished=o.timeFinished,e.currentTabConfig.timeTook=o.timeTook,e.currentTabConfig.sizeDelta=o.sizeDelta,e.currentTabConfig.customUpdateMessage=o.customUpdateMessage,e.currentTabConfig.errorMessage=o.errorMessage,e.currentTabConfig.warningMessage=o.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),v||(v=setInterval(P,200));!function(){const t=i.isActiveRepoOntopType(),r=i.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),r=document.getElementById("inference");t&&(t.disabled=!!e);r&&(r.disabled=!!e)})(t),e.nocount=!(!t&&!r)||!m.appSettings.EXECUTE_COUNT,t&&(e.currentQuery.inference=!0,e.currentQuery.sameAs=!0)}()},e.addNewTab=function(r,n,i){if(!D(!0))return;let o;o=n||i?{id:"1",name:n,query:i,inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS};O++;const s=""+O;e.tabsData=e.tabs;const a=o;a.id=s,e.tabsData.push(a),f.set(h.TABS_STATE_MAXID,O),f.set(h.TABS_STATE,e.tabsData);const l=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),I(s),r&&r.apply(this,l)}),0),e.tabs=e.tabsData},e.isTabChangeOk=D,e.runQuery=C,e.abortCurrentQuery=function(){d.deleteQuery(e.currentTrackAlias,i.getActiveRepository()).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.edit.saved.query",{name:t.name}),query:t,edit:!0,okButtonText:g.instant("common.save.btn")}}}}).result.then((function(n){const i={name:n.name,body:n.body,shared:n.shared};t.name!==n.name?a.addNewSavedQuery(i).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.edit.saved.query.error"))})):a.editSavedQuery(i).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),r.success(g.instant("query.editor.edit.saved.query.success.msg",{name:t.name}))})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.edit.saved.query.error"))}))}))},e.getNamespaces=function(){y(!0,g.instant("common.refreshing.namespaces"),g.instant("common.extra.message")),e.namespacesLoading=!0,p.getRepositoryNamespaces().success((function(t){const r={};t.results.bindings.forEach((function(e){r[e.prefix.value]=e.namespace.value})),e.namespaces=r})).error((function(t){e.repositoryError=getError(t)})).finally((function(){y(!1),e.namespacesLoading=!1}))},e.changePagination=function(){C(!0,e.explainRequested)},e.toggleSampleQueries=S,e.addKnownPrefixes=function(){a.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return r.error(t,g.instant("common.add.known.prefixes.error")),!0}))},e.getExistingTabId=A,e.querySelected=function(t){const r=A(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(r)?I(r):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){s.openSimpleModal({title:g.instant("common.confirm"),message:g.instant("query.editor.delete.saved.query.warning.msg",{savedQueryName:t}),warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,n){a.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),n||r.success(g.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t}))})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.delete.saved.query.error"))}))},e.saveQuery=function(t,r){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.create.saved.query.msg"),query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:g.instant("common.create.btn"),queryExists:r,existingQueryErrMsg:Object(n.decodeHTML)(g.instant("query.sample.existing.query.warning",{name:t.name}))}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){a.addNewSavedQuery(t).success((function(){r.success(g.instant("query.editor.save.saved.query.success.msg",{name:t.name}))})).error((function(n,i){const o=getError(n);r.error(o,g.instant("query.editor.create.saved.query.error"));let s=!1;409===i&&(s=!0),t.query=t.body,e.saveQuery(t,s)}))},e.saveQueryToLocal=x,e.setLoader=y,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let r="",n="";e.noLoaderTimer||(r=e.getHumanReadableSeconds(t));n=e.progressMessage?g.instant("query.editor.progress.msg",{progressMessage:e.progressMessage,timeHuman:r}):g.instant("common.running.operation",{timeHuman:r});e.extraMessage&&t>10&&(n+=g.instant("query.editor.extra.msg",{extraMessage:e.extraMessage}));return n},e.fixSizesOnHorizontalViewModeSwitch=T,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,f.set(h.VIEW_MODE,e.orientationViewMode),T()},e.showHideEditor=N,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!f.get(h.VIEW_MODE)||"true"===f.get(h.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return i.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return i.getActiveRepository()},e.orientationViewMode||N(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs),clearInterval(v)})),e.$on("$destroy",(function(){clearInterval(v),window.editor=null,window.yasr=null})),$(document).mouseup((function(t){const r=$("#sampleQueriesCollapse");!r.is(t.target)&&0===r.has(t.target).length&&e.showSampleQueries&&S()}));let O=f.get(h.TABS_STATE_MAXID)||1;function w(e){return $(e).attr("data-id")}function P(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function D(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?r.info(g.instant("query.editor.new.tab.running.query.warning.msg")):r.info(g.instant("query.editor.tab.switching.running.query.warning.msg")),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(r,n){n.relatedTarget&&(t.cancel(n.relatedTarget.timer),$(n.relatedTarget).css("color",""),e.saveTab(w(n.relatedTarget))),e.loadTab(w(n.target));const i=["var(--onto-orange)","","var(--onto-orange)"],o=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let r=0;$(n.target).css("color",i[r]);const s=function(){r++,r<i.length?($(n.target).css("color",i[r]),n.target.timer=t(s,o[r])):$(n.target).css("color","")};t(s,o[r])}})),e.$on("deleteAllexeptSelected",(function(t,r){e.tabsData=r,e.tabs=r})),e.currentQuery={},e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.editQueryModal=R("#editQueryContainer"),e.deleteQueryModal=R("#confirmDeleteContainer"),e.saveQueryModal=R("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const r=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t=g.instant("query.editor.showing.results.from.msg")+l("currency")(e.currentTabConfig.offset,"",0)+g.instant("query.editor.to")+l("currency")(r,"",0),e.currentTabConfig.allResultsCount>0&&(t+=g.instant(e.currentTabConfig.allResultsCountExact?"query.editor.of":"query.editor.of.at.least"),t+=l("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?g.instant(e.currentTabConfig.customUpdateMessage.msg,{name:e.currentTabConfig.customUpdateMessage.name}):void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?g.instant("yasr.removed.statements.result.msg",{sizeDelta:Math.abs(e.currentTabConfig.sizeDelta)}):e.currentTabConfig.sizeDelta>0?g.instant("yasr.added.statements.result.msg",{sizeDelta:e.currentTabConfig.sizeDelta}):g.instant("yasr.statements.no.change.msg")},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return g.instant("yasr.stale.result.msg",{secondsAgo:e.getHumanReadableSeconds(t)})};const _=function(){};angular.element(u).bind("resize",_),e.$on("$destroy",(function(){angular.element(u).unbind("resize",_)}))}function o(e,t,r,n){r.queryExists&&(e.queryExists=!0),e.query=angular.copy(r.query),e.title=r.title,e.edit=r.edit,e.okButtonText=r.okButtonText,e.existingQueryErrMsg=n.trustAsHtml(r.existingQueryErrMsg),e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",i).controller("QuerySampleModalCtrl",o),i.$inject=["$scope","$timeout","toastr","$repositories","$uibModal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","$translate"],o.$inject=["$scope","$uibModalInstance","data","$sce"]},57:function(e,t,r){"use strict";r.r(t);r(42),r(5),r(45);var n=r(262),i=r.n(n),o=r(261),s=r.n(o),a=r(0),l=r(58);function u(e,t,r,n,o,u,c,p,d,f,h,g,E,m,v){let x;return{restrict:"AE",scope:!1,templateUrl:"js/angular/core/directives/queryeditor/templates/query-editor.html",link:function(y,T,N){y.nostorage=N.hasOwnProperty("nostorage"),y.notabs=N.hasOwnProperty("notabs"),y.notoolbar=N.hasOwnProperty("notoolbar"),y.notoolbarSaved=N.hasOwnProperty("notoolbarSaved"),y.notoolbarCopy=N.hasOwnProperty("notoolbarCopy"),y.notoolbarInference=N.hasOwnProperty("notoolbarInference"),y.notoolbarSameAs=N.hasOwnProperty("notoolbarSameAs"),y.nostatus=N.hasOwnProperty("nostatus"),y.norun=N.hasOwnProperty("norun"),y.enableColumnResizingOnWindowWidth=N.hasOwnProperty("enableColumnResizingOnWindowWidth"),y.runButtonName="query.editor.run.btn",N.runButtonName&&(y.runButtonName=N.runButtonName);if(y.nocount="true"===N.nocount,N.callbackOnChange){const e=y[N.callbackOnChange];"function"==typeof e&&(x=e)}e((function(){!function(y){function T(){angular.element("#wb-sparql-saveQuery")[0].click()}function N(){y.runQuery(!1,!1)}function L(){y.runQuery(!1,!0)}function I(){if(y.tabs.length<2||!y.currentQuery.id||!y.isTabChangeOk(!1))return;let e=G(y.currentQuery.id);e=(e+1)%y.tabs.length;S(y.tabs[e].id)}function C(){if(y.tabs.length<2||!y.currentQuery.id||!y.isTabChangeOk(!1))return;let e=G(y.currentQuery.id);e--,-1===e&&(e=y.tabs.length-1);S(y.tabs[e].id)}function S(t){e((function(){let e=$('a[data-id = "'+t+'"]');0===e.length&&(e=$("a[data-id]").first()),e.tab("show")}),0)}y.changePagination=function(){y.runQuery(!0,y.explainRequested)},window.editor=i.a.fromTextArea(document.getElementById("query"),{persistent:null,value:"",indentUnit:4,createShareLink:null,cursorHeight:1,sparql:{showQueryButton:!1,acceptHeaderGraph:"application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8",acceptHeaderSelect:"application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8"},extraKeys:{"Ctrl-Enter":N,"Cmd-Enter":N,"Shift-Ctrl-Enter":L,"Shift-Cmd-Enter":L,"Ctrl-Alt-T":y.addNewTab,"Cmd-Alt-T":y.addNewTab,"Ctrl-S":T,"Cmd-S":T,"Ctrl-Alt-Left":C,"Cmd-Alt-Left":C,"Ctrl-Alt-Right":I,"Cmd-Alt-Right":I},locale:m.getLanguage()}),window.editor.toastBuildIndex=function(){const e=Object(a.decodeHTML)(E.instant("explore.autocomplete.warning.msg"));r.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})},window.editor.toastError=function(e){r.error("Cannot execute autocomplete query. "+getError(e))},window.editor.on("update",(function(){angular.element(".parseErrorIcon").parent().css("z-index","10")})),window.editor.on("changes",(function(){angular.element(".CodeMirror-linenumbers").css("width","1px"),angular.element(".CodeMirror-sizer").css("margin-left","0px"),clearTimeout(y.changesTimeout);const e=!window.editor.queryValid;y.changesTimeout=setTimeout(x?x():function(){const t=G(y.currentQuery.id)+1;$('a[data-id = "'+t+'"]').toggleClass("query-has-error",e).attr("title",e?E.instant("query.editor.query.syntax.error"):"")},200),y.currentQuery.query=window.editor.getValue(),y.currentQuery.queryType=window.editor.getQueryType()})),$(".fullscreenToggleBtns").hide();const A=function(e){$(e.target).removeClass("fa-link").addClass("fa-check").blur(),setTimeout((function(){$(e.target).removeClass("fa-check").addClass("fa-link")}),1e3)};window.onbeforeunload=function(){y.nostorage||h.set(g.TABS_STATE,y.tabs),y.saveTab(y.currentQuery.id)};const R=i.a.executeQuery,b=i.a.getUrlArguments;function O(e,t,r){return{status:e,statusText:t,responseText:r}}let w,P;y.$on("$destroy",(function(){y.nostorage||h.set(g.TABS_STATE,y.tabs),i.a.executeQuery=R,i.a.getUrlArguments=b,y.saveTab(y.currentQuery.id)})),i.a.drawButtons=function(e){e.buttons=$("#yasqe_buttons_mocked")},i.a.getActiveRepository=function(){return n.getActiveRepository()},i.a.getUrlArguments=function(e,t){const r=b(e,t),n=window.editor.getQueryType();return"SELECT"!==n&&"CONSTRUCT"!==n&&"DESCRIBE"!==n||(r.push({name:"limit",value:y.currentTabConfig.pageSize+1}),y.currentTabConfig.offset=(y.currentTabConfig.page-1)*y.currentTabConfig.pageSize+1,r.push({name:"offset",value:y.currentTabConfig.offset-1})),!y.explainRequested||"SELECT"!==n&&"CONSTRUCT"!==n||r.push({name:"explain",value:"true"}),r},i.a.executeQuery=function(e){if(P&&$(P.resultsContainer).length&&$(P.resultsContainer).empty(),e.options.sparql.headers["X-GraphDB-Catch"]=y.currentTabConfig.pageSize+"; throw",y.currentTrackAlias="query-editor-"+performance.now()+"-"+Date.now(),e.options.sparql.headers["X-GraphDB-Track-Alias"]=y.currentTrackAlias,e.options.sparql.headers["X-GraphDB-Repository-Location"]=n.getActiveRepositoryObject().location,y.countTimeouted=!1,"query"===e.getQueryMode()?e.options.sparql.endpoint="repositories/"+n.getActiveRepository():"update"===e.getQueryMode()&&(e.options.sparql.endpoint="repositories/"+n.getActiveRepository()+"/statements"),e.options.sparql.args=[{name:"infer",value:y.currentQuery.inference},{name:"sameAs",value:y.currentQuery.sameAs}],y.currentTabConfig.customUpdateMessage="","update"!==window.editor.getQueryMode()){const t=y.currentTabConfig,r=y.executedQueryTab.id;return window.editor.options.sparql.handlers.countCallback=function(e,n,i){if(200===e.status){const o=y.tabs[G(r)];o&&(P.setResultsCount(e,n,i),t.allResultsCount=P.allCount,o.allResultsCount=P.allCount,t.allResultsCountExact=!0,o.allResultsCountExact=!0,y.saveTab(o.id))}else t.countTimeouted=!0},null!=y.currentQuery.outputType?P.options.output=y.currentQuery.outputType:P.options.output="table",y.currentTabConfig.queryType=window.editor.getQueryType(),y.queryStartTime=(new Date).getTime(),R(e,{setQueryLimit:function(e){return"CONSTRUCT"===y.currentTabConfig.queryType&&n.isActiveRepoOntopType()?window.editor.getValueWithoutComments():e}})}{const t=function(){y.currentTabConfig.queryType="UPDATE",d.getRepositorySize().success((function(t){return y.repoSize=parseInt(t),y.queryStartTime=(new Date).getTime(),R(e,{})})).error((function(t){return r.warning(E.instant("query.editor.repo.size.error",{repo:n.getActiveRepository(),error:getError(t)})),y.queryStartTime=(new Date).getTime(),R(e,{})}))};f.checkConnector(window.editor.getValue()).then((function(e){if(e.data.command&&!e.data.hasSupport){y.currentTabConfig.queryType="ERROR",y.currentTabConfig.timeFinished=Date.now(),y.currentTabConfig.timeTook=(y.currentTabConfig.timeFinished-y.queryStartTime)/1e3;const t=E.instant("query.editor.inactive.plugin.warning.msg",{connectorName:e.data.connectorName,pluginName:e.data.pluginName}),r=O(-1,t,t);return P.results={getException:function(){return r}},y.setLoader(!1),void M({customError:r},"",null)}if("create"===e.data.command||"repair"===e.data.command){const t="repair"===e.data.command;t?(y.setLoader(!0,E.instant("query.editor.repairing.connector",{name:e.data.name})),y.currentTabConfig.customUpdateMessage={msg:"query.editor.repaired.connector",name:e.data.name}):(y.setLoader(!0,E.instant("query.editor.creating.connector",{name:e.data.name})),y.currentTabConfig.customUpdateMessage={msg:"created.connector",name:e.data.name});const r=y.$new(!0);r.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?E.instant("externalsync.repairing"):E.instant("externalsync.creating"),eta:"-",inline:!1,iri:e.data.iri,name:e.data.name,doneCallback:function(){w.dismiss("cancel")}},r.getHumanReadableSeconds=y.getHumanReadableSeconds,w=c.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:r})}else"drop"===e.data.command&&(y.setLoader(!0,E.instant("externalsync.delete.progress.msg",{name:e.data.name})),y.currentTabConfig.customUpdateMessage={msg:"externalsync.delete.success.msg",name:e.data.name});t()}),(function(){t()}))}};const D=i.a.getAjaxConfig;function M(e,t,r){e.getResponseHeader&&e.getResponseHeader("content-type")&&(e.contentType=e.getResponseHeader("content-type")),delete e.response;const n=G(y.executedQueryTab.id),i=y.tabs[n],o={queryType:y.currentTabConfig.queryType,yasrData:e,textStatus:t,jqXhrOrErrorString:r,page:y.currentTabConfig.page,pageSize:y.currentTabConfig.pageSize,allResultsCount:y.currentTabConfig.allResultsCount,allResultsCountExact:y.currentTabConfig.allResultsCountExact,resultsCount:y.currentTabConfig.resultsCount,offset:y.currentTabConfig.offset,timeTook:y.currentTabConfig.timeTook,timeFinished:y.currentTabConfig.timeFinished,sizeDelta:y.currentTabConfig.sizeDelta,customUpdateMessage:y.currentTabConfig.customUpdateMessage,errorMessage:y.currentTabConfig.errorMessage,warningMessage:y.currentTabConfig.warningMessage};"ERROR"!==y.currentTabConfig.queryType&&"UPDATE"!==y.currentTabConfig.queryType&&"ASK"!==y.currentTabConfig.queryType&&(o.outputType=y.yasr.options.output),angular.extend(y.currentQuery,o),angular.extend(i,o),y.nostorage||h.set(g.TABS_STATE,y.tabs),$('a[data-id = "'+y.executedQueryTab.id+'"]').tab("show")}function k(){y.$on("$destroy",(function(){P&&P.destroy()}));const t={getUsedPrefixes:{},persistency:!1,locale:m.getLanguage()};y.enableColumnResizingOnWindowWidth&&(t.pluginsOptions=l.YasrUtils.getYasrConfiguration()),P=s()(document.getElementById("yasr"),t),window.yasr=P,P.afterCopy=A,P.getQueryResultsAsFormat=function(e){const t=$("#wb-download");t.attr("action","repositories/"+n.getActiveRepository()),$("#wb-download-query").val(y.currentQuery.query),window.editor.getValue()!==y.currentQuery.query&&r.warning(E.instant("query.editor.query.results.mismatch")),$("#wb-download-infer").val(y.currentQuery.inference),$("#wb-download-sameAs").val(y.currentQuery.sameAs);const i=localStorage.getItem("com.ontotext.graphdb.auth");i&&$("#wb-auth-token").val(i),$("#wb-download-accept").val(e),t.submit()},window.editor.options.sparql.handlers.complete=function(t,i,o){function s(){M(t,i,o)}if(w&&w.dismiss("cancel"),null===window.editor)return void y.setLoader(!1);if(y.currentTabConfig.errorMessage=t.getResponseHeader("X-GraphDB-Error"),y.currentTabConfig.warningMessage=t.getResponseHeader("X-GraphDB-Warning"),P.currentQuery=y.currentQuery,y.currentTabConfig.timeFinished=Date.now(),y.currentTabConfig.timeTook=(y.currentTabConfig.timeFinished-y.queryStartTime)/1e3,t.status>=400)return t.responseText=t.responseText.replace(/^([^: ]+: )+/,""),y.currentTabConfig.queryType="ERROR",s(),y.setYasrResponse(t,i,o),void y.setLoader(!1);if(0===t.status){y.currentTabConfig.queryType="ERROR";const e=O(-1,E.instant("aborted.request.msg"),E.instant("aborted.request.no.results.msg"));return P.results={getException:function(){return e}},y.setLoader(!1),void M({customError:e},"",null)}let a;if(y.setLoader(!1),"update"===window.editor.getQueryMode())a=function(){d.getRepositorySize().success((function(e){let t;void 0!==y.repoSize&&(t=Number(e)-y.repoSize),y.currentTabConfig.sizeDelta=t,s()})).error((function(e){r.warning(E.instant("query.editor.repo.size.error",{repo:n.getActiveRepository(),error:getError(e)})),y.currentTabConfig.sizeDelta=void 0,s()}))};else{if(200===t.status){const e=t.getResponseHeader("Content-Type");0!==e.indexOf("application/sparql-results+json")&&0!==e.indexOf("application/x-sparqlstar-results+json")&&0!==e.indexOf("application/x-graphdb-table-results+json")||t.responseJSON.results&&(y.currentTabConfig.resultsCount=t.responseJSON.results.bindings.length,t.responseJSON.results.bindings.length>y.currentTabConfig.pageSize&&(t.responseJSON.results.bindings.length=y.currentTabConfig.pageSize),y.currentTabConfig.allResultsCountExact||((y.nocount||y.countTimeouted||y.currentTabConfig.resultsCount<=y.currentTabConfig.pageSize)&&(t.status=204),y.currentTabConfig.allResultsCount=Math.max(y.currentTabConfig.allResultsCount,y.currentTabConfig.pageSize*(y.currentTabConfig.page-1)+y.currentTabConfig.resultsCount),y.currentTabConfig.resultsCount<=y.currentTabConfig.pageSize&&(y.currentTabConfig.allResultsCountExact=!0)))}y.setLoader(!0,E.instant("query.editor.render.results.msg"),null,!0),a=function(){y.setYasrResponse(t,i,o),s(),y.setLoader(!1)}}e((function(){a(),"CONSTRUCT"!==window.editor.getQueryType()?($(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$(".yasr_btnGroup.nav.nav-tabs li.disabled a").addClass("disabled").css("font-weight","200"),"DESCRIBE"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a").removeClass("disabled").css("font-weight","400")):"CONSTRUCT"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$("#yasr").css("padding","0"),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&e((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),100),$("#wb-sparql-addNewTab").click((function(){$(".dataTables_filter").hide(),$(".resultsTable").hide()}))}),100)},window.editor.options.sparql.handlers.resetResults=function(){},y.yasr=P,y.setYasrResponse=function(e,t,r){e.responseJSON&&(e.response=e.responseJSON,e.responseText=void 0),window.yasr.plugins.table.options.highlightLiteralCellResult=F,P.setResponse(e,t,r)},y.$watch("yasr.options.output",(function(e){if(e&&"UPDATE"!==y.currentTabConfig.queryType&&"ASK"!==y.currentTabConfig.queryType){const t=y.tabs[G(y.currentQuery.id)];angular.isDefined(t)&&y.currentTabConfig.queryType&&t.outputType!==e&&(t.outputType=y.currentQuery.outputType=e,y.saveTab(t.id))}})),y.$watch("namespaces",(function(){y.namespaces&&(P&&P.options&&y.namespaces&&(P.options.getUsedPrefixes=y.namespaces),i.a.signal(window.editor,"namespacesChanged",y.namespaces))}))}function F(){var e=P.results.getBindings(),t=P.results.getVariables(),r=e[0],n=t[0];if(1===t.length&&1===e.length&&"plan"===n&&r[n].value.includes("# NOTE: Optimization groups")){var o=document.getElementsByClassName("nonUri")[0];o.classList.add("cm-s-default"),o.setAttribute("id","highlighted_output");var s=o.innerText.substring(1,o.innerText.length-1);o.innerHTML="",i.a.runMode(s,"sparql11",document.getElementById("highlighted_output"))}}function G(e){for(let t=0;t<y.tabs.length;t++){if(y.tabs[t].id===e)return t}}function U(e){return angular.isDefined(e)&&"false"!==e}function B(e,r,n){const i=y.getExistingTabId(e),o=y.$on("tabLoaded",(function(){angular.isDefined(r)&&(y.currentQuery.inference=U(r)),angular.isDefined(n)&&(y.currentQuery.sameAs=U(n)),U(t.search().execute)&&("update"===window.editor.getQueryMode()?u.openSimpleModal({title:E.instant("confirm.execute"),message:Object(a.decodeHTML)(E.instant("query.editor.automatically.execute.update.warning")),warning:!0}).result.then((function(){y.runQuery(!1)})):y.runQuery(!1)),o()}));y.highlightNextTabChange=!0,angular.isDefined(i)?S(i):y.addNewTab(null,e.name,e.body)}function V(){if(t.search().savedQueryName)e=t.search().savedQueryName,n=t.search().owner,i=t.search().infer,s=t.search().sameAs,o.getSavedQuery(e,n).success((function(e){B(e,i,s)})).error((function(t){r.error(E.instant("query.editor.missing.saved.query.data.error",{savedQueryName:e,error:getError(t)}))}));else if(t.search().query){B({name:t.search().name,body:t.search().query},t.search().infer,t.search().sameAs)}else if(v.isActive())y.addNewTab();else{S(h.get(g.TABS_STATE_CURRENT_ID))}var e,n,i,s}function j(){y.getNamespaces(),i.a.signal(window.editor,"repositoryOrAuthorizationChanged",n.getActiveRepository(),p.getAuthToken()),V()}i.a.getAjaxConfig=function(e,t){const r=D(e,t);let n=p.getAuthToken();return n&&_.extend(r.headers,{Authorization:n}),r},y.copyToClipboardQuery=function(e,t){u.openCopyToClipboardModal(function(e,t){let r=[location.protocol,"//",location.host,location.pathname].join("");e?(r=r+"?savedQueryName="+encodeURIComponent(e),null!=t&&(r+="&owner="+encodeURIComponent(t))):r=r+"?"+$.param({name:y.currentQuery.name,infer:y.currentQuery.inference,sameAs:y.currentQuery.sameAs,query:window.editor.getValue()});return r}(e,t))},y.copyToClipboardResult=function(e){u.openCopyToClipboardModal(e)},y.goToVisual=function(){const e={query:window.editor.getValue(),sameAs:y.currentQuery.sameAs,inference:y.currentQuery.inference};t.path("graphs-visualizations").search(e)},$("textarea").on("paste",(function(){e((function(){y.addKnownPrefixes()}),0)})),y.$on("language-changed",(function(e,t){P&&P.options&&(P.options.locale=t.locale,P.changeLanguage(t.locale)),window.editor.options.locale=t.locale,i.a.signal(window.editor,"language-changed")})),k(),$(document).mouseup((function(e){const t=$("#sampleQueriesCollapse");!t.is(e.target)&&0===t.has(e.target).length&&y.showSampleQueries&&y.toggleSampleQueries()})),n.getActiveRepository()&&j();y.$on("repositoryIsSet",(function(){n.getActiveRepository()&&j()})),e((function(){angular.element(document).find(".CodeMirror textarea:first-child").focus()}),50)}(y)}),150)}}}angular.module("graphdb.framework.core.directives.queryeditor.queryeditor",["ngCookies","graphdb.framework.externalsync.controllers","graphdb.framework.rest.connectors.service","graphdb.framework.utils.localstorageadapter"]).directive("queryEditor",u),u.$inject=["$timeout","$location","toastr","$repositories","SparqlRestService","ModalService","$uibModal","$jwtAuth","RDF4JRepositoriesRestService","ConnectorsRestService","LocalStorageAdapter","LSKeys","$translate","$languageService","GuidesService"]}}]);
27
- //# sourceMappingURL=3.d06a0ca122c78522c911.bundle.js.map
26
+ function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f,h,g,E,m,v,x,y="sizzle"+1*new Date,T=e.document,N=0,L=0,I=ie(),C=ie(),S=ie(),A=function(e,t){return e===t&&(p=!0),0},R={}.hasOwnProperty,b=[],O=b.pop,w=b.push,P=b.push,D=b.slice,_=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",k="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",G="\\["+k+"*("+F+")(?:"+k+"*([*^$|!~]?=)"+k+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+k+"*\\]",U=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+G+")*)|.*)\\)|)",B=new RegExp(k+"+","g"),V=new RegExp("^"+k+"+|((?:^|[^\\\\])(?:\\\\.)*)"+k+"+$","g"),j=new RegExp("^"+k+"*,"+k+"*"),H=new RegExp("^"+k+"*([>+~]|"+k+")"+k+"*"),q=new RegExp("="+k+"*([^\\]'\"]*?)"+k+"*\\]","g"),W=new RegExp(U),z=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+G),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+k+"*(even|odd|(([+-]|)(\\d*)n|)"+k+"*(?:([+-]|)"+k+"*(\\d+)|))"+k+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+k+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+k+"*((?:-\\d)?\\d*)"+k+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,J=/'|\\/g,ee=new RegExp("\\\\([\\da-f]{1,6}"+k+"?|("+k+")|.)","ig"),te=function(e,t,r){var n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},re=function(){d()};try{P.apply(b=D.call(T.childNodes),T.childNodes),b[T.childNodes.length].nodeType}catch(e){P={apply:b.length?function(e,t){w.apply(e,D.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}function ne(e,t,n,i){var o,a,u,c,p,h,m,v,N=t&&t.ownerDocument,L=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==L&&9!==L&&11!==L)return n;if(!i&&((t?t.ownerDocument||t:T)!==f&&d(t),t=t||f,g)){if(11!==L&&(h=K.exec(e)))if(o=h[1]){if(9===L){if(!(u=t.getElementById(o)))return n;if(u.id===o)return n.push(u),n}else if(N&&(u=N.getElementById(o))&&x(t,u)&&u.id===o)return n.push(u),n}else{if(h[2])return P.apply(n,t.getElementsByTagName(e)),n;if((o=h[3])&&r.getElementsByClassName&&t.getElementsByClassName)return P.apply(n,t.getElementsByClassName(o)),n}if(r.qsa&&!S[e+" "]&&(!E||!E.test(e))){if(1!==L)N=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(J,"\\$&"):t.setAttribute("id",c=y),a=(m=s(e)).length,p=z.test(c)?"#"+c:"[id='"+c+"']";a--;)m[a]=p+" "+he(m[a]);v=m.join(","),N=Z.test(e)&&de(t.parentNode)||t}if(v)try{return P.apply(n,N.querySelectorAll(v)),n}catch(e){}finally{c===y&&t.removeAttribute("id")}}}return l(e.replace(V,"$1"),t,n,i)}function ie(){var e=[];return function t(r,i){return e.push(r+" ")>n.cacheLength&&delete t[e.shift()],t[r+" "]=i}}function oe(e){return e[y]=!0,e}function se(e){var t=f.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ae(e,t){for(var r=e.split("|"),i=r.length;i--;)n.attrHandle[r[i]]=t}function le(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function ue(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ce(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}function pe(e){return oe((function(t){return t=+t,oe((function(r,n){for(var i,o=e([],r.length,t),s=o.length;s--;)r[i=o[s]]&&(r[i]=!(n[i]=r[i]))}))}))}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in r=ne.support={},o=ne.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=ne.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:T;return s!==f&&9===s.nodeType&&s.documentElement?(h=(f=s).documentElement,g=!o(f),(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),r.attributes=se((function(e){return e.className="i",!e.getAttribute("className")})),r.getElementsByTagName=se((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),r.getElementsByClassName=Y.test(f.getElementsByClassName),r.getById=se((function(e){return h.appendChild(e).id=y,!f.getElementsByName||!f.getElementsByName(y).length})),r.getById?(n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var r=t.getElementById(e);return r?[r]:[]}},n.filter.ID=function(e){var t=e.replace(ee,te);return function(e){return e.getAttribute("id")===t}}):(delete n.find.ID,n.filter.ID=function(e){var t=e.replace(ee,te);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}}),n.find.TAG=r.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):r.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,n=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;r=o[i++];)1===r.nodeType&&n.push(r);return n}return o},n.find.CLASS=r.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],E=[],(r.qsa=Y.test(f.querySelectorAll))&&(se((function(e){h.appendChild(e).innerHTML="<a id='"+y+"'></a><select id='"+y+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&E.push("[*^$]="+k+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||E.push("\\["+k+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+y+"-]").length||E.push("~="),e.querySelectorAll(":checked").length||E.push(":checked"),e.querySelectorAll("a#"+y+"+*").length||E.push(".#.+[+~]")})),se((function(e){var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&E.push("name"+k+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||E.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),E.push(",.*:")}))),(r.matchesSelector=Y.test(v=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se((function(e){r.disconnectedMatch=v.call(e,"div"),v.call(e,"[s!='']:x"),m.push("!=",U)})),E=E.length&&new RegExp(E.join("|")),m=m.length&&new RegExp(m.join("|")),t=Y.test(h.compareDocumentPosition),x=t||Y.test(h.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return p=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!r.sortDetached&&t.compareDocumentPosition(e)===n?e===f||e.ownerDocument===T&&x(T,e)?-1:t===f||t.ownerDocument===T&&x(T,t)?1:c?_(c,e)-_(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return p=!0,0;var r,n=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===f?-1:t===f?1:i?-1:o?1:c?_(c,e)-_(c,t):0;if(i===o)return le(e,t);for(r=e;r=r.parentNode;)s.unshift(r);for(r=t;r=r.parentNode;)a.unshift(r);for(;s[n]===a[n];)n++;return n?le(s[n],a[n]):s[n]===T?-1:a[n]===T?1:0},f):f},ne.matches=function(e,t){return ne(e,null,null,t)},ne.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&d(e),t=t.replace(q,"='$1']"),r.matchesSelector&&g&&!S[t+" "]&&(!m||!m.test(t))&&(!E||!E.test(t)))try{var n=v.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return ne(t,f,null,[e]).length>0},ne.contains=function(e,t){return(e.ownerDocument||e)!==f&&d(e),x(e,t)},ne.attr=function(e,t){(e.ownerDocument||e)!==f&&d(e);var i=n.attrHandle[t.toLowerCase()],o=i&&R.call(n.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:r.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ne.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ne.uniqueSort=function(e){var t,n=[],i=0,o=0;if(p=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),p){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return c=null,e},i=ne.getText=function(e){var t,r="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)r+=i(t);return r},(n=ne.selectors={cacheLength:50,createPseudo:oe,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ee,te),e[3]=(e[3]||e[4]||e[5]||"").replace(ee,te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ne.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ne.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&W.test(r)&&(t=s(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ee,te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=I[e+" "];return t||(t=new RegExp("(^|"+k+")"+e+"("+k+"|$)"))&&I(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,r){return function(n){var i=ne.attr(n,e);return null==i?"!="===t:!t||(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i.replace(B," ")+" ").indexOf(r)>-1:"|="===t&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,n,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===i?function(e){return!!e.parentNode}:function(t,r,l){var u,c,p,d,f,h,g=o!==s?"nextSibling":"previousSibling",E=t.parentNode,m=a&&t.nodeName.toLowerCase(),v=!l&&!a,x=!1;if(E){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?E.firstChild:E.lastChild],s&&v){for(x=(f=(u=(c=(p=(d=E)[y]||(d[y]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===N&&u[1])&&u[2],d=f&&E.childNodes[f];d=++f&&d&&d[g]||(x=f=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[N,f,x];break}}else if(v&&(x=f=(u=(c=(p=(d=t)[y]||(d[y]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===N&&u[1]),!1===x)for(;(d=++f&&d&&d[g]||(x=f=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(v&&((c=(p=d[y]||(d[y]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]=[N,x]),d!==t)););return(x-=i)===n||x%n==0&&x/n>=0}}},PSEUDO:function(e,t){var r,i=n.pseudos[e]||n.setFilters[e.toLowerCase()]||ne.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(r=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?oe((function(e,r){for(var n,o=i(e,t),s=o.length;s--;)e[n=_(e,o[s])]=!(r[n]=o[s])})):function(e){return i(e,0,r)}):i}},pseudos:{not:oe((function(e){var t=[],r=[],n=a(e.replace(V,"$1"));return n[y]?oe((function(e,t,r,i){for(var o,s=n(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,n(t,null,o,r),t[0]=null,!r.pop()}})),has:oe((function(e){return function(t){return ne(e,t).length>0}})),contains:oe((function(e){return e=e.replace(ee,te),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),lang:oe((function(e){return z.test(e||"")||ne.error("unsupported lang: "+e),e=e.replace(ee,te).toLowerCase(),function(t){var r;do{if(r=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe((function(){return[0]})),last:pe((function(e,t){return[t-1]})),eq:pe((function(e,t,r){return[r<0?r+t:r]})),even:pe((function(e,t){for(var r=0;r<t;r+=2)e.push(r);return e})),odd:pe((function(e,t){for(var r=1;r<t;r+=2)e.push(r);return e})),lt:pe((function(e,t,r){for(var n=r<0?r+t:r;--n>=0;)e.push(n);return e})),gt:pe((function(e,t,r){for(var n=r<0?r+t:r;++n<t;)e.push(n);return e}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=ue(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=ce(t);function fe(){}function he(e){for(var t=0,r=e.length,n="";t<r;t++)n+=e[t].value;return n}function ge(e,t,r){var n=t.dir,i=r&&"parentNode"===n,o=L++;return t.first?function(t,r,o){for(;t=t[n];)if(1===t.nodeType||i)return e(t,r,o)}:function(t,r,s){var a,l,u,c=[N,o];if(s){for(;t=t[n];)if((1===t.nodeType||i)&&e(t,r,s))return!0}else for(;t=t[n];)if(1===t.nodeType||i){if((a=(l=(u=t[y]||(t[y]={}))[t.uniqueID]||(u[t.uniqueID]={}))[n])&&a[0]===N&&a[1]===o)return c[2]=a[2];if(l[n]=c,c[2]=e(t,r,s))return!0}}}function Ee(e){return e.length>1?function(t,r,n){for(var i=e.length;i--;)if(!e[i](t,r,n))return!1;return!0}:e[0]}function me(e,t,r,n,i){for(var o,s=[],a=0,l=e.length,u=null!=t;a<l;a++)(o=e[a])&&(r&&!r(o,n,i)||(s.push(o),u&&t.push(a)));return s}function ve(e,t,r,n,i,o){return n&&!n[y]&&(n=ve(n)),i&&!i[y]&&(i=ve(i,o)),oe((function(o,s,a,l){var u,c,p,d=[],f=[],h=s.length,g=o||function(e,t,r){for(var n=0,i=t.length;n<i;n++)ne(e,t[n],r);return r}(t||"*",a.nodeType?[a]:a,[]),E=!e||!o&&t?g:me(g,d,e,a,l),m=r?i||(o?e:h||n)?[]:s:E;if(r&&r(E,m,a,l),n)for(u=me(m,f),n(u,[],a,l),c=u.length;c--;)(p=u[c])&&(m[f[c]]=!(E[f[c]]=p));if(o){if(i||e){if(i){for(u=[],c=m.length;c--;)(p=m[c])&&u.push(E[c]=p);i(null,m=[],u,l)}for(c=m.length;c--;)(p=m[c])&&(u=i?_(o,p):d[c])>-1&&(o[u]=!(s[u]=p))}}else m=me(m===s?m.splice(h,m.length):m),i?i(null,s,m,l):P.apply(s,m)}))}function xe(e){for(var t,r,i,o=e.length,s=n.relative[e[0].type],a=s||n.relative[" "],l=s?1:0,c=ge((function(e){return e===t}),a,!0),p=ge((function(e){return _(t,e)>-1}),a,!0),d=[function(e,r,n){var i=!s&&(n||r!==u)||((t=r).nodeType?c(e,r,n):p(e,r,n));return t=null,i}];l<o;l++)if(r=n.relative[e[l].type])d=[ge(Ee(d),r)];else{if((r=n.filter[e[l].type].apply(null,e[l].matches))[y]){for(i=++l;i<o&&!n.relative[e[i].type];i++);return ve(l>1&&Ee(d),l>1&&he(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(V,"$1"),r,l<i&&xe(e.slice(l,i)),i<o&&xe(e=e.slice(i)),i<o&&he(e))}d.push(r)}return Ee(d)}return fe.prototype=n.filters=n.pseudos,n.setFilters=new fe,s=ne.tokenize=function(e,t){var r,i,o,s,a,l,u,c=C[e+" "];if(c)return t?0:c.slice(0);for(a=e,l=[],u=n.preFilter;a;){for(s in r&&!(i=j.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),r=!1,(i=H.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(V," ")}),a=a.slice(r.length)),n.filter)!(i=$[s].exec(a))||u[s]&&!(i=u[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return t?a.length:a?ne.error(e):C(e,l).slice(0)},a=ne.compile=function(e,t){var r,i=[],o=[],a=S[e+" "];if(!a){for(t||(t=s(e)),r=t.length;r--;)(a=xe(t[r]))[y]?i.push(a):o.push(a);(a=S(e,function(e,t){var r=t.length>0,i=e.length>0,o=function(o,s,a,l,c){var p,h,E,m=0,v="0",x=o&&[],y=[],T=u,L=o||i&&n.find.TAG("*",c),I=N+=null==T?1:Math.random()||.1,C=L.length;for(c&&(u=s===f||s||c);v!==C&&null!=(p=L[v]);v++){if(i&&p){for(h=0,s||p.ownerDocument===f||(d(p),a=!g);E=e[h++];)if(E(p,s||f,a)){l.push(p);break}c&&(N=I)}r&&((p=!E&&p)&&m--,o&&x.push(p))}if(m+=v,r&&v!==m){for(h=0;E=t[h++];)E(x,y,s,a);if(o){if(m>0)for(;v--;)x[v]||y[v]||(y[v]=O.call(l));y=me(y)}P.apply(l,y),c&&!o&&y.length>0&&m+t.length>1&&ne.uniqueSort(l)}return c&&(N=I,u=T),x};return r?oe(o):o}(o,i))).selector=e}return a},l=ne.select=function(e,t,i,o){var l,u,c,p,d,f="function"==typeof e&&e,h=!o&&s(e=f.selector||e);if(i=i||[],1===h.length){if((u=h[0]=h[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&r.getById&&9===t.nodeType&&g&&n.relative[u[1].type]){if(!(t=(n.find.ID(c.matches[0].replace(ee,te),t)||[])[0]))return i;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(l=$.needsContext.test(e)?0:u.length;l--&&(c=u[l],!n.relative[p=c.type]);)if((d=n.find[p])&&(o=d(c.matches[0].replace(ee,te),Z.test(u[0].type)&&de(t.parentNode)||t))){if(u.splice(l,1),!(e=o.length&&he(u)))return P.apply(i,o),i;break}}return(f||a(e,h))(o,t,!g,i,!t||Z.test(e)&&de(t.parentNode)||t),i},r.sortStable=y.split("").sort(A).join("")===y,r.detectDuplicates=!!p,d(),r.sortDetached=se((function(e){return 1&e.compareDocumentPosition(f.createElement("div"))})),se((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ae("type|href|height|width",(function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),r.attributes&&se((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ae("value",(function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),se((function(e){return null==e.getAttribute("disabled")}))||ae(M,(function(e,t,r){var n;if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),ne}(e);d.find=v,d.expr=v.selectors,d.expr[":"]=d.expr.pseudos,d.uniqueSort=d.unique=v.uniqueSort,d.text=v.getText,d.isXMLDoc=v.isXML,d.contains=v.contains;var x=function(e,t,r){for(var n=[],i=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&d(e).is(r))break;n.push(e)}return n},y=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r},T=d.expr.match.needsContext,N=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,L=/^.[^:#\[\.,]*$/;function I(e,t,r){if(d.isFunction(t))return d.grep(e,(function(e,n){return!!t.call(e,n,e)!==r}));if(t.nodeType)return d.grep(e,(function(e){return e===t!==r}));if("string"==typeof t){if(L.test(t))return d.filter(t,e,r);t=d.filter(t,e)}return d.grep(e,(function(e){return a.call(t,e)>-1!==r}))}d.filter=function(e,t,r){var n=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?d.find.matchesSelector(n,e)?[n]:[]:d.find.matches(e,d.grep(t,(function(e){return 1===e.nodeType})))},d.fn.extend({find:function(e){var t,r=this.length,n=[],i=this;if("string"!=typeof e)return this.pushStack(d(e).filter((function(){for(t=0;t<r;t++)if(d.contains(i[t],this))return!0})));for(t=0;t<r;t++)d.find(e,i[t],n);return(n=this.pushStack(r>1?d.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&T.test(e)?d(e):e||[],!1).length}});var C,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(d.fn.init=function(e,t,r){var i,o;if(!e)return this;if(r=r||C,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:S.exec(e))||!i[1]&&t)return!t||t.jquery?(t||r).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof d?t[0]:t,d.merge(this,d.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:n,!0)),N.test(i[1])&&d.isPlainObject(t))for(i in t)d.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=n.getElementById(i[2]))&&o.parentNode&&(this.length=1,this[0]=o),this.context=n,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):d.isFunction(e)?void 0!==r.ready?r.ready(e):e(d):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),d.makeArray(e,this))}).prototype=d.fn,C=d(n);var A=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function b(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}d.fn.extend({has:function(e){var t=d(e,this),r=t.length;return this.filter((function(){for(var e=0;e<r;e++)if(d.contains(this,t[e]))return!0}))},closest:function(e,t){for(var r,n=0,i=this.length,o=[],s=T.test(e)||"string"!=typeof e?d(e,t||this.context):0;n<i;n++)for(r=this[n];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(s?s.index(r)>-1:1===r.nodeType&&d.find.matchesSelector(r,e))){o.push(r);break}return this.pushStack(o.length>1?d.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?a.call(d(e),this[0]):a.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(d.uniqueSort(d.merge(this.get(),d(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),d.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,r){return x(e,"parentNode",r)},next:function(e){return b(e,"nextSibling")},prev:function(e){return b(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,r){return x(e,"nextSibling",r)},prevUntil:function(e,t,r){return x(e,"previousSibling",r)},siblings:function(e){return y((e.parentNode||{}).firstChild,e)},children:function(e){return y(e.firstChild)},contents:function(e){return e.contentDocument||d.merge([],e.childNodes)}},(function(e,t){d.fn[e]=function(r,n){var i=d.map(this,t,r);return"Until"!==e.slice(-5)&&(n=r),n&&"string"==typeof n&&(i=d.filter(n,i)),this.length>1&&(R[e]||d.uniqueSort(i),A.test(e)&&i.reverse()),this.pushStack(i)}}));var O,w=/\S+/g;function P(){n.removeEventListener("DOMContentLoaded",P),e.removeEventListener("load",P),d.ready()}d.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return d.each(e.match(w)||[],(function(e,r){t[r]=!0})),t}(e):d.extend({},e);var t,r,n,i,o=[],s=[],a=-1,l=function(){for(i=e.once,n=t=!0;s.length;a=-1)for(r=s.shift();++a<o.length;)!1===o[a].apply(r[0],r[1])&&e.stopOnFalse&&(a=o.length,r=!1);e.memory||(r=!1),t=!1,i&&(o=r?[]:"")},u={add:function(){return o&&(r&&!t&&(a=o.length-1,s.push(r)),function t(r){d.each(r,(function(r,n){d.isFunction(n)?e.unique&&u.has(n)||o.push(n):n&&n.length&&"string"!==d.type(n)&&t(n)}))}(arguments),r&&!t&&l()),this},remove:function(){return d.each(arguments,(function(e,t){for(var r;(r=d.inArray(t,o,r))>-1;)o.splice(r,1),r<=a&&a--})),this},has:function(e){return e?d.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=r="",this},disabled:function(){return!o},lock:function(){return i=s=[],r||(o=r=""),this},locked:function(){return!!i},fireWith:function(e,r){return i||(r=[e,(r=r||[]).slice?r.slice():r],s.push(r),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},d.extend({Deferred:function(e){var t=[["resolve","done",d.Callbacks("once memory"),"resolved"],["reject","fail",d.Callbacks("once memory"),"rejected"],["notify","progress",d.Callbacks("memory")]],r="pending",n={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return d.Deferred((function(r){d.each(t,(function(t,o){var s=d.isFunction(e[t])&&e[t];i[o[1]]((function(){var e=s&&s.apply(this,arguments);e&&d.isFunction(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[o[0]+"With"](this===n?r.promise():this,s?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?d.extend(e,n):n}},i={};return n.pipe=n.then,d.each(t,(function(e,o){var s=o[2],a=o[3];n[o[1]]=s.add,a&&s.add((function(){r=a}),t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?n:this,arguments),this},i[o[0]+"With"]=s.fireWith})),n.promise(i),e&&e.call(i,i),i},when:function(e){var t,r,n,o=0,s=i.call(arguments),a=s.length,l=1!==a||e&&d.isFunction(e.promise)?a:0,u=1===l?e:d.Deferred(),c=function(e,r,n){return function(o){r[e]=this,n[e]=arguments.length>1?i.call(arguments):o,n===t?u.notifyWith(r,n):--l||u.resolveWith(r,n)}};if(a>1)for(t=new Array(a),r=new Array(a),n=new Array(a);o<a;o++)s[o]&&d.isFunction(s[o].promise)?s[o].promise().progress(c(o,r,t)).done(c(o,n,s)).fail(u.reject):--l;return l||u.resolveWith(n,s),u.promise()}}),d.fn.ready=function(e){return d.ready.promise().done(e),this},d.extend({isReady:!1,readyWait:1,holdReady:function(e){e?d.readyWait++:d.ready(!0)},ready:function(e){(!0===e?--d.readyWait:d.isReady)||(d.isReady=!0,!0!==e&&--d.readyWait>0||(O.resolveWith(n,[d]),d.fn.triggerHandler&&(d(n).triggerHandler("ready"),d(n).off("ready"))))}}),d.ready.promise=function(t){return O||(O=d.Deferred(),"complete"===n.readyState||"loading"!==n.readyState&&!n.documentElement.doScroll?e.setTimeout(d.ready):(n.addEventListener("DOMContentLoaded",P),e.addEventListener("load",P))),O.promise(t)},d.ready.promise();var D=function(e,t,r,n,i,o,s){var a=0,l=e.length,u=null==r;if("object"===d.type(r))for(a in i=!0,r)D(e,t,a,r[a],!0,o,s);else if(void 0!==n&&(i=!0,d.isFunction(n)||(s=!0),u&&(s?(t.call(e,n),t=null):(u=t,t=function(e,t,r){return u.call(d(e),r)})),t))for(;a<l;a++)t(e[a],r,s?n:n.call(e[a],a,t(e[a],r)));return i?e:u?t.call(e):l?t(e[0],r):o},_=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function M(){this.expando=d.expando+M.uid++}M.uid=1,M.prototype={register:function(e,t){var r=t||{};return e.nodeType?e[this.expando]=r:Object.defineProperty(e,this.expando,{value:r,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!_(e))return{};var t=e[this.expando];return t||(t={},_(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,r){var n,i=this.cache(e);if("string"==typeof t)i[t]=r;else for(n in t)i[n]=t[n];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,r){var n;return void 0===t||t&&"string"==typeof t&&void 0===r?void 0!==(n=this.get(e,t))?n:this.get(e,d.camelCase(t)):(this.set(e,t,r),void 0!==r?r:t)},remove:function(e,t){var r,n,i,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{d.isArray(t)?n=t.concat(t.map(d.camelCase)):(i=d.camelCase(t),n=t in o?[t,i]:(n=i)in o?[n]:n.match(w)||[]),r=n.length;for(;r--;)delete o[n[r]]}(void 0===t||d.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!d.isEmptyObject(t)}};var k=new M,F=new M,G=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function B(e,t,r){var n;if(void 0===r&&1===e.nodeType)if(n="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(r=e.getAttribute(n))){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:G.test(r)?d.parseJSON(r):r)}catch(e){}F.set(e,t,r)}else r=void 0;return r}d.extend({hasData:function(e){return F.hasData(e)||k.hasData(e)},data:function(e,t,r){return F.access(e,t,r)},removeData:function(e,t){F.remove(e,t)},_data:function(e,t,r){return k.access(e,t,r)},_removeData:function(e,t){k.remove(e,t)}}),d.fn.extend({data:function(e,t){var r,n,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=F.get(o),1===o.nodeType&&!k.get(o,"hasDataAttrs"))){for(r=s.length;r--;)s[r]&&0===(n=s[r].name).indexOf("data-")&&(n=d.camelCase(n.slice(5)),B(o,n,i[n]));k.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){F.set(this,e)})):D(this,(function(t){var r,n;if(o&&void 0===t)return void 0!==(r=F.get(o,e)||F.get(o,e.replace(U,"-$&").toLowerCase()))?r:(n=d.camelCase(e),void 0!==(r=F.get(o,n))||void 0!==(r=B(o,n,void 0))?r:void 0);n=d.camelCase(e),this.each((function(){var r=F.get(this,n);F.set(this,n,t),e.indexOf("-")>-1&&void 0!==r&&F.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){F.remove(this,e)}))}}),d.extend({queue:function(e,t,r){var n;if(e)return t=(t||"fx")+"queue",n=k.get(e,t),r&&(!n||d.isArray(r)?n=k.access(e,t,d.makeArray(r)):n.push(r)),n||[]},dequeue:function(e,t){t=t||"fx";var r=d.queue(e,t),n=r.length,i=r.shift(),o=d._queueHooks(e,t);"inprogress"===i&&(i=r.shift(),n--),i&&("fx"===t&&r.unshift("inprogress"),delete o.stop,i.call(e,(function(){d.dequeue(e,t)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return k.get(e,r)||k.access(e,r,{empty:d.Callbacks("once memory").add((function(){k.remove(e,[t+"queue",r])}))})}}),d.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?d.queue(this[0],e):void 0===t?this:this.each((function(){var r=d.queue(this,e,t);d._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&d.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){d.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,n=1,i=d.Deferred(),o=this,s=this.length,a=function(){--n||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=k.get(o[s],e+"queueHooks"))&&r.empty&&(n++,r.empty.add(a));return a(),i.promise(t)}});var V=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,j=new RegExp("^(?:([+-])=|)("+V+")([a-z%]*)$","i"),H=["Top","Right","Bottom","Left"],q=function(e,t){return e=t||e,"none"===d.css(e,"display")||!d.contains(e.ownerDocument,e)};function W(e,t,r,n){var i,o=1,s=20,a=n?function(){return n.cur()}:function(){return d.css(e,t,"")},l=a(),u=r&&r[3]||(d.cssNumber[t]?"":"px"),c=(d.cssNumber[t]||"px"!==u&&+l)&&j.exec(d.css(e,t));if(c&&c[3]!==u){u=u||c[3],r=r||[],c=+l||1;do{c/=o=o||".5",d.style(e,t,c+u)}while(o!==(o=a()/l)&&1!==o&&--s)}return r&&(c=+c||+l||0,i=r[1]?c+(r[1]+1)*r[2]:+r[2],n&&(n.unit=u,n.start=c,n.end=i)),i}var z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,Q=/^$|\/(?:java|ecma)script/i,X={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Y(e,t){var r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&d.nodeName(e,t)?d.merge([e],r):r}function K(e,t){for(var r=0,n=e.length;r<n;r++)k.set(e[r],"globalEval",!t||k.get(t[r],"globalEval"))}X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td;var Z,J,ee=/<|&#?\w+;/;function te(e,t,r,n,i){for(var o,s,a,l,u,c,p=t.createDocumentFragment(),f=[],h=0,g=e.length;h<g;h++)if((o=e[h])||0===o)if("object"===d.type(o))d.merge(f,o.nodeType?[o]:o);else if(ee.test(o)){for(s=s||p.appendChild(t.createElement("div")),a=($.exec(o)||["",""])[1].toLowerCase(),l=X[a]||X._default,s.innerHTML=l[1]+d.htmlPrefilter(o)+l[2],c=l[0];c--;)s=s.lastChild;d.merge(f,s.childNodes),(s=p.firstChild).textContent=""}else f.push(t.createTextNode(o));for(p.textContent="",h=0;o=f[h++];)if(n&&d.inArray(o,n)>-1)i&&i.push(o);else if(u=d.contains(o.ownerDocument,o),s=Y(p.appendChild(o),"script"),u&&K(s),r)for(c=0;o=s[c++];)Q.test(o.type||"")&&r.push(o);return p}Z=n.createDocumentFragment().appendChild(n.createElement("div")),(J=n.createElement("input")).setAttribute("type","radio"),J.setAttribute("checked","checked"),J.setAttribute("name","t"),Z.appendChild(J),p.checkClone=Z.cloneNode(!0).cloneNode(!0).lastChild.checked,Z.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!Z.cloneNode(!0).lastChild.defaultValue;var re=/^key/,ne=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ie=/^([^.]*)(?:\.(.+)|)/;function oe(){return!0}function se(){return!1}function ae(){try{return n.activeElement}catch(e){}}function le(e,t,r,n,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof r&&(n=n||r,r=void 0),t)le(e,a,r,n,t[a],o);return e}if(null==n&&null==i?(i=r,n=r=void 0):null==i&&("string"==typeof r?(i=n,n=void 0):(i=n,n=r,r=void 0)),!1===i)i=se;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return d().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=d.guid++)),e.each((function(){d.event.add(this,t,i,n,r)}))}d.event={global:{},add:function(e,t,r,n,i){var o,s,a,l,u,c,p,f,h,g,E,m=k.get(e);if(m)for(r.handler&&(r=(o=r).handler,i=o.selector),r.guid||(r.guid=d.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==d&&d.event.triggered!==t.type?d.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(w)||[""]).length;u--;)h=E=(a=ie.exec(t[u])||[])[1],g=(a[2]||"").split(".").sort(),h&&(p=d.event.special[h]||{},h=(i?p.delegateType:p.bindType)||h,p=d.event.special[h]||{},c=d.extend({type:h,origType:E,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&d.expr.match.needsContext.test(i),namespace:g.join(".")},o),(f=l[h])||((f=l[h]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(e,n,g,s)||e.addEventListener&&e.addEventListener(h,s)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),d.event.global[h]=!0)},remove:function(e,t,r,n,i){var o,s,a,l,u,c,p,f,h,g,E,m=k.hasData(e)&&k.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(w)||[""]).length;u--;)if(h=E=(a=ie.exec(t[u])||[])[1],g=(a[2]||"").split(".").sort(),h){for(p=d.event.special[h]||{},f=l[h=(n?p.delegateType:p.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!i&&E!==c.origType||r&&r.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&!1!==p.teardown.call(e,g,m.handle)||d.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)d.event.remove(e,h+t[u],r,n,!0);d.isEmptyObject(l)&&k.remove(e,"handle events")}},dispatch:function(e){e=d.event.fix(e);var t,r,n,o,s,a=[],l=i.call(arguments),u=(k.get(this,"events")||{})[e.type]||[],c=d.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=d.event.handlers.call(this,e,u),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(s.namespace)||(e.handleObj=s,e.data=s.data,void 0!==(n=((d.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var r,n,i,o,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(n=[],r=0;r<a;r++)void 0===n[i=(o=t[r]).selector+" "]&&(n[i]=o.needsContext?d(i,this).index(l)>-1:d.find(i,this,null,[l]).length),n[i]&&n.push(o);n.length&&s.push({elem:l,handlers:n})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var r,i,o,s=t.button;return null==e.pageX&&null!=t.clientX&&(i=(r=e.target.ownerDocument||n).documentElement,o=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),e.which||void 0===s||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[d.expando])return e;var t,r,i,o=e.type,s=e,a=this.fixHooks[o];for(a||(this.fixHooks[o]=a=ne.test(o)?this.mouseHooks:re.test(o)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new d.Event(s),t=i.length;t--;)e[r=i[t]]=s[r];return e.target||(e.target=n),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ae()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ae()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&d.nodeName(this,"input"))return this.click(),!1},_default:function(e){return d.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},d.removeEvent=function(e,t,r){e.removeEventListener&&e.removeEventListener(t,r)},d.Event=function(e,t){if(!(this instanceof d.Event))return new d.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?oe:se):this.type=e,t&&d.extend(this,t),this.timeStamp=e&&e.timeStamp||d.now(),this[d.expando]=!0},d.Event.prototype={constructor:d.Event,isDefaultPrevented:se,isPropagationStopped:se,isImmediatePropagationStopped:se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},d.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){d.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,n=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===n||d.contains(n,i))||(e.type=o.origType,r=o.handler.apply(this,arguments),e.type=t),r}}})),d.fn.extend({on:function(e,t,r,n){return le(this,e,t,r,n)},one:function(e,t,r,n){return le(this,e,t,r,n,1)},off:function(e,t,r){var n,i;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,d(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(r=t,t=void 0),!1===r&&(r=se),this.each((function(){d.event.remove(this,e,r,t)}))}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ce=/<script|<style|<link/i,pe=/checked\s*(?:[^=]|=\s*.checked.)/i,de=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function he(e,t){return d.nodeName(e,"table")&&d.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ee(e){var t=de.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function me(e,t){var r,n,i,o,s,a,l,u;if(1===t.nodeType){if(k.hasData(e)&&(o=k.access(e),s=k.set(t,o),u=o.events))for(i in delete s.handle,s.events={},u)for(r=0,n=u[i].length;r<n;r++)d.event.add(t,i,u[i][r]);F.hasData(e)&&(a=F.access(e),l=d.extend({},a),F.set(t,l))}}function ve(e,t,r,n){t=o.apply([],t);var i,s,a,l,u,c,f=0,h=e.length,g=h-1,E=t[0],m=d.isFunction(E);if(m||h>1&&"string"==typeof E&&!p.checkClone&&pe.test(E))return e.each((function(i){var o=e.eq(i);m&&(t[0]=E.call(this,i,o.html())),ve(o,t,r,n)}));if(h&&(s=(i=te(t,e[0].ownerDocument,!1,e,n)).firstChild,1===i.childNodes.length&&(i=s),s||n)){for(l=(a=d.map(Y(i,"script"),ge)).length;f<h;f++)u=i,f!==g&&(u=d.clone(u,!0,!0),l&&d.merge(a,Y(u,"script"))),r.call(e[f],u,f);if(l)for(c=a[a.length-1].ownerDocument,d.map(a,Ee),f=0;f<l;f++)u=a[f],Q.test(u.type||"")&&!k.access(u,"globalEval")&&d.contains(c,u)&&(u.src?d._evalUrl&&d._evalUrl(u.src):d.globalEval(u.textContent.replace(fe,"")))}return e}function xe(e,t,r){for(var n,i=t?d.filter(t,e):e,o=0;null!=(n=i[o]);o++)r||1!==n.nodeType||d.cleanData(Y(n)),n.parentNode&&(r&&d.contains(n.ownerDocument,n)&&K(Y(n,"script")),n.parentNode.removeChild(n));return e}d.extend({htmlPrefilter:function(e){return e.replace(ue,"<$1></$2>")},clone:function(e,t,r){var n,i,o,s,a,l,u,c=e.cloneNode(!0),f=d.contains(e.ownerDocument,e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||d.isXMLDoc(e)))for(s=Y(c),n=0,i=(o=Y(e)).length;n<i;n++)a=o[n],l=s[n],u=void 0,"input"===(u=l.nodeName.toLowerCase())&&z.test(a.type)?l.checked=a.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=a.defaultValue);if(t)if(r)for(o=o||Y(e),s=s||Y(c),n=0,i=o.length;n<i;n++)me(o[n],s[n]);else me(e,c);return(s=Y(c,"script")).length>0&&K(s,!f&&Y(e,"script")),c},cleanData:function(e){for(var t,r,n,i=d.event.special,o=0;void 0!==(r=e[o]);o++)if(_(r)){if(t=r[k.expando]){if(t.events)for(n in t.events)i[n]?d.event.remove(r,n):d.removeEvent(r,n,t.handle);r[k.expando]=void 0}r[F.expando]&&(r[F.expando]=void 0)}}}),d.fn.extend({domManip:ve,detach:function(e){return xe(this,e,!0)},remove:function(e){return xe(this,e)},text:function(e){return D(this,(function(e){return void 0===e?d.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||he(this,e).appendChild(e)}))},prepend:function(){return ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=he(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(d.cleanData(Y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return d.clone(this,e,t)}))},html:function(e){return D(this,(function(e){var t=this[0]||{},r=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ce.test(e)&&!X[($.exec(e)||["",""])[1].toLowerCase()]){e=d.htmlPrefilter(e);try{for(;r<n;r++)1===(t=this[r]||{}).nodeType&&(d.cleanData(Y(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ve(this,arguments,(function(t){var r=this.parentNode;d.inArray(this,e)<0&&(d.cleanData(Y(this)),r&&r.replaceChild(t,this))}),e)}}),d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){d.fn[e]=function(e){for(var r,n=[],i=d(e),o=i.length-1,a=0;a<=o;a++)r=a===o?this:this.clone(!0),d(i[a])[t](r),s.apply(n,r.get());return this.pushStack(n)}}));var ye,Te={HTML:"block",BODY:"block"};function Ne(e,t){var r=d(t.createElement(e)).appendTo(t.body),n=d.css(r[0],"display");return r.detach(),n}function Le(e){var t=n,r=Te[e];return r||("none"!==(r=Ne(e,t))&&r||((t=(ye=(ye||d("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),r=Ne(e,t),ye.detach()),Te[e]=r),r}var Ie=/^margin/,Ce=new RegExp("^("+V+")(?!px)[a-z%]+$","i"),Se=function(t){var r=t.ownerDocument.defaultView;return r&&r.opener||(r=e),r.getComputedStyle(t)},Ae=function(e,t,r,n){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=r.apply(e,n||[]),t)e.style[o]=s[o];return i},Re=n.documentElement;function be(e,t,r){var n,i,o,s,a=e.style;return""!==(s=(r=r||Se(e))?r.getPropertyValue(t)||r[t]:void 0)&&void 0!==s||d.contains(e.ownerDocument,e)||(s=d.style(e,t)),r&&!p.pixelMarginRight()&&Ce.test(s)&&Ie.test(t)&&(n=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=r.width,a.width=n,a.minWidth=i,a.maxWidth=o),void 0!==s?s+"":s}function Oe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var t,r,i,o,s=n.createElement("div"),a=n.createElement("div");function l(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Re.appendChild(s);var n=e.getComputedStyle(a);t="1%"!==n.top,o="2px"===n.marginLeft,r="4px"===n.width,a.style.marginRight="50%",i="4px"===n.marginRight,Re.removeChild(s)}a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),d.extend(p,{pixelPosition:function(){return l(),t},boxSizingReliable:function(){return null==r&&l(),r},pixelMarginRight:function(){return null==r&&l(),i},reliableMarginLeft:function(){return null==r&&l(),o},reliableMarginRight:function(){var t,r=a.appendChild(n.createElement("div"));return r.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",a.style.width="1px",Re.appendChild(s),t=!parseFloat(e.getComputedStyle(r).marginRight),Re.removeChild(s),a.removeChild(r),t}}))}();var we=/^(none|table(?!-c[ea]).+)/,Pe={position:"absolute",visibility:"hidden",display:"block"},De={letterSpacing:"0",fontWeight:"400"},_e=["Webkit","O","Moz","ms"],Me=n.createElement("div").style;function ke(e){if(e in Me)return e;for(var t=e[0].toUpperCase()+e.slice(1),r=_e.length;r--;)if((e=_e[r]+t)in Me)return e}function Fe(e,t,r){var n=j.exec(t);return n?Math.max(0,n[2]-(r||0))+(n[3]||"px"):t}function Ge(e,t,r,n,i){for(var o=r===(n?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===r&&(s+=d.css(e,r+H[o],!0,i)),n?("content"===r&&(s-=d.css(e,"padding"+H[o],!0,i)),"margin"!==r&&(s-=d.css(e,"border"+H[o]+"Width",!0,i))):(s+=d.css(e,"padding"+H[o],!0,i),"padding"!==r&&(s+=d.css(e,"border"+H[o]+"Width",!0,i)));return s}function Ue(e,t,r){var n=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Se(e),s="border-box"===d.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=be(e,t,o))<0||null==i)&&(i=e.style[t]),Ce.test(i))return i;n=s&&(p.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Ge(e,t,r||(s?"border":"content"),n,o)+"px"}function Be(e,t){for(var r,n,i,o=[],s=0,a=e.length;s<a;s++)(n=e[s]).style&&(o[s]=k.get(n,"olddisplay"),r=n.style.display,t?(o[s]||"none"!==r||(n.style.display=""),""===n.style.display&&q(n)&&(o[s]=k.access(n,"olddisplay",Le(n.nodeName)))):(i=q(n),"none"===r&&i||k.set(n,"olddisplay",i?r:d.css(n,"display"))));for(s=0;s<a;s++)(n=e[s]).style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[s]||"":"none"));return e}function Ve(e,t,r,n,i){return new Ve.prototype.init(e,t,r,n,i)}d.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=be(e,"opacity");return""===r?"1":r}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,r,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=d.camelCase(t),l=e.style;if(t=d.cssProps[a]||(d.cssProps[a]=ke(a)||a),s=d.cssHooks[t]||d.cssHooks[a],void 0===r)return s&&"get"in s&&void 0!==(i=s.get(e,!1,n))?i:l[t];"string"==(o=typeof r)&&(i=j.exec(r))&&i[1]&&(r=W(e,t,i),o="number"),null!=r&&r==r&&("number"===o&&(r+=i&&i[3]||(d.cssNumber[a]?"":"px")),p.clearCloneStyle||""!==r||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(r=s.set(e,r,n))||(l[t]=r))}},css:function(e,t,r,n){var i,o,s,a=d.camelCase(t);return t=d.cssProps[a]||(d.cssProps[a]=ke(a)||a),(s=d.cssHooks[t]||d.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,r)),void 0===i&&(i=be(e,t,n)),"normal"===i&&t in De&&(i=De[t]),""===r||r?(o=parseFloat(i),!0===r||isFinite(o)?o||0:i):i}}),d.each(["height","width"],(function(e,t){d.cssHooks[t]={get:function(e,r,n){if(r)return we.test(d.css(e,"display"))&&0===e.offsetWidth?Ae(e,Pe,(function(){return Ue(e,t,n)})):Ue(e,t,n)},set:function(e,r,n){var i,o=n&&Se(e),s=n&&Ge(e,t,n,"border-box"===d.css(e,"boxSizing",!1,o),o);return s&&(i=j.exec(r))&&"px"!==(i[3]||"px")&&(e.style[t]=r,r=d.css(e,t)),Fe(0,r,s)}}})),d.cssHooks.marginLeft=Oe(p.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(be(e,"marginLeft"))||e.getBoundingClientRect().left-Ae(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),d.cssHooks.marginRight=Oe(p.reliableMarginRight,(function(e,t){if(t)return Ae(e,{display:"inline-block"},be,[e,"marginRight"])})),d.each({margin:"",padding:"",border:"Width"},(function(e,t){d.cssHooks[e+t]={expand:function(r){for(var n=0,i={},o="string"==typeof r?r.split(" "):[r];n<4;n++)i[e+H[n]+t]=o[n]||o[n-2]||o[0];return i}},Ie.test(e)||(d.cssHooks[e+t].set=Fe)})),d.fn.extend({css:function(e,t){return D(this,(function(e,t,r){var n,i,o={},s=0;if(d.isArray(t)){for(n=Se(e),i=t.length;s<i;s++)o[t[s]]=d.css(e,t[s],!1,n);return o}return void 0!==r?d.style(e,t,r):d.css(e,t)}),e,t,arguments.length>1)},show:function(){return Be(this,!0)},hide:function(){return Be(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){q(this)?d(this).show():d(this).hide()}))}}),d.Tween=Ve,Ve.prototype={constructor:Ve,init:function(e,t,r,n,i,o){this.elem=e,this.prop=r,this.easing=i||d.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(d.cssNumber[r]?"":"px")},cur:function(){var e=Ve.propHooks[this.prop];return e&&e.get?e.get(this):Ve.propHooks._default.get(this)},run:function(e){var t,r=Ve.propHooks[this.prop];return this.options.duration?this.pos=t=d.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):Ve.propHooks._default.set(this),this}},Ve.prototype.init.prototype=Ve.prototype,Ve.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=d.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){d.fx.step[e.prop]?d.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[d.cssProps[e.prop]]&&!d.cssHooks[e.prop]?e.elem[e.prop]=e.now:d.style(e.elem,e.prop,e.now+e.unit)}}},Ve.propHooks.scrollTop=Ve.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},d.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},d.fx=Ve.prototype.init,d.fx.step={};var je,He,qe=/^(?:toggle|show|hide)$/,We=/queueHooks$/;function ze(){return e.setTimeout((function(){je=void 0})),je=d.now()}function $e(e,t){var r,n=0,i={height:e};for(t=t?1:0;n<4;n+=2-t)i["margin"+(r=H[n])]=i["padding"+r]=e;return t&&(i.opacity=i.width=e),i}function Qe(e,t,r){for(var n,i=(Xe.tweeners[t]||[]).concat(Xe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(n=i[o].call(r,t,e))return n}function Xe(e,t,r){var n,i,o=0,s=Xe.prefilters.length,a=d.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=je||ze(),r=Math.max(0,u.startTime+u.duration-t),n=1-(r/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(n);return a.notifyWith(e,[u,n,r]),n<1&&s?r:(a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:d.extend({},t),opts:d.extend(!0,{specialEasing:{},easing:d.easing._default},r),originalProperties:t,originalOptions:r,startTime:je||ze(),duration:r.duration,tweens:[],createTween:function(t,r){var n=d.Tween(e,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var r=0,n=t?u.tweens.length:0;if(i)return this;for(i=!0;r<n;r++)u.tweens[r].run(1);return t?(a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u,t])):a.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var r,n,i,o,s;for(r in e)if(i=t[n=d.camelCase(r)],o=e[r],d.isArray(o)&&(i=o[1],o=e[r]=o[0]),r!==n&&(e[n]=o,delete e[r]),(s=d.cssHooks[n])&&"expand"in s)for(r in o=s.expand(o),delete e[n],o)r in e||(e[r]=o[r],t[r]=i);else t[n]=i}(c,u.opts.specialEasing);o<s;o++)if(n=Xe.prefilters[o].call(u,e,c,u.opts))return d.isFunction(n.stop)&&(d._queueHooks(u.elem,u.opts.queue).stop=d.proxy(n.stop,n)),n;return d.map(c,Qe,u),d.isFunction(u.opts.start)&&u.opts.start.call(e,u),d.fx.timer(d.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}d.Animation=d.extend(Xe,{tweeners:{"*":[function(e,t){var r=this.createTween(e,t);return W(r.elem,e,j.exec(t),r),r}]},tweener:function(e,t){d.isFunction(e)?(t=e,e=["*"]):e=e.match(w);for(var r,n=0,i=e.length;n<i;n++)r=e[n],Xe.tweeners[r]=Xe.tweeners[r]||[],Xe.tweeners[r].unshift(t)},prefilters:[function(e,t,r){var n,i,o,s,a,l,u,c=this,p={},f=e.style,h=e.nodeType&&q(e),g=k.get(e,"fxshow");for(n in r.queue||(null==(a=d._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always((function(){c.always((function(){a.unqueued--,d.queue(e,"fx").length||a.empty.fire()}))}))),1===e.nodeType&&("height"in t||"width"in t)&&(r.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===("none"===(u=d.css(e,"display"))?k.get(e,"olddisplay")||Le(e.nodeName):u)&&"none"===d.css(e,"float")&&(f.display="inline-block")),r.overflow&&(f.overflow="hidden",c.always((function(){f.overflow=r.overflow[0],f.overflowX=r.overflow[1],f.overflowY=r.overflow[2]}))),t)if(i=t[n],qe.exec(i)){if(delete t[n],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[n])continue;h=!0}p[n]=g&&g[n]||d.style(e,n)}else u=void 0;if(d.isEmptyObject(p))"inline"===("none"===u?Le(e.nodeName):u)&&(f.display=u);else for(n in g?"hidden"in g&&(h=g.hidden):g=k.access(e,"fxshow",{}),o&&(g.hidden=!h),h?d(e).show():c.done((function(){d(e).hide()})),c.done((function(){var t;for(t in k.remove(e,"fxshow"),p)d.style(e,t,p[t])})),p)s=Qe(h?g[n]:0,n,c),n in g||(g[n]=s.start,h&&(s.end=s.start,s.start="width"===n||"height"===n?1:0))}],prefilter:function(e,t){t?Xe.prefilters.unshift(e):Xe.prefilters.push(e)}}),d.speed=function(e,t,r){var n=e&&"object"==typeof e?d.extend({},e):{complete:r||!r&&t||d.isFunction(e)&&e,duration:e,easing:r&&t||t&&!d.isFunction(t)&&t};return n.duration=d.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in d.fx.speeds?d.fx.speeds[n.duration]:d.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){d.isFunction(n.old)&&n.old.call(this),n.queue&&d.dequeue(this,n.queue)},n},d.fn.extend({fadeTo:function(e,t,r,n){return this.filter(q).css("opacity",0).show().end().animate({opacity:t},e,r,n)},animate:function(e,t,r,n){var i=d.isEmptyObject(e),o=d.speed(t,r,n),s=function(){var t=Xe(this,d.extend({},e),o);(i||k.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,r){var n=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=d.timers,s=k.get(this);if(i)s[i]&&s[i].stop&&n(s[i]);else for(i in s)s[i]&&s[i].stop&&We.test(i)&&n(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(r),t=!1,o.splice(i,1));!t&&r||d.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,r=k.get(this),n=r[e+"queue"],i=r[e+"queueHooks"],o=d.timers,s=n?n.length:0;for(r.finish=!0,d.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete r.finish}))}}),d.each(["toggle","show","hide"],(function(e,t){var r=d.fn[t];d.fn[t]=function(e,n,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate($e(t,!0),e,n,i)}})),d.each({slideDown:$e("show"),slideUp:$e("hide"),slideToggle:$e("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){d.fn[e]=function(e,r,n){return this.animate(t,e,r,n)}})),d.timers=[],d.fx.tick=function(){var e,t=0,r=d.timers;for(je=d.now();t<r.length;t++)(e=r[t])()||r[t]!==e||r.splice(t--,1);r.length||d.fx.stop(),je=void 0},d.fx.timer=function(e){d.timers.push(e),e()?d.fx.start():d.timers.pop()},d.fx.interval=13,d.fx.start=function(){He||(He=e.setInterval(d.fx.tick,d.fx.interval))},d.fx.stop=function(){e.clearInterval(He),He=null},d.fx.speeds={slow:600,fast:200,_default:400},d.fn.delay=function(t,r){return t=d.fx&&d.fx.speeds[t]||t,r=r||"fx",this.queue(r,(function(r,n){var i=e.setTimeout(r,t);n.stop=function(){e.clearTimeout(i)}}))},function(){var e=n.createElement("input"),t=n.createElement("select"),r=t.appendChild(n.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=r.selected,t.disabled=!0,p.optDisabled=!r.disabled,(e=n.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var Ye,Ke=d.expr.attrHandle;d.fn.extend({attr:function(e,t){return D(this,d.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){d.removeAttr(this,e)}))}}),d.extend({attr:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?d.prop(e,t,r):(1===o&&d.isXMLDoc(e)||(t=t.toLowerCase(),i=d.attrHooks[t]||(d.expr.match.bool.test(t)?Ye:void 0)),void 0!==r?null===r?void d.removeAttr(e,t):i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:(e.setAttribute(t,r+""),r):i&&"get"in i&&null!==(n=i.get(e,t))?n:null==(n=d.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&d.nodeName(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}},removeAttr:function(e,t){var r,n,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)for(;r=o[i++];)n=d.propFix[r]||r,d.expr.match.bool.test(r)&&(e[n]=!1),e.removeAttribute(r)}}),Ye={set:function(e,t,r){return!1===t?d.removeAttr(e,r):e.setAttribute(r,r),r}},d.each(d.expr.match.bool.source.match(/\w+/g),(function(e,t){var r=Ke[t]||d.find.attr;Ke[t]=function(e,t,n){var i,o;return n||(o=Ke[t],Ke[t]=i,i=null!=r(e,t,n)?t.toLowerCase():null,Ke[t]=o),i}}));var Ze=/^(?:input|select|textarea|button)$/i,Je=/^(?:a|area)$/i;d.fn.extend({prop:function(e,t){return D(this,d.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[d.propFix[e]||e]}))}}),d.extend({prop:function(e,t,r){var n,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&d.isXMLDoc(e)||(t=d.propFix[t]||t,i=d.propHooks[t]),void 0!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:e[t]=r:i&&"get"in i&&null!==(n=i.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=d.find.attr(e,"tabindex");return t?parseInt(t,10):Ze.test(e.nodeName)||Je.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(d.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),d.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){d.propFix[this.toLowerCase()]=this}));var et=/[\t\r\n\f]/g;function tt(e){return e.getAttribute&&e.getAttribute("class")||""}d.fn.extend({addClass:function(e){var t,r,n,i,o,s,a,l=0;if(d.isFunction(e))return this.each((function(t){d(this).addClass(e.call(this,t,tt(this)))}));if("string"==typeof e&&e)for(t=e.match(w)||[];r=this[l++];)if(i=tt(r),n=1===r.nodeType&&(" "+i+" ").replace(et," ")){for(s=0;o=t[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");i!==(a=d.trim(n))&&r.setAttribute("class",a)}return this},removeClass:function(e){var t,r,n,i,o,s,a,l=0;if(d.isFunction(e))return this.each((function(t){d(this).removeClass(e.call(this,t,tt(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(w)||[];r=this[l++];)if(i=tt(r),n=1===r.nodeType&&(" "+i+" ").replace(et," ")){for(s=0;o=t[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");i!==(a=d.trim(n))&&r.setAttribute("class",a)}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):d.isFunction(e)?this.each((function(r){d(this).toggleClass(e.call(this,r,tt(this),t),t)})):this.each((function(){var t,n,i,o;if("string"===r)for(n=0,i=d(this),o=e.match(w)||[];t=o[n++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==r||((t=tt(this))&&k.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":k.get(this,"__className__")||""))}))},hasClass:function(e){var t,r,n=0;for(t=" "+e+" ";r=this[n++];)if(1===r.nodeType&&(" "+tt(r)+" ").replace(et," ").indexOf(t)>-1)return!0;return!1}});var rt=/\r/g,nt=/[\x20\t\r\n\f]+/g;d.fn.extend({val:function(e){var t,r,n,i=this[0];return arguments.length?(n=d.isFunction(e),this.each((function(r){var i;1===this.nodeType&&(null==(i=n?e.call(this,r,d(this).val()):e)?i="":"number"==typeof i?i+="":d.isArray(i)&&(i=d.map(i,(function(e){return null==e?"":e+""}))),(t=d.valHooks[this.type]||d.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=d.valHooks[i.type]||d.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(i,"value"))?r:"string"==typeof(r=i.value)?r.replace(rt,""):null==r?"":r:void 0}}),d.extend({valHooks:{option:{get:function(e){var t=d.find.attr(e,"value");return null!=t?t:d.trim(d.text(e)).replace(nt," ")}},select:{get:function(e){for(var t,r,n=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:n.length,l=i<0?a:o?i:0;l<a;l++)if(((r=n[l]).selected||l===i)&&(p.optDisabled?!r.disabled:null===r.getAttribute("disabled"))&&(!r.parentNode.disabled||!d.nodeName(r.parentNode,"optgroup"))){if(t=d(r).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var r,n,i=e.options,o=d.makeArray(t),s=i.length;s--;)((n=i[s]).selected=d.inArray(d.valHooks.option.get(n),o)>-1)&&(r=!0);return r||(e.selectedIndex=-1),o}}}}),d.each(["radio","checkbox"],(function(){d.valHooks[this]={set:function(e,t){if(d.isArray(t))return e.checked=d.inArray(d(e).val(),t)>-1}},p.checkOn||(d.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var it=/^(?:focusinfocus|focusoutblur)$/;d.extend(d.event,{trigger:function(t,r,i,o){var s,a,l,u,p,f,h,g=[i||n],E=c.call(t,"type")?t.type:t,m=c.call(t,"namespace")?t.namespace.split("."):[];if(a=l=i=i||n,3!==i.nodeType&&8!==i.nodeType&&!it.test(E+d.event.triggered)&&(E.indexOf(".")>-1&&(m=E.split("."),E=m.shift(),m.sort()),p=E.indexOf(":")<0&&"on"+E,(t=t[d.expando]?t:new d.Event(E,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),r=null==r?[t]:d.makeArray(r,[t]),h=d.event.special[E]||{},o||!h.trigger||!1!==h.trigger.apply(i,r))){if(!o&&!h.noBubble&&!d.isWindow(i)){for(u=h.delegateType||E,it.test(u+E)||(a=a.parentNode);a;a=a.parentNode)g.push(a),l=a;l===(i.ownerDocument||n)&&g.push(l.defaultView||l.parentWindow||e)}for(s=0;(a=g[s++])&&!t.isPropagationStopped();)t.type=s>1?u:h.bindType||E,(f=(k.get(a,"events")||{})[t.type]&&k.get(a,"handle"))&&f.apply(a,r),(f=p&&a[p])&&f.apply&&_(a)&&(t.result=f.apply(a,r),!1===t.result&&t.preventDefault());return t.type=E,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),r)||!_(i)||p&&d.isFunction(i[E])&&!d.isWindow(i)&&((l=i[p])&&(i[p]=null),d.event.triggered=E,i[E](),d.event.triggered=void 0,l&&(i[p]=l)),t.result}},simulate:function(e,t,r){var n=d.extend(new d.Event,r,{type:e,isSimulated:!0});d.event.trigger(n,null,t)}}),d.fn.extend({trigger:function(e,t){return this.each((function(){d.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var r=this[0];if(r)return d.event.trigger(e,t,r,!0)}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(e,t){d.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}})),d.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),p.focusin="onfocusin"in e,p.focusin||d.each({focus:"focusin",blur:"focusout"},(function(e,t){var r=function(e){d.event.simulate(t,e.target,d.event.fix(e))};d.event.special[t]={setup:function(){var n=this.ownerDocument||this,i=k.access(n,t);i||n.addEventListener(e,r,!0),k.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=k.access(n,t)-1;i?k.access(n,t,i):(n.removeEventListener(e,r,!0),k.remove(n,t))}}}));var ot=e.location,st=d.now(),at=/\?/;d.parseJSON=function(e){return JSON.parse(e+"")},d.parseXML=function(t){var r;if(!t||"string"!=typeof t)return null;try{r=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){r=void 0}return r&&!r.getElementsByTagName("parsererror").length||d.error("Invalid XML: "+t),r};var lt=/#.*$/,ut=/([?&])_=[^&]*/,ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,pt=/^(?:GET|HEAD)$/,dt=/^\/\//,ft={},ht={},gt="*/".concat("*"),Et=n.createElement("a");function mt(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var n,i=0,o=t.toLowerCase().match(w)||[];if(d.isFunction(r))for(;n=o[i++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(r)):(e[n]=e[n]||[]).push(r)}}function vt(e,t,r,n){var i={},o=e===ht;function s(a){var l;return i[a]=!0,d.each(e[a]||[],(function(e,a){var u=a(t,r,n);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function xt(e,t){var r,n,i=d.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&d.extend(!0,e,n),e}Et.href=ot.href,d.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ot.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?xt(xt(e,d.ajaxSettings),t):xt(d.ajaxSettings,e)},ajaxPrefilter:mt(ft),ajaxTransport:mt(ht),ajax:function(t,r){"object"==typeof t&&(r=t,t=void 0),r=r||{};var i,o,s,a,l,u,c,p,f=d.ajaxSetup({},r),h=f.context||f,g=f.context&&(h.nodeType||h.jquery)?d(h):d.event,E=d.Deferred(),m=d.Callbacks("once memory"),v=f.statusCode||{},x={},y={},T=0,N="canceled",L={readyState:0,getResponseHeader:function(e){var t;if(2===T){if(!a)for(a={};t=ct.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===T?s:null},setRequestHeader:function(e,t){var r=e.toLowerCase();return T||(e=y[r]=y[r]||e,x[e]=t),this},overrideMimeType:function(e){return T||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(T<2)for(t in e)v[t]=[v[t],e[t]];else L.always(e[L.status]);return this},abort:function(e){var t=e||N;return i&&i.abort(t),I(0,t),this}};if(E.promise(L).complete=m.add,L.success=L.done,L.error=L.fail,f.url=((t||f.url||ot.href)+"").replace(lt,"").replace(dt,ot.protocol+"//"),f.type=r.method||r.type||f.method||f.type,f.dataTypes=d.trim(f.dataType||"*").toLowerCase().match(w)||[""],null==f.crossDomain){u=n.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Et.protocol+"//"+Et.host!=u.protocol+"//"+u.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=d.param(f.data,f.traditional)),vt(ft,f,r,L),2===T)return L;for(p in(c=d.event&&f.global)&&0==d.active++&&d.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!pt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(at.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=ut.test(o)?o.replace(ut,"$1_="+st++):o+(at.test(o)?"&":"?")+"_="+st++)),f.ifModified&&(d.lastModified[o]&&L.setRequestHeader("If-Modified-Since",d.lastModified[o]),d.etag[o]&&L.setRequestHeader("If-None-Match",d.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||r.contentType)&&L.setRequestHeader("Content-Type",f.contentType),L.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+gt+"; q=0.01":""):f.accepts["*"]),f.headers)L.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(h,L,f)||2===T))return L.abort();for(p in N="abort",{success:1,error:1,complete:1})L[p](f[p]);if(i=vt(ht,f,r,L)){if(L.readyState=1,c&&g.trigger("ajaxSend",[L,f]),2===T)return L;f.async&&f.timeout>0&&(l=e.setTimeout((function(){L.abort("timeout")}),f.timeout));try{T=1,i.send(x,I)}catch(e){if(!(T<2))throw e;I(-1,e)}}else I(-1,"No Transport");function I(t,r,n,a){var u,p,x,y,N,I=r;2!==T&&(T=2,l&&e.clearTimeout(l),i=void 0,s=a||"",L.readyState=t>0?4:0,u=t>=200&&t<300||304===t,n&&(y=function(e,t,r){for(var n,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(i in a)if(a[i]&&a[i].test(n)){l.unshift(i);break}if(l[0]in r)o=l[0];else{for(i in r){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),r[o]}(f,L,n)),y=function(e,t,r,n){var i,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(r[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(i in u)if((a=i.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[i]:!0!==u[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,y,L,u),u?(f.ifModified&&((N=L.getResponseHeader("Last-Modified"))&&(d.lastModified[o]=N),(N=L.getResponseHeader("etag"))&&(d.etag[o]=N)),204===t||"HEAD"===f.type?I="nocontent":304===t?I="notmodified":(I=y.state,p=y.data,u=!(x=y.error))):(x=I,!t&&I||(I="error",t<0&&(t=0))),L.status=t,L.statusText=(r||I)+"",u?E.resolveWith(h,[p,I,L]):E.rejectWith(h,[L,I,x]),L.statusCode(v),v=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[L,f,u?p:x]),m.fireWith(h,[L,I]),c&&(g.trigger("ajaxComplete",[L,f]),--d.active||d.event.trigger("ajaxStop")))}return L},getJSON:function(e,t,r){return d.get(e,t,r,"json")},getScript:function(e,t){return d.get(e,void 0,t,"script")}}),d.each(["get","post"],(function(e,t){d[t]=function(e,r,n,i){return d.isFunction(r)&&(i=i||n,n=r,r=void 0),d.ajax(d.extend({url:e,type:t,dataType:i,data:r,success:n},d.isPlainObject(e)&&e))}})),d._evalUrl=function(e){return d.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},d.fn.extend({wrapAll:function(e){var t;return d.isFunction(e)?this.each((function(t){d(this).wrapAll(e.call(this,t))})):(this[0]&&(t=d(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this)},wrapInner:function(e){return d.isFunction(e)?this.each((function(t){d(this).wrapInner(e.call(this,t))})):this.each((function(){var t=d(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)}))},wrap:function(e){var t=d.isFunction(e);return this.each((function(r){d(this).wrapAll(t?e.call(this,r):e)}))},unwrap:function(){return this.parent().each((function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)})).end()}}),d.expr.filters.hidden=function(e){return!d.expr.filters.visible(e)},d.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var yt=/%20/g,Tt=/\[\]$/,Nt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Ct(e,t,r,n){var i;if(d.isArray(t))d.each(t,(function(t,i){r||Tt.test(e)?n(e,i):Ct(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,n)}));else if(r||"object"!==d.type(t))n(e,t);else for(i in t)Ct(e+"["+i+"]",t[i],r,n)}d.param=function(e,t){var r,n=[],i=function(e,t){t=d.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=d.ajaxSettings&&d.ajaxSettings.traditional),d.isArray(e)||e.jquery&&!d.isPlainObject(e))d.each(e,(function(){i(this.name,this.value)}));else for(r in e)Ct(r,e[r],t,i);return n.join("&").replace(yt,"+")},d.fn.extend({serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=d.prop(this,"elements");return e?d.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!d(this).is(":disabled")&&It.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!z.test(e))})).map((function(e,t){var r=d(this).val();return null==r?null:d.isArray(r)?d.map(r,(function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}})):{name:t.name,value:r.replace(Nt,"\r\n")}})).get()}}),d.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var St={0:200,1223:204},At=d.ajaxSettings.xhr();p.cors=!!At&&"withCredentials"in At,p.ajax=At=!!At,d.ajaxTransport((function(t){var r,n;if(p.cors||At&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);r=function(e){return function(){r&&(r=n=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(St[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=r(),n=a.onerror=r("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){r&&n()}))},r=r("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(r)throw e}},abort:function(){r&&r()}}})),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return d.globalEval(e),e}}}),d.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),d.ajaxTransport("script",(function(e){var t,r;if(e.crossDomain)return{send:function(i,o){t=d("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",r=function(e){t.remove(),r=null,e&&o("error"===e.type?404:200,e.type)}),n.head.appendChild(t[0])},abort:function(){r&&r()}}}));var Rt=[],bt=/(=)\?(?=&|$)|\?\?/;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Rt.pop()||d.expando+"_"+st++;return this[e]=!0,e}}),d.ajaxPrefilter("json jsonp",(function(t,r,n){var i,o,s,a=!1!==t.jsonp&&(bt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&bt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=d.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(bt,"$1"+i):!1!==t.jsonp&&(t.url+=(at.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||d.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},n.always((function(){void 0===o?d(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=r.jsonpCallback,Rt.push(i)),s&&d.isFunction(o)&&o(s[0]),s=o=void 0})),"script"})),d.parseHTML=function(e,t,r){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(r=t,t=!1),t=t||n;var i=N.exec(e),o=!r&&[];return i?[t.createElement(i[1])]:(i=te([e],t,o),o&&o.length&&d(o).remove(),d.merge([],i.childNodes))};var Ot=d.fn.load;function wt(e){return d.isWindow(e)?e:9===e.nodeType&&e.defaultView}d.fn.load=function(e,t,r){if("string"!=typeof e&&Ot)return Ot.apply(this,arguments);var n,i,o,s=this,a=e.indexOf(" ");return a>-1&&(n=d.trim(e.slice(a)),e=e.slice(0,a)),d.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&d.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(n?d("<div>").append(d.parseHTML(e)).find(n):e)})).always(r&&function(e,t){s.each((function(){r.apply(this,o||[e.responseText,t,e])}))}),this},d.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){d.fn[t]=function(e){return this.on(t,e)}})),d.expr.filters.animated=function(e){return d.grep(d.timers,(function(t){return e===t.elem})).length},d.offset={setOffset:function(e,t,r){var n,i,o,s,a,l,u=d.css(e,"position"),c=d(e),p={};"static"===u&&(e.style.position="relative"),a=c.offset(),o=d.css(e,"top"),l=d.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(s=(n=c.position()).top,i=n.left):(s=parseFloat(o)||0,i=parseFloat(l)||0),d.isFunction(t)&&(t=t.call(e,r,d.extend({},a))),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):c.css(p)}},d.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){d.offset.setOffset(this,e,t)}));var t,r,n=this[0],i={top:0,left:0},o=n&&n.ownerDocument;return o?(t=o.documentElement,d.contains(t,n)?(i=n.getBoundingClientRect(),r=wt(o),{top:i.top+r.pageYOffset-t.clientTop,left:i.left+r.pageXOffset-t.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,r=this[0],n={top:0,left:0};return"fixed"===d.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),d.nodeName(e[0],"html")||(n=e.offset()),n.top+=d.css(e[0],"borderTopWidth",!0),n.left+=d.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-d.css(r,"marginTop",!0),left:t.left-n.left-d.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===d.css(e,"position");)e=e.offsetParent;return e||Re}))}}),d.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var r="pageYOffset"===t;d.fn[e]=function(n){return D(this,(function(e,n,i){var o=wt(e);if(void 0===i)return o?o[t]:e[n];o?o.scrollTo(r?o.pageXOffset:i,r?i:o.pageYOffset):e[n]=i}),e,n,arguments.length)}})),d.each(["top","left"],(function(e,t){d.cssHooks[t]=Oe(p.pixelPosition,(function(e,r){if(r)return r=be(e,t),Ce.test(r)?d(e).position()[t]+"px":r}))})),d.each({Height:"height",Width:"width"},(function(e,t){d.each({padding:"inner"+e,content:t,"":"outer"+e},(function(r,n){d.fn[n]=function(n,i){var o=arguments.length&&(r||"boolean"!=typeof n),s=r||(!0===n||!0===i?"margin":"border");return D(this,(function(t,r,n){var i;return d.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===n?d.css(t,r,s):d.style(t,r,n,s)}),t,o?n:void 0,o,null)}}))})),d.fn.extend({bind:function(e,t,r){return this.on(e,null,t,r)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,r,n){return this.on(t,e,r,n)},undelegate:function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},size:function(){return this.length}}),d.fn.andSelf=d.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return d}));var Pt=e.jQuery,Dt=e.$;return d.noConflict=function(t){return e.$===d&&(e.$=Dt),t&&e.jQuery===d&&(e.jQuery=Pt),d},t||(e.jQuery=e.$=d),d}))},{}],17:[function(e,t,r){var n=e("../src/store-engine"),i=e("../storages/all"),o=[e("../plugins/json2")];t.exports=n.createStore(i,o)},{"../plugins/json2":18,"../src/store-engine":20,"../storages/all":22}],18:[function(e,t,r){t.exports=function(){return e("./lib/json2"),{}}},{"./lib/json2":19}],19:[function(require,module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var r,n,i,o,s,a=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,r=0;r<o;r+=1)s[r]=str(r,l)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(o=rep.length,r=0;r<o;r+=1)"string"==typeof rep[r]&&(i=str(n=rep[r],l))&&s.push(quote(n)+(gap?": ":":")+i);else for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(i=str(n,l))&&s.push(quote(n)+(gap?": ":":")+i);return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var r,n,i=e[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(void 0!==(n=walk(i,r))?i[r]=n:delete i[r]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],20:[function(e,t,r){var n=e("./util"),i=n.slice,o=n.pluck,s=n.each,a=n.bind,l=n.create,u=n.isList,c=n.isFunction,p=n.isObject;t.exports={createStore:f};var d={version:"2.0.12",enabled:!1,get:function(e,t){var r=this.storage.read(this._namespacePrefix+e);return this._deserialize(r,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(r,n){e.call(t,t._deserialize(r),(n||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return f(this.storage,this.plugins,e)}};function f(e,t,r){r||(r=""),e&&!u(e)&&(e=[e]),t&&!u(t)&&(t=[t]);var n=r?"__storejs_"+r+"_":"",f=r?new RegExp("^"+n):null;if(!/^[a-zA-Z0-9_\-]*$/.test(r))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h=l({_namespacePrefix:n,_namespaceRegexp:f,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var r=e.read(t)===t;return e.remove(t),r}catch(e){return!1}},_assignPluginFnProp:function(e,t){var r=this[t];this[t]=function(){var t=i(arguments,0),n=this;function o(){if(r)return s(arguments,(function(e,r){t[r]=e})),r.apply(n,t)}var a=[o].concat(t);return e.apply(n,a)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var r="";try{r=JSON.parse(e)}catch(t){r=e}return void 0!==r?r:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(u(e))s(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!c(e))throw new Error("Plugins must be function values that return objects");var r=e.call(this);if(!p(r))throw new Error("Plugins must return an object of function properties");s(r,(function(r,n){if(!c(r))throw new Error("Bad plugin property: "+n+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(r,n)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},d,{plugins:[]});return h.raw={},s(h,(function(e,t){c(e)&&(h.raw[t]=a(h,e))})),s(e,(function(e){h._addStorage(e)})),s(t,(function(e){h._addPlugin(e)})),h}},{"./util":21}],21:[function(e,t,r){(function(e){(function(){var r=Object.assign?Object.assign:function(e,t,r,n){for(var i=1;i<arguments.length;i++)a(Object(arguments[i]),(function(t,r){e[r]=t}));return e},n=function(){if(Object.create)return function(e,t,n,i){var o=s(arguments,1);return r.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,n,i,o){var a=s(arguments,1);return e.prototype=t,r.apply(this,[new e].concat(a))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function s(e,t){return Array.prototype.slice.call(e,t||0)}function a(e,t){l(e,(function(e,r){return t(e,r),!1}))}function l(e,t){if(u(e)){for(var r=0;r<e.length;r++)if(t(e[r],r))return e[r]}else for(var n in e)if(e.hasOwnProperty(n)&&t(e[n],n))return e[n]}function u(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}t.exports={assign:r,create:n,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:s,each:a,map:function(e,t){var r=u(e)?[]:{};return l(e,(function(e,n){return r[n]=t(e,n),!1})),r},pluck:l,isList:u,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:o}}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(e,t,r){t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":23,"./localStorage":24,"./memoryStorage":25,"./oldFF-globalStorage":26,"./oldIE-userDataStorage":27,"./sessionStorage":28}],23:[function(e,t,r){var n=e("../src/util"),i=n.Global,o=n.trim;t.exports={name:"cookieStorage",read:function(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(s.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(s.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:a,remove:l,clearAll:function(){a((function(e,t){l(t)}))}};var s=i.document;function a(e){for(var t=s.cookie.split(/; ?/g),r=t.length-1;r>=0;r--)if(o(t[r])){var n=t[r].split("="),i=unescape(n[0]);e(unescape(n[1]),i)}}function l(e){e&&u(e)&&(s.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(s.cookie)}},{"../src/util":21}],24:[function(e,t,r){var n=e("../src/util").Global;function i(){return n.localStorage}function o(e){return i().getItem(e)}t.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],25:[function(e,t,r){t.exports={name:"memoryStorage",read:function(e){return n[e]},write:function(e,t){n[e]=t},each:function(e){for(var t in n)n.hasOwnProperty(t)&&e(n[t],t)},remove:function(e){delete n[e]},clearAll:function(e){n={}}};var n={}},{}],26:[function(e,t,r){var n=e("../src/util").Global;t.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=n.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var r=i.key(t);e(i[r],r)}}},{"../src/util":21}],27:[function(e,t,r){var n=e("../src/util").Global;t.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!s){var r=l(e);o((function(e){e.setAttribute(r,t),e.save("storejs")}))}},read:function(e){if(!s){var t=l(e),r=null;return o((function(e){r=e.getAttribute(t)})),r}},each:function(e){o((function(t){for(var r=t.XMLDocument.documentElement.attributes,n=r.length-1;n>=0;n--){var i=r[n];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);o((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var r=t.length-1;r>=0;r--)e.removeAttribute(t[r].name);e.save("storejs")}))}};var i=n.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,r;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,r=e.createElement("div")}catch(t){r=i.createElement("div"),e=i.body}return function(t){var n=[].slice.call(arguments,0);n.unshift(r),e.appendChild(r),r.addBehavior("#default#userData"),r.load("storejs"),t.apply(this,n),e.removeChild(r)}}(),s=(n.navigator?n.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),a=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(a,"___")}},{"../src/util":21}],28:[function(e,t,r){var n=e("../src/util").Global;function i(){return n.sessionStorage}function o(e){return i().getItem(e)}t.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],29:[function(e,t,r){t.exports={_args:[[{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},"/home/sava/IntellijProjects/YASQE-Ontotext"]],_from:"yasgui-utils@>=1.6.0 <2.0.0",_id:"yasgui-utils@1.6.7",_inCache:!0,_location:"/yasgui-utils",_nodeVersion:"7.10.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/yasgui-utils-1.6.7.tgz_1495459781202_0.06725964159704745"},_npmUser:{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"},_npmVersion:"4.2.0",_phantomChildren:{},_requested:{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",_shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",_shrinkwrap:null,_spec:"yasgui-utils@^1.6.0",_where:"/home/sava/IntellijProjects/YASQE-Ontotext",author:{name:"Laurens Rietveld"},bugs:{url:"https://github.com/YASGUI/Utils/issues"},dependencies:{store:"^2.0.4"},description:"Utils for YASGUI libs",devDependencies:{},directories:{},dist:{shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",tarball:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz"},gitHead:"6031b1cb732d390b29cd5376dceb9a9d665bbd11",homepage:"https://github.com/YASGUI/Utils",licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],main:"src/main.js",maintainers:[{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"}],name:"yasgui-utils",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},scripts:{},version:"1.6.7"}},{}],30:[function(e,t,r){window.console=window.console||{log:function(){}},t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version},nestedExists:function(e){for(var t=Array.prototype.slice.call(arguments,1),r=0;r<t.length;r++){if(!e||!e.hasOwnProperty(t[r]))return!1;e=e[t[r]]}return!0}}},{"../package.json":29,"./storage.js":31,"./svg.js":32}],31:[function(e,t,r){var n=e("store"),i={day:function(){return 864e5},month:function(){i.day()},year:function(){i.month()}},o=t.exports={set:function(e,t,r,o){if(n.enabled&&e&&void 0!==t){"string"==typeof r&&(r=i[r]()),t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));try{n.set(e,{val:t,exp:r,time:(new Date).getTime()})}catch(e){if(e.quotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}(e),!e.quotaExceeded||!o)throw e;o(e)}}},remove:function(e){n.enabled&&e&&n.remove(e)},removeAll:function(e){n.enabled&&(e?"function"==typeof e&&n.each((function(t,r){e(r,t)&&o.remove(r)})):n.clearAll())},get:function(e){if(!n.enabled)return null;if(e){var t=n.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}},{store:17}],32:[function(e,t,r){t.exports={draw:function(e,r){if(e){var n=t.exports.getElement(r);n&&(e.append?e.append(n):e.appendChild(n))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=(new DOMParser).parseFromString(e,"text/xml").documentElement,r=document.createElement("div");return r.className="svgImg",r.appendChild(t),r}return!1}}},{}],33:[function(e,t,r){t.exports={name:"yasgui-yasqe",description:"Yet Another SPARQL Query Editor",version:"2.10.5",main:"src/main.js",license:"MIT",author:"Laurens Rietveld",homepage:"http://yasqe.yasgui.org",scripts:{dev:"gulp serve",build:"gulp",patch:"gulp patch",minor:"gulp minor",major:"gulp major"},devDependencies:{"gulp-bump":"^2.2.0","gulp-connect":"^4.2.0","gulp-embedlr":"^0.5.2","gulp-git":"^1.10.0","gulp-livereload":"^3.8.1","gulp-tag-version":"^1.3.0",watchify:"^3.7.0"},bugs:"https://github.com/YASGUI/YASQE/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASQE.git"},dependencies:{"bootstrap-sass":"~3.3.1",browserify:"^13.1.0","browserify-transform-tools":"^1.6.0",codemirror:"5.17.0",exorcist:"^0.4.0",gulp:"~3.9.0","gulp-autoprefixer":"^3.1.0","gulp-concat":"^2.6.0","gulp-cssimport":"^3.1.0","gulp-cssnano":"^2.1.2","gulp-filter":"^4.0.0","gulp-jsvalidate":"^2.1.0","gulp-notify":"^2.2.0","gulp-rename":"^1.2.2","gulp-sass":"^2.2.0","gulp-sourcemaps":"^1.6.0","gulp-streamify":"1.0.2","gulp-uglify":"~0.2.1",jquery:"^2.2.4","require-dir":"^0.3.0","run-sequence":"^1.2.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~1.1.0","vinyl-transform":"1.0.0","yasgui-utils":"^1.6.0"},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"}}}},{}],34:[function(e,t,r){"use strict";var n=e("jquery"),i=e("../utils.js"),o=e("yasgui-utils"),s=e("../../lib/trie.js");e("../main.js"),t.exports=function(t,r){var l={},u={},c={},p=!1;r.translate=e("../translate.js")(r),r.on("cursorActivity",(function(e,t){d(!0)})),r.on("keyHandled",(function(e,t,r){"Esc"===t&&(p=!1)})),r.on("change",(function(e,t,r){void 0!==r&&" "==r.text&&(p=!1);var i=[];for(var o in l)l[o].is(":visible")&&i.push(l[o]);if(i.length>0){var s=n(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),a=0;s.is(":visible")&&(a=s.outerWidth()),i.forEach((function(e){e.css("right",a)}))}}));var d=function(e){if(!r.somethingSelected()){r.fromAutoShow=e;var i=function(n){if(e&&!p)return!1;if(e&&!n.autoShow)return!1;e||(p=!0);var i={closeCharacters:/(?=a)b/,completeSingle:!1};return!n.bulk&&n.async&&(i.async=!0),t.showHint(r,(function(e,t){return f(n,t)}),i),!0};for(var o in u)if(-1!=n.inArray(o,r.options.autocompleters)){var s=u[o];if(s.isValidCompletionPosition)if(s.isValidCompletionPosition()){if((!s.callbacks||!s.callbacks.validPosition||!1!==s.callbacks.validPosition(r,s))&&i(s))break}else s.callbacks&&s.callbacks.invalidPosition&&s.callbacks.invalidPosition(r,s)}}},f=function(e,t){var n=r.getCompleteToken();if(e.preProcessToken&&(n=e.preProcessToken(n)),n){if(e.bulk||!e.async)return function(t){var r=t.autocompletionString||t.string,n=[];if(c[e.name])n=c[e.name].autoComplete(r);else if("function"==typeof e.get&&0==e.async)n=e.get(r);else if("object"==typeof e.get)for(var i=r.length,o=0;o<e.get.length;o++){var s=e.get[o];s.slice(0,i)==r&&n.push(s)}return g(n,e,t)}(n);e.get(n,(function(r){t(g(r,e,n))}))}},h=function(e,t,r){return e.replace(new RegExp(t,"g"),r)},g=function(e,i,o){for(var s,l=[],u=0;u<e.length;u++){var c=e[u];if(c.value){var d=c.value,f=c.description;if("prefix"===c.type?d+=":":i.postProcessToken&&(d=i.postProcessToken(o,d)),(!d.startsWith("<")||!d.endsWith(">"))&&d.indexOf(":")>0){var g=d.indexOf(":");d=d.substring(0,g+1)+((s=d.substring(g+1)).trim().startsWith("<")&&s.trim().endsWith(">")?s:(s=encodeURIComponent(s),s=h(s,"[*]","%2a"),s=h(s,"[!]","%21"),s=h(s,"[(]","%28"),s=h(s,"[)]","%29"),s=h(s,"[~]","%7e"),s=h(s,"[']","%27")))}l.push({text:d,displayText:f,hint:function(e,t,r){p=!1,a(e,t,r)},render:function(e,t,r){n(e).append(r.displayText)}})}}var E=r.getCursor(),m={completionToken:o.string,list:l,from:{line:E.line,ch:o.start},to:{line:E.line,ch:o.end}};if(i.callbacks)for(var v in i.callbacks)i.callbacks[v]&&t.on(m,v,i.callbacks[v]);return m};return{init:function(e,t){var n=u[e]=new t(r,e);if(n.name=e,n.bulk){var a=function(e){e&&e instanceof Array&&e.length>0&&function(e,t){c[e.name]=new s;for(var n=0;n<t.length;n++)c[e.name].insert(t[n]);var a=i.getPersistencyId(r,e.persistent);a&&o.storage.set(a,t,"month")}(n,e)};if(n.get instanceof Array)a(n.get);else{var l=null,p=i.getPersistencyId(r,n.persistent);p&&(l=o.storage.get(p)),l&&l.length>0?a(l):n.get instanceof Function&&(n.async?n.get(null,a):a(n.get()))}}},completers:u,notifications:{getEl:function(e){return n(l[e.name])},show:function(e,t){t.autoshow||(l[t.name]||(l[t.name]=n("<div class='completionNotification'></div>")),n("#keyboardShortcuts").hide(),l[t.name].show().text(e.translate("yasqe.autocompleterBase.message")).appendTo(n(e.getWrapperElement())))},hide:function(e,t){l[t.name]&&(l[t.name].hide(),n("#keyboardShortcuts").show())}},autoComplete:d,getTrie:function(e){return"string"==typeof e?c[e]:c[e.name]}}};var a=function(e,t,r){r.text!=e.getTokenAt(e.getCursor()).string&&e.replaceRange(r.text,t.from,t.to)}},{"../../lib/trie.js":4,"../main.js":48,"../translate.js":54,"../utils.js":55,jquery:16,"yasgui-utils":30}],35:[function(e,t,r){"use strict";e("jquery"),t.exports=function(r,n){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(r)},get:function(t,n){return e("./utils").fetchFromLov(r,this,t,n)},preProcessToken:function(e){return t.exports.preProcessToken(r,e)},postProcessToken:function(e,n){return t.exports.postProcessToken(r,e,n)},async:!0,bulk:!1,autoShow:!1,persistent:n,callbacks:{validPosition:r.autocompleters.notifications.show,invalidPosition:r.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.indexOf("?"))return!1;var r=e.getCursor(),n=e.getPreviousNonWsToken(r.line,t);return"a"==n.string||"rdf:type"==n.string||"rdfs:domain"==n.string||"rdfs:range"==n.string},t.exports.preProcessToken=function(t,r){return e("./utils.js").preprocessResourceTokenForCompletion(t,r)},t.exports.postProcessToken=function(t,r,n){return e("./utils.js").postprocessResourceTokenForCompletion(t,r,n)}},{"./utils":40,"./utils.js":40,jquery:16}],36:[function(e,t,r){"use strict";var n,i,o=e("jquery");t.exports=function(e,r){return e.on("repositoryOrAuthorizationChanged",(function(e,t){i=e,n=t})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(r,n){return t.exports.fetchAutocomplete(e,r,n)},preProcessToken:function(r){return t.exports.preProcessToken(e,r)},postProcessToken:function(r,n){return t.exports.postProcessToken(e,r,n)},async:!0,bulk:!1,autoShow:!0,persistent:r,callbacks:{validPosition:e.autocompleters.notifications.show,invalidPosition:e.autocompleters.notifications.hide}}},t.exports.fetchAutocomplete=function(e,t,r){if(i&&"SYSTEM"!==i){if(!t||!t.string||0===t.string.trim().length)return!1;var s;s=t.tokenPrefix?t.tokenPrefixUri+";"+t.string.substring(t.tokenPrefix.length):t.autocompletionString.startsWith("http://")?t.autocompletionString+";":t.autocompletionString;var a={"X-GraphDB-Repository":i};n&&(a.Authorization=n),o.get({url:"rest/autocomplete/query",data:{q:s},success:function(t,n,i){204!==i.status||e.fromAutoShow?t&&r(t.suggestions):e.toastBuildIndex()},dataType:"json",headers:a}).fail((function(t){e.fromAutoShow||e.toastError(t)}))}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor();if(e.getTokenAt(t),0==e.getLine(t.line).toUpperCase().trim().indexOf("PREFIX"))return!1;var r=e.getCompleteToken();return-1!=o.inArray("IRI_REF",r.state.possibleCurrent)&&0!=r.string.length&&0!=r.string.indexOf("?")},t.exports.preProcessToken=function(t,r){return e("./utils.js").preprocessResourceTokenForCompletion(t,r)},t.exports.postProcessToken=function(t,r,n){return e("./utils.js").postprocessResourceTokenForCompletion(t,r,n)}},{"./utils.js":40,jquery:16}],37:[function(e,t,r){"use strict";var n=e("jquery");t.exports=function(r,n){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(r)},get:function(t,n){return e("./utils").fetchFromLov(r,this,t,n)},preProcessToken:function(e){return t.exports.preProcessToken(r,e)},postProcessToken:function(e,n){return t.exports.postProcessToken(r,e,n)},async:!0,bulk:!1,autoShow:!1,persistent:n,callbacks:{validPosition:r.autocompleters.notifications.show,invalidPosition:r.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.length)return!1;if(0==t.string.indexOf("?"))return!1;if(n.inArray("a",t.state.possibleCurrent)>=0)return!0;var r=e.getCursor();return"rdfs:subPropertyOf"==e.getPreviousNonWsToken(r.line,t).string},t.exports.preProcessToken=function(t,r){return e("./utils.js").preprocessResourceTokenForCompletion(t,r)},t.exports.postProcessToken=function(t,r,n){return e("./utils.js").postprocessResourceTokenForCompletion(t,r,n)}},{"./utils":40,"./utils.js":40,jquery:16}],38:[function(e,t,r){"use strict";var n,i=e("jquery"),o=(e("./utils"),{"string-2":"prefixed",atom:"var"});t.exports=function(e,r){return e.on("change",(function(){t.exports.appendPrefixIfNeeded(e,r)})),e.on("namespacesChanged",(function(r){t.exports.updateNamespaces(e,r)})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(e,t){n=t},preProcessToken:function(r){return t.exports.preprocessPrefixTokenForCompletion(e,r)},async:!0,bulk:!0,autoShow:!0,persistent:null}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor(),r=e.getTokenAt(t);if(e.getLine(t.line).length>t.ch)return!1;if("ws"!=r.type&&(r=e.getCompleteToken()),0==!r.string.indexOf("a")&&-1==i.inArray("PNAME_NS",r.state.possibleCurrent))return!1;var n=e.getPreviousNonWsToken(t.line,r);return!(!n||"PREFIX"!=n.string.toUpperCase())},t.exports.preprocessPrefixTokenForCompletion=function(e,t){var r=e.getPreviousNonWsToken(e.getCursor().line,t);return r&&r.string&&":"==r.string.slice(-1)&&(t={start:r.start,end:t.end,string:r.string+" "+t.string,state:t.state}),t},t.exports.appendPrefixIfNeeded=function(e,t){if(e.autocompleters.getTrie(t)&&e.options.autocompleters&&-1!=e.options.autocompleters.indexOf(t)){var r=e.getCursor(),n=e.getTokenAt(r);if("prefixed"==o[n.type]){var i=n.string.indexOf(":");if(-1!==i){var s=e.getPreviousNonWsToken(r.line,n).string.toUpperCase(),a=e.getTokenAt({line:r.line,ch:n.start});if("PREFIX"!=s&&("ws"==a.type||null==a.type)){var l=n.string.substring(0,i+1);if(null==e.getPrefixesFromQuery()[l.slice(0,-1)]){var u=e.autocompleters.getTrie(t).autoComplete(l);u.length>0&&e.addPrefixes(u[0])}}}}}},t.exports.updateNamespaces=function(e,t){var r=!1,o=i.map(t,(function(e,t){return"onto"===t&&(r=!0),t+": <"+e+">"}));r||o.push("onto: <http://www.ontotext.com/>"),o.sort(),n(o)}},{"./utils":40,jquery:16}],39:[function(e,t,r){t.exports=function(e,t){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return"ws"!=t.type&&(t=e.getCompleteToken()).string.length>1},get:function(e,t){for(var r=["COUNT","SUM","MIN","MAX","AVG","SAMPLE","STR","LANG","LANGMATCHES","DATATYPE","BOUND","IRI","URI","BNODE","RAND","ABS","CEIL","FLOOR","ROUND","CONCAT","SUBSTR","STRLEN","REPLACE","UCASE","LCASE","ENCODE_FOR_URI","CONTAINS","STRSTARTS","STRENDS","STRBEFORE","STRAFTER","YEAR","MONTH","DAY","HOURS","MINUTES","SECONDS","TIMEZONE","TZ","NOW","UUID","STRUUID","MD5","SHA1","SHA256","SHA384","SHA512","COALESCE","IF","STRLANG","STRDT","sameTerm","isIRI","isURI","isBLANK","isLITERAL","isNUMERIC","REGEX","EXISTS","FILTER"],n=[],i=0;i<r.length;i++){var o=r[i],s=o.toLowerCase(),a=e.toLowerCase();0===s.indexOf(a)&&n.push(o+"(")}return n.sort(),n},preProcessToken:null,postProcessToken:null,async:!1,bulk:!1,autoShow:!0,persistent:null,handlers:{validPosition:null,invalidPosition:null,shown:null,select:null,pick:null,close:null}}}},{}],40:[function(e,t,r){"use strict";var n=e("jquery"),i=(e("./utils.js"),e("yasgui-utils")),o=0===window.location.protocol.indexOf("http")?"//":"http://";t.exports={fetchFromLov:function(t,r,s,a){if(!s||!s.string||0==s.string.trim().length)return t.autocompleters.notifications.getEl(r).empty().append(t.translate("yasqe.utils.message1")),!1;var l={q:s.autocompletionString,page:1};"classes"==r.name?l.type="class":l.type="property";var u=[],c="",p=function(){c=o+"lov.okfn.org/dataset/lov/api/v2/autocomplete/terms?"+n.param(l)};p();var d=function(){n.get(c,(function(e){for(var i=0;i<e.results.length;i++)n.isArray(e.results[i].uri)&&e.results[i].uri.length>0?u.push(e.results[i].uri[0]):u.push(e.results[i].uri);u.length<e.total_results&&u.length<50?(l.page++,p(),d()):(u.length>0?t.autocompleters.notifications.hide(t,r):t.autocompleters.notifications.getEl(r).text(t.translate("yasqe.utils.message2")),a(u))})).fail((function(e,n,i){t.autocompleters.notifications.getEl(r).empty().append(t.translate("yasqe.utils.message3"))}))};t.autocompleters.notifications.getEl(r).empty().append(n("<span>Fetchting autocompletions &nbsp;</span>")).append(n(i.svg.getElement(e("../imgs.js").loader)).addClass("notificationLoader")),d()},preprocessResourceTokenForCompletion:function(t,r){var n=t.getPrefixesFromQuery();if(0==!r.string.indexOf("<")&&(r.tokenPrefix=r.string.substring(0,r.string.indexOf(":")+1),null!=n[r.tokenPrefix.slice(0,-1)]&&(r.tokenPrefixUri=n[r.tokenPrefix.slice(0,-1)])),t.translate=e("../translate.js")(t),r.autocompletionString=r.string.trim(),0==!r.string.indexOf("<")&&r.string.indexOf(":")>-1)for(var i in n)if(0==r.string.indexOf(i)){r.autocompletionString=n[i],r.autocompletionString+=r.string.substring(i.length+1);break}return 0==r.autocompletionString.indexOf("<")&&(r.autocompletionString=r.autocompletionString.substring(1)),-1!==r.autocompletionString.indexOf(">",r.length-1)&&(r.autocompletionString=r.autocompletionString.substring(0,r.autocompletionString.length-1)),r},postprocessResourceTokenForCompletion:function(e,t,r){if(t.tokenPrefix&&t.autocompletionString&&t.tokenPrefixUri)r=t.tokenPrefix+r.substring(t.tokenPrefixUri.length);else{var n=e.getPrefixesFromQuery(),i=_.filter(_.values(n),(function(e){return r.startsWith(e)}));if(i.length>0){var o=_.findKey(n,(function(e){return e===i[0]}));r=o+":"+r.substring(n[o].length)}else{if(0===r.indexOf("<b>"+t.string))return r;if(r.startsWith("<<")&&r.endsWith(">>"))return r;r="<"+r+">"}}return r}}},{"../imgs.js":47,"../translate.js":54,"./utils.js":40,jquery:16,"yasgui-utils":30}],41:[function(e,t,r){"use strict";var n=e("jquery");t.exports=function(e){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return!("ws"==t.type||!(t=e.getCompleteToken(t))||0!=t.string.indexOf("?"))},get:function(t){if(0==t.trim().length)return[];var r={};n(e.getWrapperElement()).find(".cm-atom").each((function(){var e=this.innerHTML;if(0==e.indexOf("?")){var i=n(this).next();if(i.attr("class")&&i.attr("class").indexOf("cm-atom")>=0&&(e+=i.text()),e.length<=1)return;if(0!==e.indexOf(t))return;if(e==t)return;r[e]=!0}}));var i=[];for(var o in r)i.push(o);return i.sort(),i},async:!1,bulk:!1,autoShow:!0}}},{jquery:16}],42:[function(e,t,r){var n=e("./sparql.js"),i=e("jquery"),o=function(e){return"'"+e+"'"};t.exports={createCurlString:function(e,t){var r=n.getAjaxConfig(e,t),s=r.url;0!==r.url.indexOf("http")&&(s=window.location.protocol+"//"+window.location.host,0===r.url.indexOf("/")?s+=r.url:s+=window.location.pathname+r.url);var a=["curl",s,"-X",e.options.sparql.requestMethod];for(var l in"POST"==e.options.sparql.requestMethod&&a.push("--data "+o(i.param(r.data))),r.headers)a.push("-H "+o(l+": "+r.headers[l]));return a.join(" ")}}},{"./sparql.js":51,jquery:16}],43:[function(e,t,r){var n=e("jquery"),i=e("./main.js");i.defaults=n.extend(!0,{},i.defaults,{mode:"sparql11",value:"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nSELECT * WHERE {\n ?sub ?pred ?obj .\n} \nLIMIT 10",highlightSelectionMatches:{showToken:/\w/},tabMode:"indent",autoCloseBrackets:!0,lineNumbers:!0,lineWrapping:!0,backdrop:!1,foldGutter:{rangeFinder:new i.fold.combine(i.fold.brace,i.fold.prefix)},collapsePrefixesOnLoad:!1,gutters:["gutterErrorBar","CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:!0,fixedGutter:!0,syntaxErrorCheck:!0,extraKeys:{"Alt-Enter":i.autoComplete,"Ctrl-Space":i.autoComplete,"Cmd-Space":i.autoComplete,"Ctrl-D":i.deleteLine,"Ctrl-K":i.deleteLine,"Cmd-D":i.deleteLine,"Cmd-K":i.deleteLine,"Ctrl-/":i.commentLines,"Cmd-/":i.commentLines,"Ctrl-Alt-Down":i.copyLineDown,"Ctrl-Alt-Up":i.copyLineUp,"Cmd-Alt-Down":i.copyLineDown,"Cmd-Alt-Up":i.copyLineUp,"Shift-Ctrl-F":i.doAutoFormat,"Shift-Cmd-F":i.doAutoFormat,"Ctrl-]":i.indentMore,"Cmd-]":i.indentMore,"Ctrl-[":i.indentLess,"Cmd-[":i.indentLess,"Ctrl-S":i.storeQuery,"Cmd-S":i.storeQuery,"Ctrl-Enter":i.executeQuery,"Cmd-Enter":i.executeQuery,F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}},cursorHeight:.9,createShareLink:i.createShareLink,createShortLink:null,consumeShareLink:i.consumeShareLink,persistent:function(e){return"yasqe_"+n(e.getWrapperElement()).closest("[id]").attr("id")+"_queryVal"},sparql:{queryName:function(e){return e.getQueryMode()},showQueryButton:!1,endpoint:"http://dbpedia.org/sparql",requestMethod:"POST",acceptHeaderGraph:"text/turtle,*/*;q=0.9",acceptHeaderSelect:"application/sparql-results+json,*/*;q=0.9",acceptHeaderUpdate:"text/plain,*/*;q=0.9",namedGraphs:[],defaultGraphs:[],args:[],headers:{},getQueryForAjax:null,callbacks:{beforeSend:null,complete:null,error:null,success:null},handlers:{}}})},{"./main.js":48,jquery:16}],44:[function(e,t,r){t.exports=e("./main.js")},{"./main.js":48}],45:[function(e,t,r){t.exports={"yasqe.invalid.line":"This line is invalid. Expected: ","yasqe.btn.title.fullscreen":"Set editor full screen","yasqe.btn.title.normalsize":"Set editor to normal size","yasqe.btn.title.share":"Share your query","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Shorten","yasqe.autocompleterBase.message":"Press Alt+Enter to autocomplete","yasqe.utils.message1":"Nothing to autocomplete yet!","yasqe.utils.message2":"0 matches found...","yasqe.utils.message3":"Failed fetching suggestions.."}},{}],46:[function(e,t,r){t.exports={"yasqe.invalid.line":"Cette ligne n'est pas valide. Attendu:","yasqe.btn.title.fullscreen":"Configurer l'éditeur en plein écran","yasqe.btn.title.normalsize":"Configurer l'éditeur à la taille normale","yasqe.btn.title.share":"Partagez votre requête","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Raccourcir","yasqe.autocompleterBase.message":"Appuyez sur Alt+Enter pour l'autocomplétion.","yasqe.utils.message1":"Rien à autocompléter encore !","yasqe.utils.message2":"0 correspondances trouvées ...","yasqe.utils.message3":"Échec de la récupération des suggestions..."}},{}],47:[function(e,t,r){"use strict";t.exports={query:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"><g ></g><g >\t<path d="M64.622,2.411H14.995c-6.627,0-12,5.373-12,12v49.897c0,6.627,5.373,12,12,12h49.627c6.627,0,12-5.373,12-12V14.411 C76.622,7.783,71.249,2.411,64.622,2.411z M24.125,63.906V15.093L61,39.168L24.125,63.906z"/></g></svg>',queryInvalid:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 73.627 73.897" enable-background="new 0 0 80 80" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="warning.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" inkscape:zoom="3.1936344" inkscape:cx="36.8135" inkscape:cy="36.9485" inkscape:window-x="2625" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /><g transform="translate(-2.995,-2.411)" /><g transform="translate(-2.995,-2.411)" ><path d="M 64.622,2.411 H 14.995 c -6.627,0 -12,5.373 -12,12 v 49.897 c 0,6.627 5.373,12 12,12 h 49.627 c 6.627,0 12,-5.373 12,-12 V 14.411 c 0,-6.628 -5.373,-12 -12,-12 z M 24.125,63.906 V 15.093 L 61,39.168 24.125,63.906 z" inkscape:connector-curvature="0" /></g><path d="M 66.129381,65.903784 H 49.769875 c -1.64721,0 -2.889385,-0.581146 -3.498678,-1.63595 -0.609293,-1.055608 -0.491079,-2.422161 0.332391,-3.848223 l 8.179753,-14.167069 c 0.822934,-1.42633 1.9477,-2.211737 3.166018,-2.211737 1.218319,0 2.343086,0.785407 3.166019,2.211737 l 8.179751,14.167069 c 0.823472,1.426062 0.941686,2.792615 0.33239,3.848223 -0.609023,1.054804 -1.851197,1.63595 -3.498138,1.63595 z M 59.618815,60.91766 c 0,-0.850276 -0.68944,-1.539719 -1.539717,-1.539719 -0.850276,0 -1.539718,0.689443 -1.539718,1.539719 0,0.850277 0.689442,1.539718 1.539718,1.539718 0.850277,0 1.539717,-0.689441 1.539717,-1.539718 z m 0.04155,-9.265919 c 0,-0.873061 -0.707939,-1.580998 -1.580999,-1.580998 -0.873061,0 -1.580999,0.707937 -1.580999,1.580998 l 0.373403,5.610965 h 0.0051 c 0.05415,0.619747 0.568548,1.10761 1.202504,1.10761 0.586239,0 1.075443,-0.415756 1.188563,-0.968489 0.0092,-0.04476 0.0099,-0.09248 0.01392,-0.138854 h 0.01072 l 0.367776,-5.611232 z" inkscape:connector-curvature="0" style="fill:#aa8800" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g ></g><g >\t<path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',share:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M36.764,50c0,0.308-0.07,0.598-0.088,0.905l32.247,16.119c2.76-2.338,6.293-3.797,10.195-3.797 C87.89,63.228,95,70.338,95,79.109C95,87.89,87.89,95,79.118,95c-8.78,0-15.882-7.11-15.882-15.891c0-0.316,0.07-0.598,0.088-0.905 L31.077,62.085c-2.769,2.329-6.293,3.788-10.195,3.788C12.11,65.873,5,58.771,5,50c0-8.78,7.11-15.891,15.882-15.891 c3.902,0,7.427,1.468,10.195,3.797l32.247-16.119c-0.018-0.308-0.088-0.598-0.088-0.914C63.236,12.11,70.338,5,79.118,5 C87.89,5,95,12.11,95,20.873c0,8.78-7.11,15.891-15.882,15.891c-3.911,0-7.436-1.468-10.195-3.806L36.676,49.086 C36.693,49.394,36.764,49.684,36.764,50z"/></svg>',warning:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 66.399998 66.399998" enable-background="new 0 0 69.3 69.3" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" ><g transform="translate(-1.5,-1.5)" style="fill:#ff0000"><path d="M 34.7,1.5 C 16.4,1.5 1.5,16.4 1.5,34.7 1.5,53 16.4,67.9 34.7,67.9 53,67.9 67.9,53 67.9,34.7 67.9,16.4 53,1.5 34.7,1.5 z m 0,59.4 C 20.2,60.9 8.5,49.1 8.5,34.7 8.5,20.2 20.3,8.5 34.7,8.5 c 14.4,0 26.2,11.8 26.2,26.2 0,14.4 -11.8,26.2 -26.2,26.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.6,47.1 c -1.4,0 -2.5,0.5 -3.5,1.5 -0.9,1 -1.4,2.2 -1.4,3.6 0,1.6 0.5,2.8 1.5,3.8 1,0.9 2.1,1.3 3.4,1.3 1.3,0 2.4,-0.5 3.4,-1.4 1,-0.9 1.5,-2.2 1.5,-3.7 0,-1.4 -0.5,-2.6 -1.4,-3.6 -0.9,-1 -2.1,-1.5 -3.5,-1.5 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.8,13.9 c -1.5,0 -2.8,0.5 -3.7,1.6 -0.9,1 -1.4,2.4 -1.4,4.2 0,1.1 0.1,2.9 0.2,5.6 l 0.8,13.1 c 0.2,1.8 0.4,3.2 0.9,4.1 0.5,1.2 1.5,1.8 2.9,1.8 1.3,0 2.3,-0.7 2.9,-1.9 0.5,-1 0.7,-2.3 0.9,-4 L 39.4,25 c 0.1,-1.3 0.2,-2.5 0.2,-3.8 0,-2.2 -0.3,-3.9 -0.8,-5.1 -0.5,-1 -1.6,-2.2 -4,-2.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /></g></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],48:[function(e,t,r){"use strict";window.console=window.console||{log:function(){}};var n=e("jquery"),i=e("codemirror"),o=e("./utils.js"),s=e("yasgui-utils"),a=e("./imgs.js");e("../lib/deparam.js"),e("codemirror/addon/fold/foldcode.js"),e("codemirror/addon/fold/foldgutter.js"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/fold/brace-fold.js"),e("./prefixFold.js"),e("codemirror/addon/hint/show-hint.js"),e("codemirror/addon/search/searchcursor.js"),e("codemirror/addon/edit/matchbrackets.js"),e("codemirror/addon/runmode/runmode.js"),e("codemirror/addon/display/fullscreen.js"),e("../lib/grammar/tokenizer.js"),e("codemirror/addon/edit/closebrackets.js");var l=t.exports=function(e,t){var r=n("<div>",{class:"yasqe"}).appendTo(n(e));t=u(t);var o=c(i(r[0],t));return f(o),o},u=function(e){return n.extend(!0,{},l.defaults,e)},c=function(t){t.translate=e("./translate.js")(t),t.autocompleters=e("./autocompleters/autocompleterBase.js")(l,t),t.options.autocompleters&&t.options.autocompleters.forEach((function(e){l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])})),t.lastQueryDuration=null,t.getCompleteToken=function(r,n){return e("./tokenUtils.js").getCompleteToken(t,r,n)},t.getPreviousNonWsToken=function(r,n){return e("./tokenUtils.js").getPreviousNonWsToken(t,r,n)},t.getNextNonWsToken=function(r,n){return e("./tokenUtils.js").getNextNonWsToken(t,r,n)},t.collapsePrefixes=function(r){void 0===r&&(r=!0),t.foldCode(e("./prefixFold.js").findFirstPrefixLine(t),l.fold.prefix,r?"fold":"unfold")};var r=null,i=null;return t.setBackdrop=function(e){(t.options.backdrop||0===t.options.backdrop||"0"===t.options.backdrop)&&(null===i&&1==(i=+t.options.backdrop)&&(i=400),r||(r=n("<div>",{class:"backdrop"}).click((function(){n(this).hide()})).insertAfter(n(t.getWrapperElement()))),e?r.show(i):r.hide(i))},t.query=function(e){l.executeQuery(t,e)},t.getUrlArguments=function(e){return l.getUrlArguments(t,e)},t.getPrefixesFromQuery=function(){return e("./prefixUtils.js").getPrefixesFromQuery(t)},t.addPrefixes=function(r){return e("./prefixUtils.js").addPrefixes(t,r)},t.removePrefixes=function(r){return e("./prefixUtils.js").removePrefixes(t,r)},t.getValueWithoutComments=function(){var e="";return l.runMode(t.getValue(),"sparql11",(function(t,r){"comment"!=r&&(e+=t)})),e},t.getQueryType=function(){return t.queryType},t.getQueryMode=function(){var e=t.getQueryType();return"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e?"update":"query"},t.setCheckSyntaxErrors=function(e){t.options.syntaxErrorCheck=e,E(t)},t.enableCompleter=function(e){p(t.options,e),l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])},t.disableCompleter=function(e){d(t.options,e)},t},p=function(e,t){e.autocompleters||(e.autocompleters=[]),e.autocompleters.push(t)},d=function(e,t){if("object"==typeof e.autocompleters){var r=n.inArray(t,e.autocompleters);r>=0&&(e.autocompleters.splice(r,1),d(e,t))}},f=function(e){var t=o.getPersistencyId(e,e.options.persistent);if(t){var r=s.storage.get(t);r&&e.setValue(r)}l.drawButtons(e),e.on("blur",(function(e,t){l.storeQuery(e)})),e.on("change",(function(e,t){E(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("changes",(function(){E(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("language-changed",(function(){E(e),l.drawButtons(e),l.autoComplete(e)})),e.on("cursorActivity",(function(e,t){g(e)})),e.prevQueryValid=!1,E(e),l.positionButtons(e),n(e.getWrapperElement()).on("mouseenter",".cm-atom",(function(){var t=n(this).text();n(e.getWrapperElement()).find(".cm-atom").filter((function(){return n(this).text()===t})).addClass("matchingVar")})).on("mouseleave",".cm-atom",(function(){n(e.getWrapperElement()).find(".matchingVar").removeClass("matchingVar")})),e.options.consumeShareLink&&(e.options.consumeShareLink(e,h()),window.addEventListener("hashchange",(function(){e.options.consumeShareLink(e,h())}))),e.options.collapsePrefixesOnLoad&&e.collapsePrefixes(!0)},h=function(){var e=null;return window.location.hash.length>1&&(e=n.deparam(location.href.split("#")[1])),e&&"query"in e||!(window.location.search.length>1)||(e=n.deparam(window.location.search.substring(1))),e},g=function(e){e.cursor=n(".CodeMirror-cursor"),e.buttons&&e.buttons.is(":visible")&&e.cursor.length>0&&(o.elementsOverlap(e.cursor,e.buttons)?e.buttons.find("svg").attr("opacity","0.2"):e.buttons.find("svg").attr("opacity","1.0"))},E=function(t,r){t.queryValid=!0,t.clearGutter("gutterErrorBar");for(var i=null,o=0;o<t.lineCount();++o){var l=!1;if(t.prevQueryValid||(l=!0),i=t.getTokenAt({line:o,ch:t.getLine(o).length},l).state,t.queryType=i.queryType,0==i.OK){if(!t.options.syntaxErrorCheck)return void n(t.getWrapperElement).find(".sp-error").css("color","black");var u=s.svg.getElement(a.warning);i.possibleCurrent&&i.possibleCurrent.length>0&&e("./tooltip")(t,u,(function(){var e=[];return i.possibleCurrent.forEach((function(t){e.push("<strong style='text-decoration:underline'>"+n("<div/>").text(t).html()+"</strong>")})),t.translate("yasqe.invalid.line")+e.join(", ")})),u.style.marginTop="2px",u.style.marginLeft="2px",u.className="parseErrorIcon",t.setGutterMarker(o,"gutterErrorBar",u),t.queryValid=!1;break}}if(t.prevQueryValid=t.queryValid,r&&null!=i&&null!=i.stack){var c=i.stack,p=i.stack.length;(p>1||1==p&&"solutionModifier"!=c[0]&&"?limitOffsetClauses"!=c[0]&&"?offsetClause"!=c[0])&&(t.queryValid=!1)}};n.extend(l,i),l.Autocompleters={},l.registerAutocompleter=function(e,t){l.Autocompleters[e]=t,p(l.defaults,e)},l.autoComplete=function(e){e.autocompleters.autoComplete(!1)},l.registerAutocompleter("sesame-prefixes",e("./autocompleters/sesame-prefixes.js")),l.registerAutocompleter("localNames",e("./autocompleters/localNames.js")),l.registerAutocompleter("properties",e("./autocompleters/properties.js")),l.registerAutocompleter("classes",e("./autocompleters/classes.js")),l.registerAutocompleter("standard",e("./autocompleters/standard.js")),l.registerAutocompleter("variables",e("./autocompleters/variables.js")),l.positionButtons=function(e){var t=n(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),r=0;t.is(":visible")&&(r=t.outerWidth()),e.buttons.is(":visible")&&e.buttons.css("right",r+4)},l.createShareLink=function(e){var t={};return window.location.hash.length>1&&(t=n.deparam(window.location.hash.substring(1))),t.query=e.getValue(),t},l.getAsCurl=function(t,r){return e("./curl.js").createCurlString(t,r)},l.consumeShareLink=function(e,t){t&&t.query&&e.setValue(t.query)},l.drawButtons=function(e){if(e.buttons=n("<div class='yasqe_buttons'></div>").appendTo(n(e.getWrapperElement())),e.options.createShareLink){var t=n(s.svg.getElement(a.share));t.click((function(r){r.stopPropagation();var i=n("<div class='yasqe_sharePopup'></div>").appendTo(e.buttons);n("html").click((function(){i&&i.remove()})),i.click((function(e){e.stopPropagation()}));var o=n("<input>").val(location.protocol+"//"+location.host+location.pathname+location.search+"#"+n.param(e.options.createShareLink(e)));if(o.focus((function(){var e=n(this);e.select(),e.mouseup((function(){return e.unbind("mouseup"),!1}))})),i.empty().append(n("<div>",{class:"inputWrapper"}).append(o)),e.options.createShortLink){i.addClass("enableShort");const t=e.translate("yasqe.btn.lbl.shorten");n("<button>"+t+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){n(this).parent().find("button").attr("disabled","disabled"),e.options.createShortLink(o.val(),(function(e,t){e?(o.remove(),i.find(".inputWrapper").append(n("<span>",{class:"shortlinkErr"}).text(e))):o.val(t).focus()}))})).appendTo(i)}const s=e.translate("yasqe.btn.lbl.curl");n("<button>"+s+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){n(this).parent().find("button").attr("disabled","disabled"),o.val(l.getAsCurl(e)).focus()})).appendTo(i);var a=t.position();i.css("top",a.top+t.outerHeight()+parseInt(i.css("padding-top"))+"px").css("left",a.left+t.outerWidth()-i.outerWidth()+"px"),o.focus()})).addClass("yasqe_share").attr("title",e.translate("yasqe.btn.title.share")).appendTo(e.buttons)}var r=n("<div>",{class:"fullscreenToggleBtns"}).append(n(s.svg.getElement(a.fullscreen)).addClass("yasqe_fullscreenBtn").attr("title",e.translate("yasqe.btn.title.fullscreen")).click((function(){e.setOption("fullScreen",!0)}))).append(n(s.svg.getElement(a.smallscreen)).addClass("yasqe_smallscreenBtn").attr("title",e.translate("yasqe.btn.title.normalsize")).click((function(){e.setOption("fullScreen",!1)})));e.buttons.append(r),e.options.sparql.showQueryButton&&(n("<div>",{class:"yasqe_queryButton"}).click((function(){n(this).hasClass("query_busy")?(e.xhr&&e.xhr.abort(),l.updateQueryButton(e)):e.query()})).appendTo(e.buttons),l.updateQueryButton(e))};var m={busy:"loader",valid:"query",error:"queryInvalid"};l.updateQueryButton=function(e,t){var r=n(e.getWrapperElement()).find(".yasqe_queryButton");0!=r.length&&(t||(t="valid",!1===e.queryValid&&(t="error")),t!=e.queryStatus&&(r.empty().removeClass((function(e,t){return t.split(" ").filter((function(e){return 0==e.indexOf("query_")})).join(" ")})),"busy"==t?(r.append(n("<div>",{class:"loader"})),e.queryStatus=t):"valid"!=t&&"error"!=t||(r.addClass("query_"+t),s.svg.draw(r,a[m[t]]),e.queryStatus=t)))},l.fromTextArea=function(e,t){t=u(t),n("<div>",{class:"yasqe"}).insertBefore(n(e)).append(n(e));var r=c(i.fromTextArea(e,t));return f(r),r},l.storeQuery=function(e){var t=o.getPersistencyId(e,e.options.persistent);t&&s.storage.set(t,e.getValue(),"month")},l.commentLines=function(e){for(var t=e.getCursor(!0).line,r=e.getCursor(!1).line,n=Math.min(t,r),i=Math.max(t,r),o=!0,s=n;s<=i;s++){var a=e.getLine(s);if(0==a.length||"#"!=a.substring(0,1)){o=!1;break}}for(s=n;s<=i;s++)o?e.replaceRange("",{line:s,ch:0},{line:s,ch:1}):e.replaceRange("#",{line:s,ch:0})},l.copyLineUp=function(e){var t=e.getCursor(),r=e.lineCount();e.replaceRange("\n",{line:r-1,ch:e.getLine(r-1).length});for(var n=r;n>t.line;n--){var i=e.getLine(n-1);e.replaceRange(i,{line:n,ch:0},{line:n,ch:e.getLine(n).length})}},l.copyLineDown=function(e){l.copyLineUp(e);var t=e.getCursor();t.line++,e.setCursor(t)},l.doAutoFormat=function(e){if(e.somethingSelected()){var t={line:e.getCursor(!1).line,ch:e.getSelection().length};v(e,e.getCursor(!0),t)}else{var r=e.lineCount(),n=e.getTextArea().value.length;v(e,{line:0,ch:0},{line:r,ch:n})}};var v=function(e,t,r){var n=e.indexFromPos(t),i=e.indexFromPos(r),o=x(e.getValue(),n,i);e.operation((function(){e.replaceRange(o,t,r);for(var i=e.posFromIndex(n).line,s=e.posFromIndex(n+o.length).line,a=i;a<=s;a++)e.indentLine(a,"smart")}))},x=function(e,t,r){e=e.substring(t,r);var o=[["keyword","ws","prefixed","ws","uri"],["keyword","ws","uri"]],s=["{",".",";"],a=["}"],l="",u="",c=[];return i.runMode(e,"sparql11",(function(e,t){c.push(t);var r=function(e,t){for(var r=0;r<o.length;r++)if(c.valueOf().toString()==o[r].valueOf().toString())return 1;for(r=0;r<s.length;r++)if(e==s[r])return 1;for(r=0;r<a.length;r++)if(""!=n.trim(u)&&e==a[r])return-1;return 0}(e);0!=r?(1==r?(l+=e+"\n",u=""):(l+="\n"+e,u=e),c=[]):(u+=e,l+=e),1==c.length&&"sp-ws"==c[0]&&(c=[])})),n.trim(l.replace(/\n\s*\n/g,"\n"))};e("./sparql.js"),e("./defaults.js"),l.$=n,l.version={CodeMirror:i.version,YASQE:e("../package.json").version,jquery:n.fn.jquery,"yasgui-utils":s.version}},{"../lib/deparam.js":1,"../lib/grammar/tokenizer.js":3,"../package.json":33,"./autocompleters/autocompleterBase.js":34,"./autocompleters/classes.js":35,"./autocompleters/localNames.js":36,"./autocompleters/properties.js":37,"./autocompleters/sesame-prefixes.js":38,"./autocompleters/standard.js":39,"./autocompleters/variables.js":41,"./curl.js":42,"./defaults.js":43,"./imgs.js":47,"./prefixFold.js":49,"./prefixUtils.js":50,"./sparql.js":51,"./tokenUtils.js":52,"./tooltip":53,"./translate.js":54,"./utils.js":55,codemirror:15,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/edit/closebrackets.js":6,"codemirror/addon/edit/matchbrackets.js":7,"codemirror/addon/fold/brace-fold.js":8,"codemirror/addon/fold/foldcode.js":9,"codemirror/addon/fold/foldgutter.js":10,"codemirror/addon/fold/xml-fold.js":11,"codemirror/addon/hint/show-hint.js":12,"codemirror/addon/runmode/runmode.js":13,"codemirror/addon/search/searchcursor.js":14,jquery:16,"yasgui-utils":30}],49:[function(e,t,r){var n=e("codemirror"),i=e("./tokenUtils.js");function o(e,t,r,i){if(!i||!("#"===i.charAt(0)||i.startsWith('"')&&i.endsWith('"'))){r||(r=0),i||(i=e.getLine(t));for(var o=(i=i.toUpperCase()).length+1,s=r,a=0;;){var l=i.indexOf("PREFIX",s);if(l===o)return;if(o=l,-1!=l){if(1==a&&l<r)break;if(i.length-l>"PREFIX".length&&":"===i.charAt(l+"PREFIX".length))return;if(l>0&&":"===i.charAt(l-1))return;var u=e.getTokenTypeAt(n.Pos(t,l+1));if(!/^(comment|string)/.test(u))return l+1;s=l-1}else{if(1==a)break;a=1,s=i.length}}}}t.exports={findFirstPrefixLine:function(e){for(var t=e.lastLine(),r=0;r<=t;++r)if(o(e,r)>=0)return r}},n.registerHelper("fold","prefix",(function(e,t){if(t){var r=t.line,s=e.getLine(r),a=function(t,r){var o=e.getTokenAt(n.Pos(t,r+1));if(!o||"keyword"!=o.type)return-1;var s=i.getNextNonWsToken(e,t,o.end+1);if(!s||"string-2"!=s.type)return-1;var a=i.getNextNonWsToken(e,t,s.end+1);return a&&"variable-3"==a.type?a.end:-1};if(!function(){for(var t=!1,n=r-1;n>=0;n--)if(e.getLine(n).toUpperCase().indexOf("PREFIX")>=0){t=!0;break}return t}()){var l=o(e,r,t.ch,s);if(null!=l){for(var u,c=!1,p=e.lastLine(),d=a(r,l),f=r,h=r;h<=p&&!c;++h)for(var g=e.getLine(h),E=h==r?l+1:0;;){!c&&g.indexOf("{")>=0&&(c=!0);var m=g.toUpperCase().indexOf("PREFIX",E);if(!(m>=0))break;(u=a(h,m))>0&&(f=h,E=d=u),E++}return{from:n.Pos(r,l+"PREFIX".length),to:n.Pos(f,d)}}}}}))},{"./tokenUtils.js":52,codemirror:15}],50:[function(e,t,r){"use strict";var n=function(e,t){for(var r=null,n=0,o=e.lineCount(),s=0;s<o;s++){var a=e.getNextNonWsToken(s);null==a||"PREFIX"!=a.string&&"BASE"!=a.string||(r=a,n=s)}if(null==r)e.replaceRange("PREFIX "+t+"\n",{line:0,ch:0});else{var l=i(e,n);e.replaceRange("\n"+l+"PREFIX "+t,{line:n})}e.collapsePrefixes(!1)},i=function(e,t,r){null==r&&(r=1);var n=e.getTokenAt({line:t,ch:r});return null==n||null==n||"ws"!=n.type?"":n.string+i(e,t,n.end+1)};t.exports={addPrefixes:function(e,t){var r=e.getPrefixesFromQuery();if("string"==typeof t)n(e,t);else for(var i in t)i in r||n(e,i+": <"+t[i]+">");e.collapsePrefixes(!1)},getPrefixesFromQuery:function(e){for(var t={},r=!0,n=function(i,s){if(r){s||(s=1);var a=e.getNextNonWsToken(o,s);if(a)if(-1==a.state.possibleCurrent.indexOf("PREFIX")&&-1==a.state.possibleNext.indexOf("PREFIX")&&(r=!1),"PREFIX"==a.string.toUpperCase()){var l=e.getNextNonWsToken(o,a.end+1);if(l){var u=e.getNextNonWsToken(o,l.end+1);if(u){var c=u.string;0==c.indexOf("<")&&(c=c.substring(1)),">"==c.slice(-1)&&(c=c.substring(0,c.length-1)),t[l.string.slice(0,-1)]=c,n(i,u.end+1)}else n(i,l.end+1)}else n(i,a.end+1)}else n(i,a.end+1)}},i=e.lineCount(),o=0;o<i&&r;o++)n(o);return t},removePrefixes:function(e,t){for(var r in t)e.setValue(e.getValue().replace(new RegExp("PREFIX\\s*"+r+":\\s*"+("<"+t[r]+">").replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"\\s*","ig"),""));e.collapsePrefixes(!1)}}},{}],51:[function(e,t,r){"use strict";var n=e("jquery"),i=e("./utils.js"),o=e("./main.js");o.getAjaxConfig=function(t,r){var i="function"==typeof r?r:null,a="object"==typeof r?r:{};if(t.options.sparql&&(a=n.extend({},t.options.sparql,a)),a.handlers&&n.extend(!0,a.callbacks,a.handlers),a.endpoint&&0!=a.endpoint.length){var l={url:"function"==typeof a.endpoint?a.endpoint(t):a.endpoint,type:"function"==typeof a.requestMethod?a.requestMethod(t):a.requestMethod,headers:{Accept:s(t,a)}};a.xhrFields&&(l.xhrFields=a.xhrFields);var u=!1;if(a.callbacks)for(var c in a.callbacks)a.callbacks[c]&&(u=!0,l[c]=a.callbacks[c]);if("GET"===l.type){var p=!0;n.each(t.getUrlArguments(a),(function(e,t){l.url+=(p?"?":"&")+t.name+"="+encodeURIComponent(t.value),p=!1}))}else l.data=t.getUrlArguments(a),a.setQueryLimit&&"function"==typeof a.setQueryLimit&&l.data.forEach((function(e){"query"==e.name&&(e.value=a.setQueryLimit(e.value))}));if(u||i){i&&(l.complete=i),a.headers&&!n.isEmptyObject(a.headers)&&n.extend(l.headers,a.headers);var d=new Date,f=[function(){e("./main.js").signal(t,"queryFinish",arguments)},function(){t.lastQueryDuration=new Date-d,o.updateQueryButton(t),t.setBackdrop(!1)}];return l.complete&&(f.push(l.complete),f.push((function(e,t,r){var i={};n.extend(!0,i,l),"update"===window.editor.getQueryMode()&&"ASK"===window.editor.getQueryType()||a.callbacks.countCallback&&"function"==typeof a.callbacks.countCallback&&(i.data=i.data.filter((function(e){return"offset"!==e.name&&"limit"!==e.name})),i.data.push({name:"count",value:"1"}),i.complete=a.callbacks.countCallback),window.editor&&200===e.status&&n.ajax(i)}))),l.complete=f,l}}},o.executeQuery=function(e,t){o.signal(e,"query",e,t),o.updateQueryButton(e,"busy"),e.setBackdrop(!0),e.xhr=n.ajax(o.getAjaxConfig(e,t))},o.getUrlArguments=function(e,t){var r=e.getQueryMode(),o=[{name:i.getString(e,e.options.sparql.queryName),value:t.getQueryForAjax?t.getQueryForAjax(e):e.getValue()}];if(t.namedGraphs&&t.namedGraphs.length>0)for(var s="query"==r?"named-graph-uri":"using-named-graph-uri ",a=0;a<t.namedGraphs.length;a++)o.push({name:s,value:t.namedGraphs[a]});if(t.defaultGraphs&&t.defaultGraphs.length>0)for(s="query"==r?"default-graph-uri":"using-graph-uri ",a=0;a<t.defaultGraphs.length;a++)o.push({name:s,value:t.defaultGraphs[a]});return t.args&&t.args.length>0&&n.merge(o,t.args),o};var s=function(e,t){var r=null;if(!t.acceptHeader||t.acceptHeaderGraph||t.acceptHeaderSelect||t.acceptHeaderUpdate)if("update"==e.getQueryMode())r="function"==typeof t.acceptHeader?t.acceptHeaderUpdate(e):t.acceptHeaderUpdate;else{var n=e.getQueryType();r="DESCRIBE"==n||"CONSTRUCT"==n?"function"==typeof t.acceptHeaderGraph?t.acceptHeaderGraph(e):t.acceptHeaderGraph:"function"==typeof t.acceptHeaderSelect?t.acceptHeaderSelect(e):t.acceptHeaderSelect}else r="function"==typeof t.acceptHeader?t.acceptHeader(e):t.acceptHeader;return r};t.exports={getAjaxConfig:o.getAjaxConfig}},{"./main.js":48,"./utils.js":55,jquery:16}],52:[function(e,t,r){"use strict";var n=function(e,t,r){r||(r=e.getCursor()),t||(t=e.getTokenAt(r));var i=e.getTokenAt({line:r.line,ch:t.start});return null!=i.type&&"ws"!=i.type&&"punc"!=i.type&&null!=t.type&&"ws"!=t.type?(t.start=i.start,t.string=i.string+t.string,n(e,t,{line:r.line,ch:i.start})):null!=t.type&&"ws"==t.type?(t.start=t.start+1,t.string=t.string.substring(1),t):t},i=function(e,t,r){var n=e.getTokenAt({line:t,ch:r.start});return null!=n&&"ws"==n.type&&(n=i(e,t,n)),n},o=function(e,t,r){null==r&&(r=1);var n=e.getTokenAt({line:t,ch:r});return null==n||null==n||n.end<r?null:"ws"==n.type?o(e,t,n.end+1):n};t.exports={getPreviousNonWsToken:i,getCompleteToken:n,getNextNonWsToken:o}},{}],53:[function(e,t,r){"use strict";var n=e("jquery");e("./utils.js"),t.exports=function(e,t,r){var i;(t=n(t)).hover((function(){"function"==typeof r&&(r=r()),i=n("<div>").addClass("yasqe_tooltip").html(r).appendTo(t),o()}),(function(){n(".yasqe_tooltip").remove()}));var o=function(){n(e.getWrapperElement()).offset().top>=i.offset().top&&(i.css("bottom","auto"),i.css("top","26px"))}}},{"./utils.js":55,jquery:16}],54:[function(e,t,r){const n={en:e("./i18n/locale-en"),fr:e("./i18n/locale-fr")};var i="en",o=function(e){const t=i;if(!n||!n[t])return console.warn("Missing locale file for ["+t+"]"),e;let r=n[t][e];return r||(r=n.en[e]),r};t.exports=function(e){return e.on("language-changed",(function(){i=e.options.locale})),e.options.locale&&(i=e.options.locale),o}},{"./i18n/locale-en":45,"./i18n/locale-fr":46}],55:[function(e,t,r){"use strict";var n=e("jquery"),i=function(){function e(e){var t,r,i;return t=n(e).offset(),r=n(e).width(),i=n(e).height(),[[t.left,t.left+r],[t.top,t.top+i]]}function t(e,t){var r,n;return r=e[0]<t[0]?e:t,n=e[0]<t[0]?t:e,r[1]>n[0]||r[0]===n[0]}return function(r,n){var i=e(r),o=e(n);return t(i[0],o[0])&&t(i[1],o[1])}}();t.exports={keyExists:function(e,t){var r=!1;try{void 0!==e[t]&&(r=!0)}catch(e){}return r},getPersistencyId:function(e,t){var r=null;return t&&(r="string"==typeof t?t:t(e)),r},elementsOverlap:i,getString:function(e,t){return"function"==typeof t?t(e):t}}},{jquery:16}]},{},[44])(44)},module.exports=f()}).call(this,__webpack_require__(6))},42:function(e,t){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",r),r.$inject=["$http"];function r(e){return{getConnectors:function(){return e.get("rest/connectors")},initConnector:function(t){return e.get("rest/connectors/options?prefix="+t)},hasConnector:function(t){return e.get("rest/connectors/existing?prefix="+t)},checkConnector:function(t){return e.post("rest/connectors/check",t,{headers:{"Content-Type":"text/plain"}})}}}},45:function(e,t,r){"use strict";r.r(t);r(15),r(42);function n(e){const t=[];return Object.keys(e).forEach((function(r){t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]))})),t.join("&")}function i(e,t){return _.reduce(e,(function(e,r){if(""===r.key&&""===r.value);else{if(""===r.key)throw new Error(t.instant("externalsync.empty.value.key.error",{value:r.value}));if(e.hasOwnProperty(r.key))throw new Error(t.instant("externalsync.duplicate.key.error",{key:r.key}));e[r.key]=r.value}return e}),{})}function o(e,t){for(let n=0;n<t.length;n++){const i=t[n];if("StringArray"===i.__type)e[i.__name]||(e[i.__name]=[""]);else if("OptionArray"===i.__type)if(e[i.__name])for(let t=0;t<i.__childOptions.length;t++){const r=i.__childOptions[t];if("Boolean"===r.__type)for(let t=0;t<e[i.__name].length;t++){const n=e[i.__name][t];!n.hasOwnProperty([r.__name])&&angular.isDefined(r.__defaultValue)&&(n[r.__name]=r.__defaultValue)}}else{e[i.__name]=[];const t={};for(let e=0;e<i.__childOptions.length;e++){const r=i.__childOptions[e];"StringArray"===r.__type?t[r.__name]=[""]:t[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue}e[i.__name].push(t)}else"Map"===i.__type?e[i.__name]?e[i.__name]=(r=e[i.__name],_.map(r,(function(e,t){return{key:t,value:e}}))):e[i.__name]=[]:"JsonString"===i.__type?!e[i.__name]||e[i.__name]instanceof String||"string"==typeof e[i.__name]||(e[i.__name]=angular.toJson(e[i.__name],2)):angular.isUndefined(e[i.__name])&&(e[i.__name]=angular.isUndefined(i.__defaultValue)?"":i.__defaultValue)}var r;return e}function s(e,t,r){return e.post("repositories/"+t,n({query:r}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function a(e){return e.substring(0,e.length-1)+"/instance#"}function l(e,t,r,n,o){const s=function e(t,r){const n={};return _.each(r,(function(r){angular.isDefined(t[r.__name])&&("OptionArray"===r.__type?(n[r.__name]=[],_.each(t[r.__name],(function(t){n[r.__name].push(e(t,r.__childOptions))}))):n[r.__name]=angular.copy(t[r.__name]))})),n}(r,n);for(let e=0;e<n.length;e++)try{"Map"===n[e].__type?s[n[e].__name]=i(s[n[e].__name],$translate):"JsonString"===n[e].__type&&(s[n[e].__name]=angular.fromJson(s[n[e].__name]))}catch(t){return o(n[e].__label,t.message),null}!function e(t){Array.isArray(t)&&(t=_.filter(t,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(t).forEach((function(r){""!==t[r]&&null!=t[r]||!1===t[r]?"object"==typeof t[r]&&(t[r]=e(t[r])):delete t[r]})),t}(s);let l="";l+="PREFIX :<"+t+">\n";return l+="PREFIX inst:<"+a(t)+">\n",l+="INSERT DATA {\n",l+="\tinst:"+e+" :createConnector '''\n",l+=angular.toJson(s,2),l+="\n''' .\n}\n",l=l.replace(/\\/g,"\\\\\\"),l}function u(e,t,r,i,u,c,p,d,f,h){function g(t){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?h.instant("externalsync.repairing"):h.instant("externalsync.creating"),waitOnRepairStartOnce:!!t,eta:"-",inline:!1,iri:null}}function E(t,r,n){return g(n),$.extend(e.beingBuiltConnector,{iri:a(t)+r,name:r,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=i.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function m(t,i,o){const s=E(t.value,i.name,!1);d.addStatements(r.getActiveRepository(),n({update:i.query})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(t.value)).then((function(r){e.existing[t.key]=r.data}))})),u.success(h.instant("created.connector",{name:i.name}))}),(function(e){u.error(getError(e)),o()})).finally((function(){s.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const t=(Date.now()-e.loaderStartTime)/1e3,r=e.getHumanReadableSeconds(t);let n="";return n=e.progressMessage?e.progressMessage+"... "+r:h.instant("common.running.operation",{timeHuman:r}),e.extraMessage&&t>10&&(n+="\n"+e.extraMessage),n},e.setLoader=function(t,r,n){t?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=r,e.extraMessage=n):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(t){return f.initConnector(encodeURIComponent(t.value)).then((function(r){return e.definitions[t.key]=r.data,f.hasConnector(encodeURIComponent(t.value)).then((function(r){e.existing[t.key]=r.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,h.instant("externalsync.fetching.connectors"),h.instant("common.extra.message")),f.getConnectors().then((function(n){e.connectors=Object.keys(n.data).map((function(e){return{key:e,value:n.data[e]}})),p.all(_.map(e.connectors,(function(t){return e.initConnector(t)}))).finally((function(){g();const n=function(e){const t=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return t?"SELECT ?connector ?status { ?connector "+t+" ?status }":null}(e.connectors);n?function(e){return s(t,r.getActiveRepository(),e)}(n).then((function(t){const r=function(e){if(e.bindings)for(let t=0;t<e.bindings.length;t++)try{const r=JSON.parse(e.bindings[t].status.value);if("BUILDING"===r.status)return{connector:e.bindings[t].connector.value,status:r}}catch(e){console.error(e)}return{}}(t.data.results);if(r.connector){const t=r.connector.split(/#/);t[0]=t[0].replace(/\/instance$/,"#"),n=t[0],i=t[1],g(),$.extend(e.beingBuiltConnector,{iri:a(n)+i,name:i,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var n,i})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(t){e.setLoader(!1),u.error(getError(t),h.instant("externalsync.could.not.get.connectors.error"))})),e.existing={})},e.getOptions=function(t){return e.definitions[t.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return r.getActiveRepository()}),e.getConnectors),e.$watch((function(){return r.getActiveLocation()}),e.getConnectors),e.copyConnector=function(t,r){let n;angular.isUndefined(r)||(n=angular.copy(r),n.name=n.name+"-copy");i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(n)?{name:"",values:{}}:n},options:function(){return e.getOptions(t)}}}).result.then((function(r){m(t,r,(function(){r.skipConversion=!0,e.newConnector(t,r)}))}))},e.newConnector=function(t,r){i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(r)?{name:"",values:{}}:r},options:function(){return e.getOptions(t)}}}).result.then((function(r){m(t,r,(function(){r.skipConversion=!0,e.newConnector(t,r)}))}))},e.repair=function(t,i){c.openSimpleModal({title:h.instant("externalsync.confirm.repair"),message:h.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const o=E(i.value,t.name,!0),s=(l=t.name,"PREFIX prefix:<"+(c=i.value)+">\nINSERT DATA {\n\t<"+a(c)+l+'> prefix:repairConnector ""\n}');var l,c;d.addStatements(r.getActiveRepository(),n({update:s})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(i.value)).then((function(t){e.existing[i.key]=t.data}))})),u.success(h.instant("externalsync.repair.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){o.dismiss("cancel")}))}))},e.delete=function(t,o){const s=o.key.indexOf("Elastic")>=0||o.key.indexOf("Solr")>=0;i.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return s?h.instant("delete.connector.conditional",{type:o.key}):""}}}).result.then((function(i){e.setLoader(!0,h.instant("externalsync.delete.progress.msg",{name:t.name}),h.instant("externalsync.extra.message.warning"));const a=function(e,t,r){const n=t.substring(0,t.length-1)+"/instance#";return"PREFIX prefix:<"+t+">\nINSERT DATA {\n\t<"+n+e+'> prefix:dropConnector "'+(r?"force":"")+'"\n}'}(t.name,o.value,i);d.addStatements(r.getActiveRepository(),n({update:a})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(o.value)).then((function(t){e.existing[o.key]=t.data}))})),i?(u.success(h.instant("externalsync.delete.force.success.msg",{name:t.name})),s&&u.warning(h.instant("externalsync.delete.remote.warning",{key:o.key}))):u.success(h.instant("externalsync.delete.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(t,r){i.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const n=e.getOptions(t);return l(r.name,t.value,o(r.values,n),n)}}})}}function c(e,t,r){e.force=!1,e.popoverMsg=r,e.ok=function(){t.close(e.force)},e.cancel=function(){t.dismiss()}}function p(e,t,r,n,i){function o(){return l(e.name,r.value,e.values,e.options,(function(e,t){i.error(t,e)}))}e.connector=r,e.addField=function(t,r){const n=angular.copy(e.defaultValues[r][0]);e.values[r].splice(t+1,0,n)},e.addOption=function(e,t){t.splice(e+1,0,"")},e.deleteOption=function(e,t){t.splice(e,1)},e.addMapOption=function(e,t){t.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,t){t.splice(e,1)},e.ok=function(){if(e.form.$valid){const r=o();r&&t.close({name:e.name,values:e.values,options:e.options,query:r})}},e.viewQuery=function(){const e=o();e&&n.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){t.dismiss("cancel")}}function d(e,t,r,n,i,s,a,l){angular.extend(this,t("ExtendNewConnectorCtrl",{$scope:e,$uibModalInstance:n,connector:i,$uibModal:s})),e.values=a.values,e.options=l,e.name=a.name,a.skipConversion||(e.values=o(e.values,e.options)),e.defaultValues=angular.copy(e.values)}function f(e,t,r,n,i){function o(){const o=function(e){const t=e.replace(/\/instance#.+$/,"#connectorStatus");let r="";return r+="SELECT ?status {\n",r+="\t<"+e+"> <"+t+"> ?status",r+="\n}",r}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=t((function(){(function(e){return s(r,n.getActiveRepository(),e)})(o).then((function(r){const n=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(r.data.results);"BUILDING"===n.status?(e.beingBuiltConnector.status=n,e.beingBuiltConnector.percentDone=(100*n.processedEntities/n.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(n.etaSeconds),e.beingBuiltConnector.actionName=n.repair?i.instant("externalsync.repairing"):i.instant("externalsync.creating"),e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==n.status||e.beingBuiltConnector.waitOnRepairStartOnce||(t.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){t.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&o(),e.$watch("beingBuiltConnector.iri",(function(t){e.beingBuiltConnector.inline&&t&&o()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",p).controller("CreateConnectorCtrl",d).controller("CreateProgressCtrl",f).controller("DeleteConnectorCtrl",c).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],c.$inject=["$scope","$uibModalInstance","popoverMsg"],p.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],d.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],f.$inject=["$scope","$interval","$http","$repositories","$translate"]},56:function(e,t,r){"use strict";r.r(t);r(5),r(17);var n=r(0);function i(e,t,r,i,o,s,a,l,u,c,p,d,f,h,g){const E={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let m,v;function x(t){!function(){if(i.isActiveRepoOntopType())return;const t=document.getElementById("sameAs");!t||e.currentQuery.inference||t.disabled?e.currentQuery.inference&&t.disabled&&(t.removeAttribute("disabled"),e.currentQuery.sameAs=m.appSettings.DEFAULT_SAMEAS):(t.disabled=!0,e.currentQuery.sameAs=!1)}(),e.tabs.forEach((function(r,n){r.id===t.id&&(e.tabs[n].query=t.query,i.isActiveRepoOntopType()||(e.tabs[n].inference=t.inference,e.tabs[n].sameAs=t.sameAs))})),f.set(h.TABS_STATE,e.tabs)}function y(t,r,n,i){const o=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=r,e.extraMessage=n,e.noLoaderTimer=i,o.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,o.removeClass("hide")),null===e.$$phase&&e.$apply()}function T(r){function n(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=n()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=n()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let n;n=t(r?function(){e.fixSizesOnHorizontalViewModeSwitch(r)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(n)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function N(){T(!0)}function L(t,r){r.newRepo&&(e.tabsData=f.get(h.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),f.set(h.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function I(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function C(n,o){if(e.executedQueryTab=e.currentQuery,o){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType())return void r.warning(g.instant("query.editor.warning.msg"));if(i.isActiveRepoOntopType())return void r.warning(g.instant("query.editor.virtual.repo.warning.msg"))}if(e.explainRequested=o,!e.queryIsRunning){if(n?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&i.isActiveRepoOntopType())return void r.warning(g.instant("query.editor.virtual.repo.update.warning.msg"));if(y(!0,"update"===e.lastRunQueryMode?g.instant("query.editor.executing.update"):g.instant("query.editor.evaluating.query")),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const r=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(r)}))}else window.editor.query()}}function S(){e.showSampleQueries=!e.showSampleQueries,e.showSampleQueries?a.getSavedQueries().success((function(t){e.sampleQueries=t,$("#sampleQueriesCollapse").collapse("show").width("300px")})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.get.saved.queries.error"))})):$("#sampleQueriesCollapse").collapse("hide")}function A(t){let r=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return r=e.id,e})),r}function R(t){return function(r,n,i){e.savedQuery={name:r,query:n||window.editor.getValue(),shared:i},$(t).modal("show")}}function b(t){for(let r=0;r<e.tabsData.length;r++){if(e.tabsData[r].id===t)return r}}e.getPrincipal=function(){return c.getPrincipal().then(t=>{m=t,function(e,t){E.inference=t.appSettings.DEFAULT_INFERENCE,E.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=f.get(h.TABS_STATE)||[E],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,r){x(r.currentQuery)})),e.$on("repositoryIsSet",L)}(e,m)})},e.getPrincipal(),this.hint=document.createElement("span"),this.hint.innerHTML=g.instant("query.editor.autocomplete.hint"),this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const r=b(t);if(void 0===r)return{};const n=e.tabsData[r];return e.saveQueryToLocal(n),n},e.loadTab=function(r){e.tabsData=f.get(h.TABS_STATE)||[E];const n=b(r),o=e.tabsData[n];o.yasrData&&y(!0,g.instant("query.editor.render.results.msg"),null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=o.outputType,o.yasrData&&(o.yasrData.customError?(e.yasr.results={getException:function(){return o.yasrData.customError}},y(!1)):t((function(){e.setYasrResponse(o.yasrData,o.textStatus,o.jqXhrOrErrorString),y(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),f.set(h.TABS_STATE_CURRENT_ID,r),e.currentQuery=o,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=o.queryType,e.currentTabConfig.resultsCount=o.resultsCount,e.currentTabConfig.offset=o.offset,e.currentTabConfig.allResultsCount=o.allResultsCount,e.currentTabConfig.allResultsCountExact=o.allResultsCountExact,e.currentTabConfig.page=o.page,e.currentTabConfig.pageSize=o.pageSize,e.currentTabConfig.timeFinished=o.timeFinished,e.currentTabConfig.timeTook=o.timeTook,e.currentTabConfig.sizeDelta=o.sizeDelta,e.currentTabConfig.customUpdateMessage=o.customUpdateMessage,e.currentTabConfig.errorMessage=o.errorMessage,e.currentTabConfig.warningMessage=o.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),v||(v=setInterval(P,200));!function(){const t=i.isActiveRepoOntopType(),r=i.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),r=document.getElementById("inference");t&&(t.disabled=!!e);r&&(r.disabled=!!e)})(t),e.nocount=!(!t&&!r)||!m.appSettings.EXECUTE_COUNT,t&&(e.currentQuery.inference=!0,e.currentQuery.sameAs=!0)}()},e.addNewTab=function(r,n,i){if(!D(!0))return;let o;o=n||i?{id:"1",name:n,query:i,inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS};O++;const s=""+O;e.tabsData=e.tabs;const a=o;a.id=s,e.tabsData.push(a),f.set(h.TABS_STATE_MAXID,O),f.set(h.TABS_STATE,e.tabsData);const l=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),I(s),r&&r.apply(this,l)}),0),e.tabs=e.tabsData},e.isTabChangeOk=D,e.runQuery=C,e.abortCurrentQuery=function(){d.deleteQuery(e.currentTrackAlias,i.getActiveRepository()).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.edit.saved.query",{name:t.name}),query:t,edit:!0,okButtonText:g.instant("common.save.btn")}}}}).result.then((function(n){const i={name:n.name,body:n.body,shared:n.shared};t.name!==n.name?a.addNewSavedQuery(i).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.edit.saved.query.error"))})):a.editSavedQuery(i).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),r.success(g.instant("query.editor.edit.saved.query.success.msg",{name:t.name}))})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.edit.saved.query.error"))}))}))},e.getNamespaces=function(){y(!0,g.instant("common.refreshing.namespaces"),g.instant("common.extra.message")),e.namespacesLoading=!0,p.getRepositoryNamespaces().success((function(t){const r={};t.results.bindings.forEach((function(e){r[e.prefix.value]=e.namespace.value})),e.namespaces=r})).error((function(t){e.repositoryError=getError(t)})).finally((function(){y(!1),e.namespacesLoading=!1}))},e.changePagination=function(){C(!0,e.explainRequested)},e.toggleSampleQueries=S,e.addKnownPrefixes=function(){a.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return r.error(t,g.instant("common.add.known.prefixes.error")),!0}))},e.getExistingTabId=A,e.querySelected=function(t){const r=A(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(r)?I(r):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){s.openSimpleModal({title:g.instant("common.confirm"),message:g.instant("query.editor.delete.saved.query.warning.msg",{savedQueryName:t}),warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,n){a.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),n||r.success(g.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t}))})).error((function(e){const t=getError(e);r.error(t,g.instant("query.editor.delete.saved.query.error"))}))},e.saveQuery=function(t,r){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.create.saved.query.msg"),query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:g.instant("common.create.btn"),queryExists:r,existingQueryErrMsg:Object(n.decodeHTML)(g.instant("query.sample.existing.query.warning",{name:t.name}))}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){a.addNewSavedQuery(t).success((function(){r.success(g.instant("query.editor.save.saved.query.success.msg",{name:t.name}))})).error((function(n,i){const o=getError(n);r.error(o,g.instant("query.editor.create.saved.query.error"));let s=!1;409===i&&(s=!0),t.query=t.body,e.saveQuery(t,s)}))},e.saveQueryToLocal=x,e.setLoader=y,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let r="",n="";e.noLoaderTimer||(r=e.getHumanReadableSeconds(t));n=e.progressMessage?g.instant("query.editor.progress.msg",{progressMessage:e.progressMessage,timeHuman:r}):g.instant("common.running.operation",{timeHuman:r});e.extraMessage&&t>10&&(n+=g.instant("query.editor.extra.msg",{extraMessage:e.extraMessage}));return n},e.fixSizesOnHorizontalViewModeSwitch=T,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,f.set(h.VIEW_MODE,e.orientationViewMode),T()},e.showHideEditor=N,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!f.get(h.VIEW_MODE)||"true"===f.get(h.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return i.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return i.getActiveRepository()},e.orientationViewMode||N(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs),clearInterval(v)})),e.$on("$destroy",(function(){clearInterval(v),window.editor=null,window.yasr=null})),$(document).mouseup((function(t){const r=$("#sampleQueriesCollapse");!r.is(t.target)&&0===r.has(t.target).length&&e.showSampleQueries&&S()}));let O=f.get(h.TABS_STATE_MAXID)||1;function w(e){return $(e).attr("data-id")}function P(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function D(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?r.info(g.instant("query.editor.new.tab.running.query.warning.msg")):r.info(g.instant("query.editor.tab.switching.running.query.warning.msg")),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(r,n){n.relatedTarget&&(t.cancel(n.relatedTarget.timer),$(n.relatedTarget).css("color",""),e.saveTab(w(n.relatedTarget))),e.loadTab(w(n.target));const i=["var(--onto-orange)","","var(--onto-orange)"],o=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let r=0;$(n.target).css("color",i[r]);const s=function(){r++,r<i.length?($(n.target).css("color",i[r]),n.target.timer=t(s,o[r])):$(n.target).css("color","")};t(s,o[r])}})),e.$on("deleteAllexeptSelected",(function(t,r){e.tabsData=r,e.tabs=r})),e.currentQuery={},e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.editQueryModal=R("#editQueryContainer"),e.deleteQueryModal=R("#confirmDeleteContainer"),e.saveQueryModal=R("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const r=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t=g.instant("query.editor.showing.results.from.msg")+l("currency")(e.currentTabConfig.offset,"",0)+g.instant("query.editor.to")+l("currency")(r,"",0),e.currentTabConfig.allResultsCount>0&&(t+=g.instant(e.currentTabConfig.allResultsCountExact?"query.editor.of":"query.editor.of.at.least"),t+=l("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?g.instant(e.currentTabConfig.customUpdateMessage.msg,{name:e.currentTabConfig.customUpdateMessage.name}):void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?g.instant("yasr.removed.statements.result.msg",{sizeDelta:Math.abs(e.currentTabConfig.sizeDelta)}):e.currentTabConfig.sizeDelta>0?g.instant("yasr.added.statements.result.msg",{sizeDelta:e.currentTabConfig.sizeDelta}):g.instant("yasr.statements.no.change.msg")},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return g.instant("yasr.stale.result.msg",{secondsAgo:e.getHumanReadableSeconds(t)})};const _=function(){};angular.element(u).bind("resize",_),e.$on("$destroy",(function(){angular.element(u).unbind("resize",_)}))}function o(e,t,r,n){r.queryExists&&(e.queryExists=!0),e.query=angular.copy(r.query),e.title=r.title,e.edit=r.edit,e.okButtonText=r.okButtonText,e.existingQueryErrMsg=n.trustAsHtml(r.existingQueryErrMsg),e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",i).controller("QuerySampleModalCtrl",o),i.$inject=["$scope","$timeout","toastr","$repositories","$uibModal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","$translate"],o.$inject=["$scope","$uibModalInstance","data","$sce"]},57:function(e,t,r){"use strict";r.r(t);r(42),r(5),r(45);var n=r(262),i=r.n(n),o=r(261),s=r.n(o),a=r(0),l=r(58);function u(e,t,r,n,o,u,c,p,d,f,h,g,E,m,v){let x;return{restrict:"AE",scope:!1,templateUrl:"js/angular/core/directives/queryeditor/templates/query-editor.html",link:function(y,T,N){y.nostorage=N.hasOwnProperty("nostorage"),y.notabs=N.hasOwnProperty("notabs"),y.notoolbar=N.hasOwnProperty("notoolbar"),y.notoolbarSaved=N.hasOwnProperty("notoolbarSaved"),y.notoolbarCopy=N.hasOwnProperty("notoolbarCopy"),y.notoolbarInference=N.hasOwnProperty("notoolbarInference"),y.notoolbarSameAs=N.hasOwnProperty("notoolbarSameAs"),y.nostatus=N.hasOwnProperty("nostatus"),y.norun=N.hasOwnProperty("norun"),y.enableColumnResizingOnWindowWidth=N.hasOwnProperty("enableColumnResizingOnWindowWidth"),y.runButtonName="query.editor.run.btn",N.runButtonName&&(y.runButtonName=N.runButtonName);if(y.nocount="true"===N.nocount,N.callbackOnChange){const e=y[N.callbackOnChange];"function"==typeof e&&(x=e)}e((function(){!function(y){function T(){angular.element("#wb-sparql-saveQuery")[0].click()}function N(){y.runQuery(!1,!1)}function L(){y.runQuery(!1,!0)}function I(){if(y.tabs.length<2||!y.currentQuery.id||!y.isTabChangeOk(!1))return;let e=F(y.currentQuery.id);e=(e+1)%y.tabs.length;S(y.tabs[e].id)}function C(){if(y.tabs.length<2||!y.currentQuery.id||!y.isTabChangeOk(!1))return;let e=F(y.currentQuery.id);e--,-1===e&&(e=y.tabs.length-1);S(y.tabs[e].id)}function S(t){e((function(){let e=$('a[data-id = "'+t+'"]');0===e.length&&(e=$("a[data-id]").first()),e.tab("show")}),0)}y.changePagination=function(){y.runQuery(!0,y.explainRequested)},window.editor=i.a.fromTextArea(document.getElementById("query"),{persistent:null,value:"",indentUnit:4,createShareLink:null,cursorHeight:1,sparql:{showQueryButton:!1,acceptHeaderGraph:"application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8",acceptHeaderSelect:"application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8"},extraKeys:{"Ctrl-Enter":N,"Cmd-Enter":N,"Shift-Ctrl-Enter":L,"Shift-Cmd-Enter":L,"Ctrl-Alt-T":y.addNewTab,"Cmd-Alt-T":y.addNewTab,"Ctrl-S":T,"Cmd-S":T,"Ctrl-Alt-Left":C,"Cmd-Alt-Left":C,"Ctrl-Alt-Right":I,"Cmd-Alt-Right":I},locale:m.getLanguage()}),window.editor.toastBuildIndex=function(){const e=Object(a.decodeHTML)(E.instant("explore.autocomplete.warning.msg"));r.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})},window.editor.toastError=function(e){r.error("Cannot execute autocomplete query. "+getError(e))},window.editor.on("update",(function(){angular.element(".parseErrorIcon").parent().css("z-index","10")})),window.editor.on("changes",(function(){angular.element(".CodeMirror-linenumbers").css("width","1px"),angular.element(".CodeMirror-sizer").css("margin-left","0px"),clearTimeout(y.changesTimeout);const e=!window.editor.queryValid;y.changesTimeout=setTimeout(x?x():function(){const t=F(y.currentQuery.id)+1;$('a[data-id = "'+t+'"]').toggleClass("query-has-error",e).attr("title",e?E.instant("query.editor.query.syntax.error"):"")},200),y.currentQuery.query=window.editor.getValue(),y.currentQuery.queryType=window.editor.getQueryType()})),$(".fullscreenToggleBtns").hide();const A=function(e){$(e.target).removeClass("fa-link").addClass("fa-check").blur(),setTimeout((function(){$(e.target).removeClass("fa-check").addClass("fa-link")}),1e3)};window.onbeforeunload=function(){y.nostorage||h.set(g.TABS_STATE,y.tabs),y.saveTab(y.currentQuery.id)};const R=i.a.executeQuery,b=i.a.getUrlArguments;function O(e,t,r){return{status:e,statusText:t,responseText:r}}let w,P;y.$on("$destroy",(function(){y.nostorage||h.set(g.TABS_STATE,y.tabs),i.a.executeQuery=R,i.a.getUrlArguments=b,y.saveTab(y.currentQuery.id)})),i.a.drawButtons=function(e){e.buttons=$("#yasqe_buttons_mocked")},i.a.getActiveRepository=function(){return n.getActiveRepository()},i.a.getUrlArguments=function(e,t){const r=b(e,t),n=window.editor.getQueryType();return"SELECT"!==n&&"CONSTRUCT"!==n&&"DESCRIBE"!==n||(r.push({name:"limit",value:y.currentTabConfig.pageSize+1}),y.currentTabConfig.offset=(y.currentTabConfig.page-1)*y.currentTabConfig.pageSize+1,r.push({name:"offset",value:y.currentTabConfig.offset-1})),!y.explainRequested||"SELECT"!==n&&"CONSTRUCT"!==n||r.push({name:"explain",value:"true"}),r},i.a.executeQuery=function(e){if(P&&$(P.resultsContainer).length&&$(P.resultsContainer).empty(),e.options.sparql.headers["X-GraphDB-Catch"]=y.currentTabConfig.pageSize+"; throw",y.currentTrackAlias="query-editor-"+performance.now()+"-"+Date.now(),e.options.sparql.headers["X-GraphDB-Track-Alias"]=y.currentTrackAlias,e.options.sparql.headers["X-GraphDB-Repository-Location"]=n.getActiveRepositoryObject().location,y.countTimeouted=!1,"query"===e.getQueryMode()?e.options.sparql.endpoint="repositories/"+n.getActiveRepository():"update"===e.getQueryMode()&&(e.options.sparql.endpoint="repositories/"+n.getActiveRepository()+"/statements"),e.options.sparql.args=[{name:"infer",value:y.currentQuery.inference},{name:"sameAs",value:y.currentQuery.sameAs}],y.currentTabConfig.customUpdateMessage="","update"!==window.editor.getQueryMode()){const t=y.currentTabConfig,r=y.executedQueryTab.id;return window.editor.options.sparql.handlers.countCallback=function(e,n,i){if(200===e.status){const o=y.tabs[F(r)];o&&(P.setResultsCount(e,n,i),t.allResultsCount=P.allCount,o.allResultsCount=P.allCount,t.allResultsCountExact=!0,o.allResultsCountExact=!0,y.saveTab(o.id))}else t.countTimeouted=!0},null!=y.currentQuery.outputType?P.options.output=y.currentQuery.outputType:P.options.output="table",y.currentTabConfig.queryType=window.editor.getQueryType(),y.queryStartTime=(new Date).getTime(),R(e,{setQueryLimit:function(e){return"CONSTRUCT"===y.currentTabConfig.queryType&&n.isActiveRepoOntopType()?window.editor.getValueWithoutComments():e}})}{const t=function(){y.currentTabConfig.queryType="UPDATE",d.getRepositorySize().success((function(t){return y.repoSize=parseInt(t),y.queryStartTime=(new Date).getTime(),R(e,{})})).error((function(t){return r.warning(E.instant("query.editor.repo.size.error",{repo:n.getActiveRepository(),error:getError(t)})),y.queryStartTime=(new Date).getTime(),R(e,{})}))};f.checkConnector(window.editor.getValue()).then((function(e){if(e.data.command&&!e.data.hasSupport){y.currentTabConfig.queryType="ERROR",y.currentTabConfig.timeFinished=Date.now(),y.currentTabConfig.timeTook=(y.currentTabConfig.timeFinished-y.queryStartTime)/1e3;const t=E.instant("query.editor.inactive.plugin.warning.msg",{connectorName:e.data.connectorName,pluginName:e.data.pluginName}),r=O(-1,t,t);return P.results={getException:function(){return r}},y.setLoader(!1),void M({customError:r},"",null)}if("create"===e.data.command||"repair"===e.data.command){const t="repair"===e.data.command;t?(y.setLoader(!0,E.instant("query.editor.repairing.connector",{name:e.data.name})),y.currentTabConfig.customUpdateMessage={msg:"query.editor.repaired.connector",name:e.data.name}):(y.setLoader(!0,E.instant("query.editor.creating.connector",{name:e.data.name})),y.currentTabConfig.customUpdateMessage={msg:"created.connector",name:e.data.name});const r=y.$new(!0);r.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?E.instant("externalsync.repairing"):E.instant("externalsync.creating"),eta:"-",inline:!1,iri:e.data.iri,name:e.data.name,doneCallback:function(){w.dismiss("cancel")}},r.getHumanReadableSeconds=y.getHumanReadableSeconds,w=c.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:r})}else"drop"===e.data.command&&(y.setLoader(!0,E.instant("externalsync.delete.progress.msg",{name:e.data.name})),y.currentTabConfig.customUpdateMessage={msg:"externalsync.delete.success.msg",name:e.data.name});t()}),(function(){t()}))}};const D=i.a.getAjaxConfig;function M(e,t,r){e.getResponseHeader&&e.getResponseHeader("content-type")&&(e.contentType=e.getResponseHeader("content-type")),delete e.response;const n=F(y.executedQueryTab.id),i=y.tabs[n],o={queryType:y.currentTabConfig.queryType,yasrData:e,textStatus:t,jqXhrOrErrorString:r,page:y.currentTabConfig.page,pageSize:y.currentTabConfig.pageSize,allResultsCount:y.currentTabConfig.allResultsCount,allResultsCountExact:y.currentTabConfig.allResultsCountExact,resultsCount:y.currentTabConfig.resultsCount,offset:y.currentTabConfig.offset,timeTook:y.currentTabConfig.timeTook,timeFinished:y.currentTabConfig.timeFinished,sizeDelta:y.currentTabConfig.sizeDelta,customUpdateMessage:y.currentTabConfig.customUpdateMessage,errorMessage:y.currentTabConfig.errorMessage,warningMessage:y.currentTabConfig.warningMessage};"ERROR"!==y.currentTabConfig.queryType&&"UPDATE"!==y.currentTabConfig.queryType&&"ASK"!==y.currentTabConfig.queryType&&(o.outputType=y.yasr.options.output),angular.extend(y.currentQuery,o),angular.extend(i,o),y.nostorage||h.set(g.TABS_STATE,y.tabs),$('a[data-id = "'+y.executedQueryTab.id+'"]').tab("show")}function k(){var e=P.results.getBindings(),t=P.results.getVariables(),r=e[0],n=t[0];if(1===t.length&&1===e.length&&"plan"===n&&r[n].value.includes("# NOTE: Optimization groups")){var o=document.getElementsByClassName("nonUri")[0];o.classList.add("cm-s-default"),o.setAttribute("id","highlighted_output");var s=o.innerText.substring(1,o.innerText.length-1);o.innerHTML="",i.a.runMode(s,"sparql11",document.getElementById("highlighted_output"))}}function F(e){for(let t=0;t<y.tabs.length;t++){if(y.tabs[t].id===e)return t}}function G(e){return angular.isDefined(e)&&"false"!==e}i.a.getAjaxConfig=function(e,t){const r=D(e,t);let n=p.getAuthToken();return n&&_.extend(r.headers,{Authorization:n}),r},y.copyToClipboardQuery=function(e,t){u.openCopyToClipboardModal(function(e,t){let r=[location.protocol,"//",location.host,location.pathname].join("");return e?(r=r+"?savedQueryName="+encodeURIComponent(e),null!=t&&(r+="&owner="+encodeURIComponent(t))):r=r+"?"+$.param({name:y.currentQuery.name,infer:y.currentQuery.inference,sameAs:y.currentQuery.sameAs,query:window.editor.getValue()}),r}(e,t))},y.copyToClipboardResult=function(e){u.openCopyToClipboardModal(e)},y.goToVisual=function(){const e={query:window.editor.getValue(),sameAs:y.currentQuery.sameAs,inference:y.currentQuery.inference};t.path("graphs-visualizations").search(e)},$("textarea").on("paste",(function(){e((function(){y.addKnownPrefixes()}),0)})),y.$on("language-changed",(function(e,t){P&&P.options&&(P.options.locale=t.locale,P.changeLanguage(t.locale)),window.editor.options.locale=t.locale,i.a.signal(window.editor,"language-changed")})),function(){y.$on("$destroy",(function(){P&&P.destroy()}));const t={getUsedPrefixes:{},persistency:!1,locale:m.getLanguage()};y.enableColumnResizingOnWindowWidth&&(t.pluginsOptions=l.YasrUtils.getYasrConfiguration()),P=s()(document.getElementById("yasr"),t),window.yasr=P,P.afterCopy=A,P.getQueryResultsAsFormat=function(e){const t=$("#wb-download");t.attr("action","repositories/"+n.getActiveRepository()),$("#wb-download-query").val(y.currentQuery.query),window.editor.getValue()!==y.currentQuery.query&&r.warning(E.instant("query.editor.query.results.mismatch")),$("#wb-download-infer").val(y.currentQuery.inference),$("#wb-download-sameAs").val(y.currentQuery.sameAs);const i=localStorage.getItem("com.ontotext.graphdb.auth");i&&$("#wb-auth-token").val(i),$("#wb-download-accept").val(e),t.submit()},window.editor.options.sparql.handlers.complete=function(t,i,o){function s(){M(t,i,o)}if(w&&w.dismiss("cancel"),null===window.editor)return void y.setLoader(!1);if(y.currentTabConfig.errorMessage=t.getResponseHeader("X-GraphDB-Error"),y.currentTabConfig.warningMessage=t.getResponseHeader("X-GraphDB-Warning"),P.currentQuery=y.currentQuery,y.currentTabConfig.timeFinished=Date.now(),y.currentTabConfig.timeTook=(y.currentTabConfig.timeFinished-y.queryStartTime)/1e3,t.status>=400)return t.responseText=t.responseText.replace(/^([^: ]+: )+/,""),y.currentTabConfig.queryType="ERROR",s(),y.setYasrResponse(t,i,o),void y.setLoader(!1);if(0===t.status){y.currentTabConfig.queryType="ERROR";const e=O(-1,E.instant("aborted.request.msg"),E.instant("aborted.request.no.results.msg"));return P.results={getException:function(){return e}},y.setLoader(!1),void M({customError:e},"",null)}let a;if(y.setLoader(!1),"update"===window.editor.getQueryMode())a=function(){d.getRepositorySize().success((function(e){let t;void 0!==y.repoSize&&(t=Number(e)-y.repoSize),y.currentTabConfig.sizeDelta=t,s()})).error((function(e){r.warning(E.instant("query.editor.repo.size.error",{repo:n.getActiveRepository(),error:getError(e)})),y.currentTabConfig.sizeDelta=void 0,s()}))};else{if(200===t.status){const e=t.getResponseHeader("Content-Type");0!==e.indexOf("application/sparql-results+json")&&0!==e.indexOf("application/x-sparqlstar-results+json")&&0!==e.indexOf("application/x-graphdb-table-results+json")||t.responseJSON.results&&(y.currentTabConfig.resultsCount=t.responseJSON.results.bindings.length,t.responseJSON.results.bindings.length>y.currentTabConfig.pageSize&&(t.responseJSON.results.bindings.length=y.currentTabConfig.pageSize),y.currentTabConfig.allResultsCountExact||((y.nocount||y.countTimeouted||y.currentTabConfig.resultsCount<=y.currentTabConfig.pageSize)&&(t.status=204),y.currentTabConfig.allResultsCount=Math.max(y.currentTabConfig.allResultsCount,y.currentTabConfig.pageSize*(y.currentTabConfig.page-1)+y.currentTabConfig.resultsCount),y.currentTabConfig.resultsCount<=y.currentTabConfig.pageSize&&(y.currentTabConfig.allResultsCountExact=!0)))}y.setLoader(!0,E.instant("query.editor.render.results.msg"),null,!0),a=function(){y.setYasrResponse(t,i,o),s(),y.setLoader(!1)}}e((function(){a(),"CONSTRUCT"!==window.editor.getQueryType()?($(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$(".yasr_btnGroup.nav.nav-tabs li.disabled a").addClass("disabled").css("font-weight","200"),"DESCRIBE"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a").removeClass("disabled").css("font-weight","400")):"CONSTRUCT"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$("#yasr").css("padding","0"),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&e((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),100),$("#wb-sparql-addNewTab").click((function(){$(".dataTables_filter").hide(),$(".resultsTable").hide()}))}),100)},window.editor.options.sparql.handlers.resetResults=function(){},y.yasr=P,y.setYasrResponse=function(e,t,r){e.responseJSON&&(e.response=e.responseJSON,e.responseText=void 0),window.yasr.plugins.table.options.highlightLiteralCellResult=k,P.setResponse(e,t,r)},y.$watch("yasr.options.output",(function(e){if(e&&"UPDATE"!==y.currentTabConfig.queryType&&"ASK"!==y.currentTabConfig.queryType){const t=y.tabs[F(y.currentQuery.id)];angular.isDefined(t)&&y.currentTabConfig.queryType&&t.outputType!==e&&(t.outputType=y.currentQuery.outputType=e,y.saveTab(t.id))}})),y.$watch("namespaces",(function(){y.namespaces&&(P&&P.options&&y.namespaces&&(P.options.getUsedPrefixes=y.namespaces),i.a.signal(window.editor,"namespacesChanged",y.namespaces))}))}(),$(document).mouseup((function(e){const t=$("#sampleQueriesCollapse");!t.is(e.target)&&0===t.has(e.target).length&&y.showSampleQueries&&y.toggleSampleQueries()}));const U=e=>{t.search("execute",null),e&&y.runQuery(!1)};function B(e,r,n){const i=y.getExistingTabId(e),o=y.$on("tabLoaded",(function(){angular.isDefined(r)&&(y.currentQuery.inference=G(r)),angular.isDefined(n)&&(y.currentQuery.sameAs=G(n)),G(t.search().execute)&&("update"===window.editor.getQueryMode()?u.openSimpleModal({title:E.instant("confirm.execute"),message:Object(a.decodeHTML)(E.instant("query.editor.automatically.execute.update.warning")),warning:!0}).result.then((function(){U(!0)}),(function(){U(!1)})):y.runQuery(!1)),o()}));y.highlightNextTabChange=!0,angular.isDefined(i)?S(i):y.addNewTab(null,e.name,e.body)}function V(){if(t.search().savedQueryName)e=t.search().savedQueryName,n=t.search().owner,i=t.search().infer,s=t.search().sameAs,o.getSavedQuery(e,n).success((function(e){B(e,i,s)})).error((function(t){r.error(E.instant("query.editor.missing.saved.query.data.error",{savedQueryName:e,error:getError(t)}))}));else if(t.search().query){B({name:t.search().name,body:t.search().query},t.search().infer,t.search().sameAs)}else if(v.isActive())y.addNewTab();else{S(h.get(g.TABS_STATE_CURRENT_ID))}var e,n,i,s}function j(){y.getNamespaces(),i.a.signal(window.editor,"repositoryOrAuthorizationChanged",n.getActiveRepository(),p.getAuthToken()),V()}n.getActiveRepository()&&j();y.$on("repositoryIsSet",(function(){n.getActiveRepository()&&j()})),e((function(){angular.element(document).find(".CodeMirror textarea:first-child").focus()}),50)}(y)}),150)}}}angular.module("graphdb.framework.core.directives.queryeditor.queryeditor",["ngCookies","graphdb.framework.externalsync.controllers","graphdb.framework.rest.connectors.service","graphdb.framework.utils.localstorageadapter"]).directive("queryEditor",u),u.$inject=["$timeout","$location","toastr","$repositories","SparqlRestService","ModalService","$uibModal","$jwtAuth","RDF4JRepositoriesRestService","ConnectorsRestService","LocalStorageAdapter","LSKeys","$translate","$languageService","GuidesService"]}}]);
27
+ //# sourceMappingURL=3.d446d752f9ceed06bb80.bundle.js.map