openstack-uicore-foundation
Version:
ui reactjs components for openstack marketing site
2 lines • 2.9 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,r),s.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};r.r(o),r.d(o,{default:()=>n});var i=r(1116),s=r.n(i);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}class n{constructor(){this.originalHash="",this.hash={}}convertToHash(e){let t=(e=e.substr(1).toLowerCase()).split("&"),r={};for(let e of t){if(e=e.split("="),2!==e.length)continue;let t=e[1].trim();""!==t&&("true"!==t&&"false"!==t||(e[1]="true"==t),r[e[0]]=e[1])}return r}clearParams(){this.originalHash="",this.hash={}}getParam(e){return"undefined"!=typeof window&&this.originalHash!==window.location.hash&&(this.originalHash=window.location.hash,this.hash=this.convertToHash(this.originalHash)),this.hash.hasOwnProperty(e)?this.hash[e]:null}getParams(){return"undefined"!=typeof window&&this.originalHash!==window.location.hash&&(this.originalHash=window.location.hash,this.hash=this.convertToHash(this.originalHash)),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this.hash)}deleteParam(e){var t=this.getParams();this.clearParams();for(let r in t)r!=e&&(this.hash[r]=t[r])}deleteParams(e){var t=this.getParams();this.clearParams();for(let r in t)e.includes(r)||(this.hash[r]=t[r])}setParam(e,t){return"undefined"!=typeof window&&this.originalHash!==window.location.hash&&(this.originalHash=window.location.hash,this.hash=this.convertToHash(this.originalHash)),null!==t&&""!==t?this.hash[e]=t:delete this.hash[e],this}serialize(){let e="";for(let t in this.hash){""!==e&&(e+="&"),e+=t+"="+this.hash[t]}return e}}return o})()));
//# sourceMappingURL=fragment-parser.js.map