define(["gpui-style-inject","react","mobx"],(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=n(e),a=n(t),c=o(t);
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */
function l(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}i.default("html, body, #root {\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  overflow: hidden; }\n\n.g__index {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  height: 100%; }\n");var s="index-module_list__brmfx",u="index-module_item__-r1wX",d="index-module_border__nrw1R";if(i.default(".index-module_list__brmfx {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-content: space-around;\n  width: 100%;\n  height: 100%; }\n  .index-module_list__brmfx .index-module_item__-r1wX {\n    cursor: pointer;\n    position: relative;\n    width: 100%;\n    height: 15vh;\n    line-height: 15vh;\n    font-size: 5.8vh;\n    color: #a5c6fc;\n    text-align: center;\n    z-index: 1; }\n    .index-module_list__brmfx .index-module_item__-r1wX .index-module_border__nrw1R {\n      position: absolute;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      z-index: -1; }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function p(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function h(e){return r.getDependencyTree(e)}var m,v=1e4,b=new Set;function y(){void 0===m&&(m=setTimeout(w,1e4))}function w(){m=void 0;var e=Date.now();b.forEach((function(t){var r=t.current;r&&e>=r.cleanAt&&(r.reaction.dispose(),t.current=null,b.delete(t))})),b.size>0&&y()}var g={};function _(e){return"observer"+e}function x(e,t,n){void 0===t&&(t="observed"),void 0===n&&(n=g);var o,i=(n.useForceUpdate||p)(),c=a.default.useRef(null);if(!c.current){var l=new r.Reaction(_(t),(function(){s.mounted?i():(l.dispose(),c.current=null)})),s=function(e){return{cleanAt:Date.now()+v,reaction:e}}(l);c.current=s,o=c,b.add(o),y()}var u,d,f=c.current.reaction;if(a.default.useDebugValue(f,h),a.default.useEffect((function(){var e;return e=c,b.delete(e),c.current?c.current.mounted=!0:(c.current={reaction:new r.Reaction(_(t),(function(){i()})),cleanAt:1/0},i()),function(){c.current.reaction.dispose(),c.current=null}}),[]),f.track((function(){try{u=e()}catch(e){d=e}})),d)throw d;return u}function O(e,r){var n,o,i,a=f({forwardRef:!1},r),c=e.displayName||e.name,l=function(t,r){return x((function(){return e(t,r)}),c)};return l.displayName=c,n=a.forwardRef?t.memo(t.forwardRef(l)):t.memo(l),o=e,i=n,Object.keys(o).forEach((function(e){j[e]||Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})),n.displayName=c,n}var j={$$typeof:!0,render:!0,compare:!0,type:!0};function R(e){var t=e.children,r=e.render,n=t||r;return"function"!=typeof n?null:x(n)}function E(e,t,r,n,o){var i="children"===t?"render":"children",a="function"==typeof e[t],c="function"==typeof e[i];return a&&c?new Error("MobX Observer: Do not use children and render in the same time in`"+r):a||c?null:new Error("Invalid prop `"+o+"` of type `"+typeof e[t]+"` supplied to `"+r+"`, expected `function`.")}R.propTypes={children:E,render:E},R.displayName="Observer";var k=0;var S={};function C(e){return S[e]||(S[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+k+")";return k++,t}(e)),S[e]}function P(e,t){if(D(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(t,r[o])||!D(e[r[o]],t[r[o]]))return!1;return!0}function D(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function N(e,t,r){Object.hasOwnProperty.call(e,t)?e[t]=r:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:r})}var $=C("patchMixins"),M=C("patchedDefinition");function U(e,t){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];t.locks++;try{var a;return null!=e&&(a=e.apply(this,o)),a}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(r,o)}))}}function L(e,t){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];U.call.apply(U,[this,e,t].concat(n))}}function B(e,t,r){var n=function(e,t){var r=e[$]=e[$]||{},n=r[t]=r[t]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(e,t);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(e,t);if(!o||!o[M]){var i=e[t],a=z(e,t,o?o.enumerable:void 0,n,i);Object.defineProperty(e,t,a)}}function z(e,t,r,n,o){var i,a=L(o,n);return(i={})[M]=!0,i.get=function(){return a},i.set=function(o){if(this===e)a=L(o,n);else{var i=z(this,t,r,n,o);Object.defineProperty(this,t,i)}},i.configurable=!0,i.enumerable=r,i}var A=r.$mobx||"$mobx",T=C("isUnmounted"),q=C("skipRender"),I=C("isForcingUpdate");function W(e){var r=e.prototype;if(r.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==t.PureComponent)if(r.shouldComponentUpdate){if(r.shouldComponentUpdate!==F)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else r.shouldComponentUpdate=F;H(r,"props"),H(r,"state");var n=r.render;return r.render=function(){return X.call(this,n)},B(r,"componentWillUnmount",(function(){this.render[A]&&this.render[A].dispose(),this[T]=!0})),e}function X(e){var n=this;N(this,q,!1),N(this,I,!1);var o,i=(o=this).displayName||o.name||o.constructor&&(o.constructor.displayName||o.constructor.name)||"<component>",a=e.bind(this),c=!1,l=new r.Reaction(i+".render()",(function(){if(!c&&(c=!0,!0!==n[T])){var e=!0;try{N(n,I,!0),n[q]||t.Component.prototype.forceUpdate.call(n),e=!1}finally{N(n,I,!1),e&&l.dispose()}}}));function s(){c=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=r._allowStateChanges(!1,a)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,s[A]=l,this.render=s,s.call(this)}function F(e,t){return this.state!==t||!P(this.props,e)}function H(e,t){var n=C("reactProp_"+t+"_valueHolder"),o=C("reactProp_"+t+"_atomHolder");function i(){return this[o]||N(this,o,r.createAtom("reactive "+t)),this[o]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return r._allowStateReadsStart&&r._allowStateReadsEnd&&(e=r._allowStateReadsStart(!0)),i.call(this).reportObserved(),r._allowStateReadsStart&&r._allowStateReadsEnd&&r._allowStateReadsEnd(e),this[n]},set:function(e){this[I]||P(this[n],e)?N(this,n,e):(N(this,n,e),N(this,q,!0),i.call(this).reportChanged(),N(this,q,!1))}})}var Y="function"==typeof Symbol&&Symbol.for,V=Y?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,Z=Y?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;if(!t.Component)throw new Error("mobx-react requires React to be available");if(!r.observable)throw new Error("mobx-react requires mobx to be available");let G=class extends c.Component{constructor(e){super(e),this.padding="16vh 4vh 4vh",this.gotoDetail=e=>{const t=this.props.gpui.params;this.props.gpui.root.navigate("@component:godiva/set",{base_url:t.base_url,set_id:t.page.set_id,share_id:t.page.share_id,"@theme":"normal",showSearchBar:"true",criteria:[{id:"__1",alias:"建设模式",key:t.page.filter_key,type:"string",level:!1,filter:{name:"",show:!1,type:"select",params:{isMultiple:!1,searchMode:"contain",default:e}}}],defaultTextColor:"#D4D4D4",padding:t.page.padding},{styles:{"@theme":"page"},mode:"replace"})},this.renderBorder=()=>c.createElement("div",{className:d},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 774 124"},c.createElement("path",{stroke:"rgb(70, 137, 247)",strokeWidth:"3",d:"M2,22 L2,103 L22,123 L753,123 L773,103 L773,22 L753,2 L22,2 L2,22 Z",fill:"rgb(26,48,125)"}))),r.reaction((()=>e.gpui.params.padding),(e=>{this.padding=e||"16vh 4vh 4vh"}),{fireImmediately:!0})}render(){return c.createElement("div",{className:"g__index",style:{padding:this.padding}},c.createElement("div",{className:s},c.createElement("div",{className:u,onClick:()=>this.gotoDetail("直接建设")},this.renderBorder(),"直接建设"),c.createElement("div",{className:u,onClick:()=>this.gotoDetail("学科共建")},this.renderBorder(),"学科共建"),c.createElement("div",{className:u,onClick:()=>this.gotoDetail("学科托管")},this.renderBorder(),"学科托管"),c.createElement("div",{className:u,onClick:()=>this.gotoDetail("校企合作")},this.renderBorder(),"校企合作")))}};return l([r.observable],G.prototype,"padding",void 0),G=l([function(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),Z&&e.$$typeof===Z)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(V&&e.$$typeof===V){var r=e.render;if("function"!=typeof r)throw new Error("render property of ForwardRef was not a function");return t.forwardRef((function(){var e=arguments;return t.createElement(R,null,(function(){return r.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(t.Component,e)?W(e):O(e)}],G),G}));
