text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CMakeRunConfigurationManager" shouldGenerate="true" assignedExecutableTargets="true" buildAllGenerated="true">
    <generated>
      <config projectName="Figuring_Stuff_Out" targetName="Figuring_Stuff_Out" />
      <config projectName="My_Guessing_Game__CLion_Comp__" targetName="My_Guessing_Game__CLion_Comp__" />
      <config projectName="First" targetName="First" />
    </generated>
  </component>
  <component name="CMakeSettings" AUTO_RELOAD="false" GENERATION_PASS_SYSTEM_ENVIRONMENT="true">
    <ADDITIONAL_GENERATION_ENVIRONMENT>
      <envs />
    </ADDITIONAL_GENERATION_ENVIRONMENT>
  </component>
  <component name="ChangeListManager">
    <list default="true" id="d010163f-7925-4516-8d0d-f31d26daaffe" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/CMakeLists.txt" afterPath="$PROJECT_DIR$/CMakeLists.txt" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/main.cpp" afterPath="$PROJECT_DIR$/main.cpp" />
    </list>
    <ignored path="Sudoku_Solver.iws" />
    <ignored path=".idea/workspace.xml" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="Sudoku_Solver" />
  </component>
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="525">
      <file leaf-file-name="CMakeLists.txt" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="main.cpp" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/main.cpp">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="110">
              <caret line="5" column="1" selection-start-line="5" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/main.cpp" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
    <sorting>DEFINITION_ORDER</sorting>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-9" />
    <option name="y" value="-9" />
    <option name="width" value="1938" />
    <option name="height" value="1048" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Sudoku_Solver" />
              <option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="settings.editor.selected.configurable" value="configurable.group.tools" />
    <property name="settings.editor.splitter.proportion" value="0.2" />
    <property name="WebServerToolWindowFactoryState" value="false" />
  </component>
  <component name="RunManager" selected="Application.My_Guessing_Game__CLion_Comp__">
    <configuration default="true" type="CMakeGoogleTestRunConfigurationType" factoryName="Google Test" PASS_PARENT_ENVS_2="true" TEST_MODE="SUITE_TEST">
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="First" TARGET_NAME="First" CONFIG_NAME="Debug">
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="PythonConfigurationType" factoryName="Python">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="Sudoku_Solver" />
      <option name="SCRIPT_NAME" value="" />
      <option name="PARAMETERS" value="" />
      <option name="SHOW_COMMAND_LINE" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="Tox" factoryName="Tox">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="Sudoku_Solver" />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-interpreter>project</node-interpreter>
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.npm" factoryName="npm">
      <command value="run-script" />
      <scripts />
      <node-interpreter value="project" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Attests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="Sudoku_Solver" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Doctests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="Sudoku_Solver" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Nosetests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="Sudoku_Solver" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <option name="PARAMS" value="" />
      <option name="USE_PARAM" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Unittests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="Sudoku_Solver" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <option name="PUREUNITTEST" value="true" />
      <option name="PARAMS" value="" />
      <option name="USE_PARAM" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="py.test">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="Sudoku_Solver" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <option name="testToRun" value="" />
      <option name="keywords" value="" />
      <option name="params" value="" />
      <option name="USE_PARAM" value="false" />
      <option name="USE_KEYWORD" value="false" />
      <method />
    </configuration>
    <configuration default="false" name="First" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="First" TARGET_NAME="First" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="First" RUN_TARGET_NAME="First">
      <envs />
      <method />
    </configuration>
    <configuration default="false" name="Build All" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Release" RUN_TARGET_PROJECT_NAME="First" RUN_TARGET_NAME="First" EXPLICIT_BUILD_TARGET_NAME="all">
      <envs />
      <method />
    </configuration>
    <configuration default="false" name="My_Guessing_Game__CLion_Comp__" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="My_Guessing_Game__CLion_Comp__" TARGET_NAME="My_Guessing_Game__CLion_Comp__" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="My_Guessing_Game__CLion_Comp__" RUN_TARGET_NAME="My_Guessing_Game__CLion_Comp__">
      <envs />
      <method />
    </configuration>
    <configuration default="false" name="Figuring_Stuff_Out" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Figuring_Stuff_Out" TARGET_NAME="Figuring_Stuff_Out" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="Figuring_Stuff_Out" RUN_TARGET_NAME="Figuring_Stuff_Out">
      <envs />
      <method />
    </configuration>
    <list size="4">
      <item index="0" class="java.lang.String" itemvalue="Application.First" />
      <item index="1" class="java.lang.String" itemvalue="Application.Build All" />
      <item index="2" class="java.lang.String" itemvalue="Application.My_Guessing_Game__CLion_Comp__" />
      <item index="3" class="java.lang.String" itemvalue="Application.Figuring_Stuff_Out" />
    </list>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="d010163f-7925-4516-8d0d-f31d26daaffe" name="Default" comment="" />
      <created>1477285604716</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1477285604716</updated>
      <workItem from="1477285606209" duration="636000" />
      <workItem from="1477286260981" duration="3000" />
      <workItem from="1477289308907" duration="6000" />
      <workItem from="1477322778691" duration="32000" />
      <workItem from="1477324149875" duration="316000" />
      <workItem from="1477325451382" duration="195000" />
      <workItem from="1477326470300" duration="305000" />
    </task>
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="1493000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="-9" y="-9" width="1938" height="1048" extended-state="6" />
    <editor active="false" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1609375" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.16740088" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32930845" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32930845" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Inspection Results" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32976714" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <option name="time" value="5" />
    </breakpoint-manager>
    <watches-manager />
  </component>
  <component name="XSLT-Support.FileAssociations.UIState">
    <PATH>
      <PATH_ELEMENT>
        <option name="myItemId" value="Sudoku_Solver" />
        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
      </PATH_ELEMENT>
      <PATH_ELEMENT>
        <option name="myItemId" value="Sudoku_Solver" />
        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
      </PATH_ELEMENT>
    </PATH>
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="110">
          <caret line="5" column="1" selection-start-line="5" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Acta Soc. Bot. Pol. 23: 760 (1954)

#### Original name
Stachybotrys humilis Krzemien. & Badura

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
var gulp = require("gulp"),
      jshint = require("gulp-jshint"),
      clean = require("gulp-clean"),
      concat = require("gulp-concat"),
      uglify = require("gulp-uglify"),
      watch = require("gulp-watch"),
      less = require("gulp-less"),
      Q = require("q"),
      connect = require("gulp-connect");

/**
 * Global level build configuration
 */
var config = {
   angular: [
      "lib/angularjs/1.2.13/angular.min.js",
      "lib/angularjs/1.2.13/angular-sanitize.min.js",
      "lib/angularjs/1.2.13/angular-touch.min.js",
      "lib/angularjs/1.2.13/angular-route.min.js",
      "lib/angularjs/1.2.13/angular-resource.min.js",
      "lib/angularjs/1.2.13/angular-animate.min.js"
   ],

   modernizr: "lib/modernizr/2.6.2/modernizr.min.js",

   src: {
      dir: "src/",
      assets: ["lib", "fonts", "img"]
   },

   dist: {
      app_dir: "dist/webapp/",
      css_dir: "dist/webapp/css/"
   }
};

/**
 * The default task
 */
gulp.task("default", function() {
   console.log("Available tasks:");
   console.log([
      "------------------------------------------------------------------------",
      "jshint        Run jshint on all the source files",
      "webapp        Build webapp in the dest directory",
      "clean         Clean the dest directory",
      "server        Start a local server (on 8080) that serves from dist/webapp",
      "------------------------------------------------------------------------"
   ].join("\n"));
});

/**
 * Clean up the dest directory
 */
gulp.task("clean", function() {
   return gulp.src(config.dist.app_dir, {read: false})
         .pipe(clean({force: true}));
});

/**
 * Setup jshint for all app files
 */
gulp.task("jshint", function() {
   return gulp.src("src/app/**/*.js")
         .pipe(jshint())
         .pipe(jshint.reporter("default"));
});

/**
 * Less compilation setup
 */
gulp.task("lessc", function() {
   return gulp.src("src/app.less")
         .pipe(less())
         .pipe(gulp.dest(config.dist.css_dir));
});

/**
 * Our main task to build webapp. Here we ensure that clean task runs before
 * others
 */
gulp.task("webapp", ["clean"], function() {
   // do other build things
   gulp.start("jshint", "lessc");

   // copy other assets
   config.src.assets.forEach(function(ass) {
      gulp.src(config.src.dir + ass + "/**")
              .pipe(gulp.dest(config.dist.app_dir + ass));
   });

   // just copy application files for now
   return gulp.src([
            "src/**/*.js",
            "src/**/*.html",
            "src/**/*.css",
            "!src/**/*.spec.js"
         ])
         .pipe(gulp.dest(config.dist.app_dir));
});

gulp.task("server", function() {
   connect.server({
      root: "dist/webapp",
      port: 8080
   });
});


text:
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using FMODUnity;

namespace FMODUnityResonance
{
    /// This is the main Resonance Audio class that communicates with the FMOD Unity integration. Native
    /// functions of the system can only be called through this class to preserve the internal system
    /// functionality.
    public static class FmodResonanceAudio
    {
        /// Maximum allowed gain value in decibels.
        public const float MaxGainDb = 24.0f;

        /// Minimum allowed gain value in decibels.
        public const float MinGainDb = -24.0f;

        /// Maximum allowed reverb brightness modifier value.
        public const float MaxReverbBrightness = 1.0f;

        /// Minimum allowed reverb brightness modifier value.
        public const float MinReverbBrightness = -1.0f;

        /// Maximum allowed reverb time modifier value.
        public const float MaxReverbTime = 3.0f;

        /// Maximum allowed reflectivity multiplier of a room surface material.
        public const float MaxReflectivity = 2.0f;

        // Right-handed to left-handed matrix converter (and vice versa).
        private static readonly Matrix4x4 flipZ = Matrix4x4.Scale(new Vector3(1, 1, -1));

        // Get a handle to the Resonance Audio Listener FMOD Plugin.
        private static readonly string listenerPluginName = "Resonance Audio Listener";

        // Size of |RoomProperties| struct in bytes.
        private static readonly int roomPropertiesSize = FMOD.MarshalHelper.SizeOf(typeof(RoomProperties));

        // Plugin data parameter index for the room properties.
        private static readonly int roomPropertiesIndex = 1;

        // Boundaries instance to be used in room detection logic.
        private static Bounds bounds = new Bounds(Vector3.zero, Vector3.zero);

        // Container to store the currently active rooms in the scene.
        private static List<FmodResonanceAudioRoom> enabledRooms = new List<FmodResonanceAudioRoom>();

        // Current listener position.
        private static FMOD.VECTOR listenerPositionFmod = new FMOD.VECTOR();

        // FMOD Resonance Audio Listener Plugin.
        private static FMOD.DSP listenerPlugin;

        /// Updates the room effects of the environment with given |room| properties.
        /// @note This should only be called from the main Unity thread.
        public static void UpdateAudioRoom(FmodResonanceAudioRoom room, bool roomEnabled)
        {
            // Update the enabled rooms list.
            if (roomEnabled)
            {
                if (!enabledRooms.Contains(room))
                {
                    enabledRooms.Add(room);
                }
            }
            else
            {
                enabledRooms.Remove(room);
            }
            // Update the current room effects to be applied.
            if (enabledRooms.Count > 0)
            {
                FmodResonanceAudioRoom currentRoom = enabledRooms[enabledRooms.Count - 1];
                RoomProperties roomProperties = GetRoomProperties(currentRoom);
                // Pass the room properties into a pointer.
                IntPtr roomPropertiesPtr = Marshal.AllocHGlobal(roomPropertiesSize);
                Marshal.StructureToPtr(roomProperties, roomPropertiesPtr, false);
                ListenerPlugin.setParameterData(roomPropertiesIndex, GetBytes(roomPropertiesPtr,
                                                                               roomPropertiesSize));
                Marshal.FreeHGlobal(roomPropertiesPtr);
            }
            else
            {
                // Set the room properties to a null room, which will effectively disable the room effects.
                ListenerPlugin.setParameterData(roomPropertiesIndex, GetBytes(IntPtr.Zero, 0));
            }
        }

        /// Returns whether the listener is currently inside the given |room| boundaries.
        public static bool IsListenerInsideRoom(FmodResonanceAudioRoom room)
        {
            // Compute the room position relative to the listener.
            FMOD.VECTOR unused;
            RuntimeManager.CoreSystem.get3DListenerAttributes(0, out listenerPositionFmod, out unused,
                                                                  out unused, out unused);
            Vector3 listenerPosition = new Vector3(listenerPositionFmod.x, listenerPositionFmod.y,
                                                   listenerPositionFmod.z);
            Vector3 relativePosition = listenerPosition - room.transform.position;
            Quaternion rotationInverse = Quaternion.Inverse(room.transform.rotation);
            // Set the size of the room as the boundary and return whether the listener is inside.
            bounds.size = Vector3.Scale(room.transform.lossyScale, room.Size);
            return bounds.Contains(rotationInverse * relativePosition);
        }

        [StructLayout(LayoutKind.Sequential)]
        private struct RoomProperties
        {
            // Center position of the room in world space.
            public float PositionX;
            public float PositionY;
            public float PositionZ;

            // Rotation (quaternion) of the room in world space.
            public float RotationX;
            public float RotationY;
            public float RotationZ;
            public float RotationW;

            // Size of the shoebox room in world space.
            public float DimensionsX;
            public float DimensionsY;
            public float DimensionsZ;

            // Material name of each surface of the shoebox room.
            public FmodResonanceAudioRoom.SurfaceMaterial MaterialLeft;
            public FmodResonanceAudioRoom.SurfaceMaterial MaterialRight;
            public FmodResonanceAudioRoom.SurfaceMaterial MaterialBottom;
            public FmodResonanceAudioRoom.SurfaceMaterial MaterialTop;
            public FmodResonanceAudioRoom.SurfaceMaterial MaterialFront;
            public FmodResonanceAudioRoom.SurfaceMaterial MaterialBack;

            // User defined uniform scaling factor for reflectivity. This parameter has no effect when set
            // to 1.0f.
            public float ReflectionScalar;

            // User defined reverb tail gain multiplier. This parameter has no effect when set to 0.0f.
            public float ReverbGain;

            // Adjusts the reverberation time across all frequency bands. RT60 values are multiplied by this
            // factor. Has no effect when set to 1.0f.
            public float ReverbTime;

            // Controls the slope of a line from the lowest to the highest RT60 values (increases high
            // frequency RT60s when positive, decreases when negative). Has no effect when set to 0.0f.
            public float ReverbBrightness;
        };

        // Returns the FMOD Resonance Audio Listener Plugin.
        private static FMOD.DSP ListenerPlugin
        {
            get
            {
                if (!listenerPlugin.hasHandle())
                {
                    listenerPlugin = Initialize();
                }
                return listenerPlugin;
            }
        }

        // Converts given |db| value to its amplitude equivalent where 'dB = 20 * log10(amplitude)'.
        private static float ConvertAmplitudeFromDb(float db)
        {
            return Mathf.Pow(10.0f, 0.05f * db);
        }

        // Converts given |position| and |rotation| from Unity space to audio space.
        private static void ConvertAudioTransformFromUnity(ref Vector3 position,
          ref Quaternion rotation)
        {
            // Compose the transformation matrix.
            Matrix4x4 transformMatrix = Matrix4x4.TRS(position, rotation, Vector3.one);
            // Convert the transformation matrix from left-handed to right-handed.
            transformMatrix = flipZ * transformMatrix * flipZ;
            // Update |position| and |rotation| respectively.
            position = transformMatrix.GetColumn(3);
            rotation = Quaternion.LookRotation(transformMatrix.GetColumn(2), transformMatrix.GetColumn(1));
        }

        // Returns a byte array of |length| created from |ptr|.
        private static byte[] GetBytes(IntPtr ptr, int length)
        {
            if (ptr != IntPtr.Zero)
            {
                byte[] byteArray = new byte[length];
                Marshal.Copy(ptr, byteArray, 0, length);
                return byteArray;
            }
            // Return an empty array if the pointer is null.
            return new byte[1];
        }

        // Returns room properties of the given |room|.
        private static RoomProperties GetRoomProperties(FmodResonanceAudioRoom room)
        {
            RoomProperties roomProperties;
            Vector3 position = room.transform.position;
            Quaternion rotation = room.transform.rotation;
            Vector3 scale = Vector3.Scale(room.transform.lossyScale, room.Size);
            ConvertAudioTransformFromUnity(ref position, ref rotation);
            roomProperties.PositionX = position.x;
            roomProperties.PositionY = position.y;
            roomProperties.PositionZ = position.z;
            roomProperties.RotationX = rotation.x;
            roomProperties.RotationY = rotation.y;
            roomProperties.RotationZ = rotation.z;
            roomProperties.RotationW = rotation.w;
            roomProperties.DimensionsX = scale.x;
            roomProperties.DimensionsY = scale.y;
            roomProperties.DimensionsZ = scale.z;
            roomProperties.MaterialLeft = room.LeftWall;
            roomProperties.MaterialRight = room.RightWall;
            roomProperties.MaterialBottom = room.Floor;
            roomProperties.MaterialTop = room.Ceiling;
            roomProperties.MaterialFront = room.FrontWall;
            roomProperties.MaterialBack = room.BackWall;
            roomProperties.ReverbGain = ConvertAmplitudeFromDb(room.ReverbGainDb);
            roomProperties.ReverbTime = room.ReverbTime;
            roomProperties.ReverbBrightness = room.ReverbBrightness;
            roomProperties.ReflectionScalar = room.Reflectivity;
            return roomProperties;
        }

        // Initializes and returns the FMOD Resonance Audio Listener Plugin.
        private static FMOD.DSP Initialize()
        {
            // Search through all busses on in banks.
            int numBanks = 0;
            FMOD.DSP dsp = new FMOD.DSP();
            FMOD.Studio.Bank[] banks = null;
            RuntimeManager.StudioSystem.getBankCount(out numBanks);
            RuntimeManager.StudioSystem.getBankList(out banks);
            for (int currentBank = 0; currentBank < numBanks; ++currentBank)
            {
                int numBusses = 0;
                FMOD.Studio.Bus[] busses = null;
                banks[currentBank].getBusCount(out numBusses);
                banks[currentBank].getBusList(out busses);
                for (int currentBus = 0; currentBus < numBusses; ++currentBus)
                {
                    // Make sure the channel group of the current bus is assigned properly.
                    string busPath = null;
                    busses[currentBus].getPath(out busPath);
                    RuntimeManager.StudioSystem.getBus(busPath, out busses[currentBus]);
                    busses[currentBus].lockChannelGroup();
                    RuntimeManager.StudioSystem.flushCommands();
                    FMOD.ChannelGroup channelGroup;
                    busses[currentBus].getChannelGroup(out channelGroup);
                    if (channelGroup.hasHandle())
                    {
                        int numDsps = 0;
                        channelGroup.getNumDSPs(out numDsps);
                        for (int currentDsp = 0; currentDsp < numDsps; ++currentDsp)
                        {
                            channelGroup.getDSP(currentDsp, out dsp);
                            string dspNameSb;
                            int unusedInt = 0;
                            uint unusedUint = 0;
                            dsp.getInfo(out dspNameSb, out unusedUint, out unusedInt, out unusedInt, out unusedInt);
                            if (dspNameSb.ToString().Equals(listenerPluginName) && dsp.hasHandle())
                            {
                                return dsp;
                            }
                        }
                    }
                    busses[currentBus].unlockChannelGroup();
                }
            }
            RuntimeUtils.DebugLogError(listenerPluginName + " not found in the FMOD project.");
            return dsp;
        }
    }
}


text:
#import "SimpleXpBeaconPlugin.h"

NSString * const PLUGIN_VERSION = @"1.1.0";

NSString* const ACTION_INITIALISE_BLUETOOTH = @"initialiseBluetooth";
NSString* const ACTION_TERMINATE_BLUETOOTH = @"terminateBluetooth";
NSString* const ACTION_PLUGIN_VERSION = @"pluginVersion";
NSString* const ACTION_START_MONITORING = @"startMonitoring";
NSString* const ACTION_STOP_MONITORING = @"stopMonitoring";

NSString* const JSON_KEY_STATUS = @"status";
NSString* const JSON_KEY_DESCRIPTION = @"desc";
NSString* const JSON_KEY_ERROR_CODE = @"error_code";
NSString* const JSON_KEY_EVENT = @"event";
NSString* const JSON_KEY_PLUGIN_VERSION = @"plugin_version";
NSString* const JSON_KEY_DATA = @"data";
NSString* const JSON_KEY_IBEACON_UUID = @"uuid";
NSString* const JSON_KEY_IBEACON_MAJOR = @"major";
NSString* const JSON_KEY_IBEACON_MINOR = @"minor";
NSString* const JSON_KEY_IBEACON_RSSI = @"rssi";
NSString* const JSON_KEY_IBEACON_TXPOWER = @"txpower";
NSString* const JSON_KEY_IBEACON_PROXIMITY = @"proximity";
NSString* const JSON_KEY_IBEACON_ACCURACY = @"accuracy";

NSString* const JSON_VALUE_ERROR = @"ERROR";
NSString* const JSON_VALUE_OK = @"OK";
NSString* const JSON_VALUE_STARTED = @"STARTED";
NSString* const JSON_VALUE_IBEACON = @"IBEACON";
NSString* const JSON_VALUE_IBEACON_TYPE_PROXIMITY = @"IBEACON_PROXIMITY";
NSString* const JSON_VALUE_PLUGIN_DESCRIPTION = @"Plugin Version";
NSString* const JSON_VALUE_NO_BT_LE_FEATURE = @"This device doesn't have BT LE feature";
NSString* const JSON_VALUE_BT_ALREADY_INITIALISED = @"Bluetooth already initialised";
NSString* const JSON_VALUE_BT_NOT_INITIALISED = @"Bluetooth not initialised";
NSString* const JSON_VALUE_BT_INITIALISED = @"Bluetooth initialised";
NSString* const JSON_VALUE_BT_TERMINATE = @"Bluetooth Terminated";
NSInteger const JSON_VALUE_DEFAULT_ERROR_CODE = -1;
NSString* const JSON_VALUE_ALREADY_MONITORING_FOR_I_BEACONS = @"Already monitoring for iBeacons";
NSString* const JSON_VALUE_FAILED_TO_ENABLE_MONITORING = @"Failed to enable iBeacon monitoring";
NSString* const JSON_VALUE_IBEACON_MONITORING_NOT_AVAILABLE = @"iBeacon monitoring not available for this application";
NSString* const JSON_VALUE_NOT_MONITORING = @"Not monitoring for iBeacons";
NSString* const JSON_VALUE_FAILED_TO_DISABLE_MONITORING = @"Failed to Disable Monitoring";
NSString* const JSON_VALUE_STOPPED_MONITORING = @"Stopped Monitoring for iBeacons OK";
NSString* const JSON_VALUE_REQUESTED_MONITORING = @"Requested iBeacon Monitoring OK";
NSString* const JSON_VALUE_IBEACON_EVENT = @"iBeacon event";
NSString* const JSON_VALUE_IBEACON_PROXIMITY_EVENT = @"iBeacon proximity event";
NSString* const JSON_VALUE_BEACON_REMOVED = @"iBeacon UUID removed sucessfully";
NSString* const JSON_VALUE_NO_MATCH_TO_BEACON_UUID = @"iBeacon UUID did not match any being monitored";
NSString* const JSON_VALUE_IBEACON_ALREADY_BEING_MONITORED = @"iBeacon already being monitored";
NSString* const JSON_VALUE_UUID_ADDED = @"UUID added";
NSString* const JSON_VALUE_UUID_WAS_IMPROPER_FORMAT = @"UUID was improper format";

@interface SimpleXpBeaconPlugin () <CBCentralManagerDelegate, CBPeripheralDelegate, CLLocationManagerDelegate>

@property (nonatomic) NSString* monitoringCallbackId;
@property (nonatomic) NSString* initialiseCallbackId;
@property (nonatomic) BOOL btInitialised;
@property (nonatomic) BOOL monitoring;
@property (nonatomic) BOOL supressMonitorCallback;
@property (nonatomic) BOOL initialised;
@property (nonatomic) CBCentralManager *manager;
@property (nonatomic) CBPeripheral *peripheral;
@property (nonatomic) CLBeaconRegion *beaconRegion;
@property (nonatomic) CLLocationManager *locationManager;
@property (nonatomic) NSMutableDictionary *beaconRegionsToMonitor;

@end

@implementation SimpleXpBeaconPlugin

#pragma mark - initWithWebView

-(CDVPlugin *)initWithWebView:(UIWebView *)theWebView
{
    self = [super initWithWebView:theWebView];
    if (self) {
        [self __init];
    }
    return self;
}

#pragma mark - __init

- (void)__init
{
    if ((self != nil) && !self.initialised) {
        self.initialised = YES;
        self.monitoringCallbackId = nil;
        self.initialiseCallbackId = nil;
        self.btInitialised = NO;
        self.monitoring = NO;
        self.supressMonitorCallback = NO;
        self.manager = nil;
        self.locationManager = nil;
        self.beaconRegionsToMonitor = [[NSMutableDictionary alloc] init];
    }
}

#pragma mark - pluginInitialize

- (void)pluginInitialize
{
    [super pluginInitialize];

    NSLog(@"SimpleXpBeaconPlugin - Plugin initialisation");

    self.locationManager = [[CLLocationManager alloc] init];
    self.locationManager.delegate = self;

    NSLog(@"SimpleXpBeaconPlugin - auth status %d", CLLocationManager.authorizationStatus);
    if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
        NSLog(@"SimpleXpBeaconPlugin - respondsToSelector");
        [self.locationManager requestAlwaysAuthorization];
    } else {
        NSLog(@"SimpleXpBeaconPlugin - does not respondsToSelector");
    }
}

#pragma mark - deviceHasBtLeFeature

- (BOOL) deviceHasBtLeFeature
{
    NSString *state = nil;
    BOOL response = FALSE;

    switch ([self.manager state])
    {
        case CBCentralManagerStateUnsupported:
            state = @"The platform/hardware doesn't support Bluetooth Low Energy.";
            break;
        case CBCentralManagerStateUnauthorized:
            state = @"The app is not authorized to use Bluetooth Low Energy.";
            break;
        case CBCentralManagerStatePoweredOff:
            state = @"Bluetooth is currently powered off.";
            response = TRUE;
            break;
        case CBCentralManagerStatePoweredOn:
            state = @"Bluetooth is currently powered on.";
            response = TRUE;
            break;
        case CBCentralManagerStateUnknown:
            state = @"Bluetooth state unknown.";
        default:
            state = @"State invalid.";
            response = FALSE;
    }

    NSLog(@"SimpleXpBeaconPlugin - Central manager state: %@", state);

    return response;
}

#pragma mark - bluetoothSwitchedOn

- (BOOL) bluetoothSwitchedOn
{
    switch ([self.manager state])
    {
        case CBCentralManagerStatePoweredOff:
            break;
        case CBCentralManagerStatePoweredOn:
            return TRUE;
        case CBCentralManagerStateUnknown:
        default:
            return FALSE;
    }
    return FALSE;
}

#pragma mark - pluginVersion

- (void)pluginVersion:(CDVInvokedUrlCommand *) command
{
    NSLog(@"SimpleXpBeaconPlugin - pluginVersion");

    NSString* callbackId = [command callbackId];

    [self pluginVersionResponse:callbackId];
}

#pragma mark - addBeaconUuidToMonitor

- (void)addBeaconUuidToMonitor:(CDVInvokedUrlCommand *) command
{
    NSLog(@"SimpleXpBeaconPlugin - addBeaconRegionToMonitor");

    NSString *callbackId = [command callbackId];
    NSString *uuidString = [[command arguments] objectAtIndex:0];

    NSLog(@"SimpleXpBeaconPlugin - addBeaconRegionToMonitor - adding %@", uuidString);

    NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:uuidString];

    if (uuid == nil) {
        [self errorResponse:callbackId description:JSON_VALUE_UUID_WAS_IMPROPER_FORMAT];
        return;
    }

    NSString *identifier = [NSString stringWithFormat:@"Beacon Region UUID: %@", uuid.UUIDString];

    CLBeaconRegion *beaconRegion = [self.beaconRegionsToMonitor objectForKey:uuid.UUIDString];

    if (!beaconRegion) {
        beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid identifier:identifier];
        beaconRegion.notifyEntryStateOnDisplay = YES;
        beaconRegion.notifyOnEntry = YES;
        beaconRegion.notifyOnExit = YES;

        [self.beaconRegionsToMonitor setObject:beaconRegion forKey:uuid.UUIDString];

        if (self.monitoring) {
            [self.locationManager startMonitoringForRegion:beaconRegion];
            [self.locationManager startRangingBeaconsInRegion:beaconRegion];
        }
        [self successResponse:callbackId description:JSON_VALUE_UUID_ADDED];
    } else {
        [self errorResponse:callbackId description:JSON_VALUE_IBEACON_ALREADY_BEING_MONITORED];
    }
}

#pragma mark - removeBeaconUuidToMonitor

- (void)removeBeaconUuidToMonitor:(CDVInvokedUrlCommand *) command
{
    NSLog(@"SimpleXpBeaconPlugin - removeBeaconRegionToMonitor");

    NSString *callbackId = [command callbackId];
    NSString *uuidString = [[command arguments] objectAtIndex:0];

    NSLog(@"SimpleXpBeaconPlugin - addBeaconRegionToMonitor - removing %@", uuidString);

    NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:uuidString];

    if (uuid == nil) {
        [self errorResponse:callbackId description:JSON_VALUE_UUID_WAS_IMPROPER_FORMAT];
        return;
    }

    CLBeaconRegion *beaconRegion = [self.beaconRegionsToMonitor objectForKey:uuid.UUIDString];

    if (beaconRegion) {
        if (self.monitoring) {
            [self.locationManager stopMonitoringForRegion:beaconRegion];
            [self.locationManager stopRangingBeaconsInRegion:beaconRegion];
        }
        [self.beaconRegionsToMonitor removeObjectForKey:uuid.UUIDString];
        [self successResponse:callbackId description:JSON_VALUE_BEACON_REMOVED];
    } else {
        [self errorResponse:callbackId description:JSON_VALUE_NO_MATCH_TO_BEACON_UUID];
    }
}

#pragma mark - initialiseBluetooth

- (void) initialiseBluetooth:(CDVInvokedUrlCommand *) command
{
    NSLog(@"SimpleXpBeaconPlugin - initialiseBluetooth");

    NSString* callbackId = [command callbackId];

    if (self.btInitialised) {
        [self errorResponse:callbackId description:JSON_VALUE_BT_ALREADY_INITIALISED];
        return;
    }

    self.initialiseCallbackId = callbackId;

    self.manager = [[CBCentralManager alloc]
                    initWithDelegate:self
                    queue:dispatch_get_main_queue()
                    options:@{CBCentralManagerOptionShowPowerAlertKey: @(NO)}];

    [self keepCallbackResponse:self.initialiseCallbackId];
}

#pragma mark - centralManagerDidUpdateState:

- (void)centralManagerDidUpdateState:(CBCentralManager *)central
{
    NSLog(@"SimpleXpBeaconPlugin - centralManagerDidUpdateState");

    if (!self.btInitialised && self.initialiseCallbackId != nil) {
        if (![self deviceHasBtLeFeature]) {
            [self errorResponse:self.initialiseCallbackId description:JSON_VALUE_NO_BT_LE_FEATURE];
            return;
        }

        if (![self bluetoothSwitchedOn]) {
            [self errorResponse:self.initialiseCallbackId description:JSON_VALUE_BT_NOT_INITIALISED];
            return;
        }

        self.btInitialised = YES;
        [self successResponse:self.initialiseCallbackId description:JSON_VALUE_BT_INITIALISED];
    }
}

#pragma mark - locationManager:didRangeBeacons:inRegion:

- (void) locationManager:(CLLocationManager *)manager
         didRangeBeacons:(NSArray *)beacons
                inRegion:(CLBeaconRegion *)region
{
    NSLog(@"SimpleXpBeaconPlugin - clocationManager:didRangeBeacons:inRegion:");

    for (CLBeacon *beacon in beacons) {
        [self monitorResponse:self.monitoringCallbackId beacon:beacon inRegion:region];
    }
}

#pragma mark - locationManager:rangingBeaconsDidFailForRegion:inRegion:withError:

- (void) locationManager:(CLLocationManager *)manager
rangingBeaconsDidFailForRegion:(CLBeaconRegion *)region
               withError:(NSError *)error
{
    NSLog(@"SimpleXpBeaconPlugin - locationManager:rangingBeaconsDidFailForRegion:inRegion:withError:");
}

#pragma mark - locationManager:didEnterRegion:

- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
    NSLog(@"SimpleXpBeaconPlugin - locationManager:didEnterRegion:");
}

#pragma mark - locationManager:didExitRegion:

-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {
    NSLog(@"SimpleXpBeaconPlugin - locationManager:didExitRegion:");
}

#pragma mark - terminateBluetooth

- (void) terminateBluetooth:(CDVInvokedUrlCommand *) command
{
    NSLog(@"SimpleXpBeaconPlugin - terminateBluetooth");

    NSString* callbackId = [command callbackId];

    if (!self.btInitialised) {
        [self errorResponse:callbackId description:JSON_VALUE_BT_NOT_INITIALISED];
        return;
    }

    [self successResponse:callbackId description:JSON_VALUE_BT_TERMINATE];
    self.btInitialised = NO;
    self.initialiseCallbackId = nil;
}

#pragma mark - startMonitoring

- (void) startMonitoring:(CDVInvokedUrlCommand *) command
{
    NSLog(@"SimpleXpBeaconPlugin - startMonitoring");

    NSString* callbackId = [command callbackId];

    if (!self.btInitialised) {
        [self errorResponse:callbackId description:JSON_VALUE_BT_NOT_INITIALISED];
        return;
    }

    if (![CLLocationManager isMonitoringAvailableForClass:[CLBeaconRegion class]]) {
        [self errorResponse:callbackId description:JSON_VALUE_IBEACON_MONITORING_NOT_AVAILABLE];
        return;
    }

    if (self.monitoring) {
        [self errorResponse:callbackId description:JSON_VALUE_ALREADY_MONITORING_FOR_I_BEACONS];
        return;
    }

    self.monitoringCallbackId = callbackId;
    self.monitoring = YES;
    self.supressMonitorCallback = NO;

    for (id key in self.beaconRegionsToMonitor) {
        CLBeaconRegion *beaconRegion = [self.beaconRegionsToMonitor objectForKey:key];
        [self.locationManager startMonitoringForRegion:beaconRegion];
        [self.locationManager startRangingBeaconsInRegion:beaconRegion];
    }

    [self monitorSuccessResponse:callbackId];
}

#pragma mark - stopMonitoring

- (void) stopMonitoring:(CDVInvokedUrlCommand *) command
{
    NSLog(@"SimpleXpBeaconPlugin - stopMonitoring");

    NSString* callbackId = [command callbackId];

    if (!self.btInitialised) {
        [self errorResponse:callbackId description:JSON_VALUE_BT_NOT_INITIALISED];
        return;
    }

    if (!self.monitoring) {
        [self errorResponse:callbackId description:JSON_VALUE_NOT_MONITORING];
        return;
    }

    for (id key in self.beaconRegionsToMonitor) {
        CLBeaconRegion *beaconRegion = [self.beaconRegionsToMonitor objectForKey:key];
        [self.locationManager stopMonitoringForRegion:beaconRegion];
        [self.locationManager stopRangingBeaconsInRegion:beaconRegion];
    }

    self.monitoringCallbackId = nil;
    self.monitoring = NO;

    [self successResponse:callbackId description:JSON_VALUE_STOPPED_MONITORING];
}

#pragma mark - monitorResponse

- (void) monitorResponse:(NSString *)callbackId beacon:(CLBeacon *)beacon inRegion:(CLBeaconRegion *)region
{
    CDVPluginResult* result = nil;
    NSString* responseJsonString = nil;
    NSData* responseData = nil;
    NSError* error = nil;
    NSMutableDictionary* responseObject = [[NSMutableDictionary alloc] init];
    NSMutableDictionary* dataObject = [[NSMutableDictionary alloc] init];

    NSLog(@"Region %@", region.identifier);
    NSLog(@"UUID %@", beacon.proximityUUID.UUIDString);
    NSLog(@"Major %@", beacon.major);
    NSLog(@"Minor %@", beacon.minor);
    NSLog(@"RSSI %ld", (long)beacon.rssi);
    NSLog(@"Proximity %ld", (long)beacon.proximity);
    NSLog(@"Accuracy %f", beacon.accuracy);

    [dataObject setObject:beacon.proximityUUID.UUIDString
                   forKey:JSON_KEY_IBEACON_UUID];
    [dataObject setObject:beacon.major
                   forKey:JSON_KEY_IBEACON_MAJOR];
    [dataObject setObject:beacon.minor
                   forKey:JSON_KEY_IBEACON_MINOR];
    [dataObject setObject:[NSNumber numberWithInteger:beacon.rssi]
                   forKey:JSON_KEY_IBEACON_RSSI];
    [dataObject setObject:[NSNumber numberWithInteger:beacon.proximity]
                   forKey:JSON_KEY_IBEACON_PROXIMITY];
    [dataObject setObject:[NSNumber numberWithDouble:beacon.accuracy]
                   forKey:JSON_KEY_IBEACON_ACCURACY];

    [responseObject setObject:dataObject
                       forKey:JSON_KEY_DATA];
    [responseObject setObject:JSON_VALUE_OK
                       forKey:JSON_KEY_STATUS];
    [responseObject setObject:JSON_VALUE_IBEACON_TYPE_PROXIMITY
                       forKey:JSON_KEY_EVENT];
    [responseObject setObject:JSON_VALUE_IBEACON_PROXIMITY_EVENT
                       forKey:JSON_KEY_DESCRIPTION];

    responseData = [NSJSONSerialization dataWithJSONObject:responseObject
                                                   options:0
                                                     error:&error];
    if (!error) {
        responseJsonString = [[NSString alloc] initWithData:responseData
                                                   encoding:NSUTF8StringEncoding];
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:responseJsonString];
        [result setKeepCallbackAsBool:YES];
        [self.commandDelegate sendPluginResult:result callbackId:self.monitoringCallbackId];
    } else {
        NSLog(@"SimpleXpBeaconPlugin JSONString error: %@", [error localizedDescription]);
    }
}

#pragma mark - errorResponse

- (void) errorResponse:(NSString *)callbackId description:(NSString *)desc
{
    // {"desc":"...","status":"ERROR", "error_code": nnn}

    CDVPluginResult* result = nil;
    NSString* responseJsonString = nil;
    NSData* responseData = nil;
    NSError* error = nil;
    NSMutableDictionary* responseObject = [[NSMutableDictionary alloc] init];

    [responseObject setObject:desc
                       forKey:JSON_KEY_DESCRIPTION];
    [responseObject setObject:JSON_VALUE_ERROR
                       forKey:JSON_KEY_STATUS];
    [responseObject setObject:[NSNumber numberWithInteger:JSON_VALUE_DEFAULT_ERROR_CODE]
                       forKey:JSON_KEY_ERROR_CODE];
    responseData = [NSJSONSerialization dataWithJSONObject:responseObject
                                                   options:0
                                                     error:&error];
    if (!error) {
        responseJsonString = [[NSString alloc] initWithData:responseData
                                                   encoding:NSUTF8StringEncoding];
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:responseJsonString];
        [result setKeepCallbackAsBool:NO];
        [self.commandDelegate sendPluginResult:result callbackId:callbackId];
    } else {
        NSLog(@"SimpleXpBeaconPlugin JSONString error: %@", [error localizedDescription]);
    }
}

#pragma mark - successResponse

- (void) successResponse:(NSString *)callbackId description:(NSString *)desc
{
    // {"desc":"...","status":"OK"}

    CDVPluginResult* result = nil;
    NSString* responseJsonString = nil;
    NSData* responseData = nil;
    NSError* error = nil;
    NSMutableDictionary* responseObject = [[NSMutableDictionary alloc] init];

    [responseObject setObject:desc
                       forKey:JSON_KEY_DESCRIPTION];
    [responseObject setObject:JSON_VALUE_OK
                       forKey:JSON_KEY_STATUS];
    responseData = [NSJSONSerialization dataWithJSONObject:responseObject
                                                   options:0
                                                     error:&error];
    if (!error) {
        responseJsonString = [[NSString alloc] initWithData:responseData
                                                   encoding:NSUTF8StringEncoding];
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:responseJsonString];
        [result setKeepCallbackAsBool: NO];
        [self.commandDelegate sendPluginResult:result callbackId:callbackId];
    } else {
        NSLog(@"SimpleXpBeaconPlugin JSONString error: %@", [error localizedDescription]);
    }
}

#pragma mark - pluginVersionResponse

- (void) pluginVersionResponse:(NSString *)callbackId
{
    // {"desc":"Plugin Version","plugin_version":"1.0.0","status":"OK"}

    CDVPluginResult* result = nil;
    NSString* responseJsonString = nil;
    NSData* responseData = nil;
    NSError* error = nil;
    NSMutableDictionary* responseObject = [[NSMutableDictionary alloc] init];

    [responseObject setObject:PLUGIN_VERSION                forKey:JSON_KEY_PLUGIN_VERSION];
    [responseObject setObject:JSON_VALUE_PLUGIN_DESCRIPTION forKey:JSON_KEY_DESCRIPTION];
    [responseObject setObject:JSON_VALUE_OK                 forKey:JSON_KEY_STATUS];
    responseData = [NSJSONSerialization dataWithJSONObject:responseObject
                                                   options:0
                                                     error:&error];
    if (!error) {
        responseJsonString = [[NSString alloc] initWithData:responseData
                                                   encoding:NSUTF8StringEncoding];
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:responseJsonString];
        [result setKeepCallbackAsBool:NO];
        [self.commandDelegate sendPluginResult:result callbackId:callbackId];
    } else {
        NSLog(@"SimpleXpBeaconPlugin JSONString error: %@", [error localizedDescription]);
    }
}

#pragma mark - keepCallbackResponse

- (void) keepCallbackResponse:(NSString *)callbackId
{
    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:@""];
    [result setKeepCallbackAsBool:YES];
    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
}

#pragma mark - monitorSuccessResponse

- (void) monitorSuccessResponse:(NSString *)callbackId
{
    // {"desc":"...","status":"OK"}

    CDVPluginResult* result = nil;
    NSString* responseJsonString = nil;
    NSData* responseData = nil;
    NSError* error = nil;
    NSMutableDictionary* responseObject = [[NSMutableDictionary alloc] init];

    [responseObject setObject:JSON_VALUE_REQUESTED_MONITORING
                       forKey:JSON_KEY_DESCRIPTION];
    [responseObject setObject:JSON_VALUE_OK
                       forKey:JSON_KEY_STATUS];
    [responseObject setObject:JSON_VALUE_STARTED
                       forKey:JSON_KEY_EVENT];
    responseData = [NSJSONSerialization dataWithJSONObject:responseObject
                                                   options:0
                                                     error:&error];
    if (!error) {
        responseJsonString = [[NSString alloc] initWithData:responseData
                                                   encoding:NSUTF8StringEncoding];
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:responseJsonString];
        [result setKeepCallbackAsBool:YES];
        [self.commandDelegate sendPluginResult:result callbackId:callbackId];
    } else {
        NSLog(@"SimpleXpBeaconPlugin JSONString error: %@", [error localizedDescription]);
    }
}

#pragma mark - monitorFailResponse

- (void) monitorFailResponse:(NSString *)callbackId
{
    // {"desc":"...","status":"ERROR", "error_code": nnn, "event":"STARTED"}

    CDVPluginResult* result = nil;
    NSString* responseJsonString = nil;
    NSData* responseData = nil;
    NSError* error = nil;
    NSMutableDictionary* responseObject = [[NSMutableDictionary alloc] init];

    [responseObject setObject:JSON_VALUE_FAILED_TO_ENABLE_MONITORING
                       forKey:JSON_KEY_DESCRIPTION];
    [responseObject setObject:JSON_VALUE_ERROR
                       forKey:JSON_KEY_STATUS];
    [responseObject setObject:[NSNumber numberWithInteger:JSON_VALUE_DEFAULT_ERROR_CODE]
                       forKey:JSON_KEY_ERROR_CODE];
    [responseObject setObject:JSON_VALUE_STARTED
                       forKey:JSON_KEY_EVENT];
    responseData = [NSJSONSerialization dataWithJSONObject:responseObject
                                                   options:0
                                                     error:&error];
    if (!error) {
        responseJsonString = [[NSString alloc] initWithData:responseData
                                                   encoding:NSUTF8StringEncoding];
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:responseJsonString];
        [result setKeepCallbackAsBool:YES];
        [self.commandDelegate sendPluginResult:result callbackId:callbackId];
    } else {
        NSLog(@"SimpleXpBeaconPlugin JSONString error: %@", [error localizedDescription]);
    }
}

#pragma mark - locationManager:didChangeAuthorizationStatus:

-(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status {

    if( ![CLLocationManager locationServicesEnabled] ) {
        NSLog(@"SimpleXpBeaconPlugin Location services are not enabled.");
    } else {
        NSLog(@"SimpleXpBeaconPlugin Location services ARE enabled.");
    }

    if( [CLLocationManager authorizationStatus] != kCLAuthorizationStatusAuthorizedWhenInUse ) {
        NSLog(@"SimpleXpBeaconPlugin Location services not authorised when app in use.");
    } else {
        NSLog(@"SimpleXpBeaconPlugin Location services ARE authorised for when app in use.");
    }

    if( [CLLocationManager authorizationStatus] != kCLAuthorizationStatusAuthorizedAlways ) {
        NSLog(@"SimpleXpBeaconPlugin Location services not authorised always.");
    } else {
        NSLog(@"SimpleXpBeaconPlugin Location services ARE authorised always.");
    }
}

#pragma mark - onAppTerminate

- (void)onAppTerminate
{
    // override this if you need to do any cleanup on app exit

    NSLog(@"SimpleXpBeaconPlugin - onAppTerminate");

    [super onAppTerminate];
}

#pragma mark - onMemoryWarning

- (void)onMemoryWarning
{
    // override to remove caches, etc

    NSLog(@"SimpleXpBeaconPlugin - onMemoryWarning");

    [super onMemoryWarning];
}

#pragma mark - onReset

- (void)onReset
{
    // Override to cancel any long-running requests when the WebView navigates or refreshes.

    NSLog(@"SimpleXpBeaconPlugin - onReset");

    [super onReset];
}

#pragma mark - dispose

- (void)dispose
{
    NSLog(@"SimpleXpBeaconPlugin - dispose");

    [super dispose];
}

@end


text:
const LIMIT_DEFAULT = 50
const LIMIT_MAX = 1000

const OFFSET_DEFAULT = 0

const DEFAULT_MAX_RESULT_WINDOW = 10000

const parseIntValue = (value, defaultValue, maxLimit?) => {
  if (!value) {
    return defaultValue
  }

  const v = parseInt(value)
  if (!maxLimit) {
    return v
  }

  return v <= maxLimit ? v : maxLimit
}

export default {
  parseOptionsForElasticSearch(params) {
    const limit = parseIntValue(params.limit, LIMIT_DEFAULT, LIMIT_MAX)
    const offset = parseIntValue(params.offset, OFFSET_DEFAULT)

    // See https://github.com/crowi/crowi/pull/293
    if (limit + offset > DEFAULT_MAX_RESULT_WINDOW) {
      throw new Error(`(limit + offset) must be less than or equal to ${DEFAULT_MAX_RESULT_WINDOW}`)
    }

    return { limit, offset }
  },
  parseOptions(params) {
    const limit = parseIntValue(params.limit, LIMIT_DEFAULT, LIMIT_MAX)
    const offset = parseIntValue(params.offset, OFFSET_DEFAULT)

    return { limit, offset }
  },
}


text:
// eslint-disable-next-line
import {
    AfterViewInit,
    Component,
    ElementRef,
    Input,
    OnDestroy,
    OnInit,
    ViewChild,
    ViewEncapsulation,
    EventEmitter,
    Output
} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import {
    Pagination,
    UserProcessInstanceFilterRepresentation,
    ScriptFilesApi
} from '@alfresco/js-api';
import {
    FORM_FIELD_VALIDATORS, FormRenderingService, FormService,
    DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues,
    AlfrescoApiService, UserPreferencesService, LogService, DataCellEvent, NotificationService
} from '@alfresco/adf-core';

import { AnalyticsReportListComponent } from '@alfresco/adf-insights';

import {
    ProcessFiltersComponent,
    ProcessInstance,
    ProcessInstanceDetailsComponent,
    ProcessInstanceListComponent,
    StartProcessInstanceComponent,
    FilterRepresentationModel,
    TaskDetailsComponent,
    TaskDetailsEvent,
    TaskFiltersComponent,
    TaskListComponent,
    ProcessFormRenderingService,
    APP_LIST_LAYOUT_LIST
} from '@alfresco/adf-process-services';
import { Subject } from 'rxjs';
import { /*CustomEditorComponent*/ CustomStencil01 } from './custom-editor/custom-editor.component';
import { DemoFieldValidator } from './demo-field-validator';
import { PreviewService } from '../../services/preview.service';
import { Location } from '@angular/common';
import { takeUntil } from 'rxjs/operators';

const currentProcessIdNew = '__NEW__';
const currentTaskIdNew = '__NEW__';

const TASK_ROUTE = 0;
const PROCESS_ROUTE = 1;
const REPORT_ROUTE = 2;

@Component({
    selector: 'app-process-service',
    templateUrl: './process-service.component.html',
    styleUrls: ['./process-service.component.scss'],
    encapsulation: ViewEncapsulation.None,
    providers: [
        { provide: FormRenderingService, useClass: ProcessFormRenderingService }
    ]
})
export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit {

    @ViewChild('activitiFilter')
    activitiFilter: TaskFiltersComponent;

    @ViewChild('processListPagination')
    processListPagination: PaginationComponent;

    @ViewChild('taskListPagination')
    taskListPagination: PaginationComponent;

    @ViewChild('taskList')
    taskList: TaskListComponent;

    @ViewChild('activitiProcessFilter')
    activitiProcessFilter: ProcessFiltersComponent;

    @ViewChild('processList')
    processList: ProcessInstanceListComponent;

    @ViewChild('activitiProcessDetails')
    activitiProcessDetails: ProcessInstanceDetailsComponent;

    @ViewChild('activitiDetails')
    activitiDetails: TaskDetailsComponent;

    @ViewChild('activitiStartProcess')
    activitiStartProcess: StartProcessInstanceComponent;

    @ViewChild('analyticsReportList', { static: true })
    analyticsReportList: AnalyticsReportListComponent;

    @Input()
    appId: number = null;

    filterSelected: any = null;

    @Output()
    changePageSize = new EventEmitter<Pagination>();

    selectFirstReport = false;
    multiSelectTask = false;
    multiSelectProcess = false;
    selectionMode = 'single';
    taskContextMenu = false;
    processContextMenu = false;

    private tabs = { tasks: 0, processes: 1, reports: 2 };

    layoutType: string;
    currentTaskId: string;
    currentProcessInstanceId: string;

    taskSchemaColumns: any[] = [];
    taskPage = 0;
    processPage = 0;
    paginationPageSize = 0;
    processSchemaColumns: any[] = [];
    showHeaderContent = true;

    defaultProcessDefinitionName: string;
    defaultProcessName: string;
    defaultTaskName: string;

    activeTab: number = this.tabs.tasks; // tasks|processes|reports

    taskFilter: FilterRepresentationModel;
    report: any;
    processFilter: UserProcessInstanceFilterRepresentation;
    blobFile: any;
    flag = true;

    presetColumn = 'default';

    showTaskTab: boolean;
    showProcessTab: boolean;

    showProcessFilterIcon: boolean;
    showTaskFilterIcon: boolean;
    showApplications: boolean;
    applicationId: number;
    processDefinitionName: string;

    fieldValidators = [
        ...FORM_FIELD_VALIDATORS,
        new DemoFieldValidator()
    ];

    private onDestroy$ = new Subject<boolean>();
    private scriptFileApi: ScriptFilesApi;

    constructor(private elementRef: ElementRef,
                private route: ActivatedRoute,
                private router: Router,
                private apiService: AlfrescoApiService,
                private logService: LogService,
                private appConfig: AppConfigService,
                private preview: PreviewService,
                formRenderingService: FormRenderingService,
                formService: FormService,
                private location: Location,
                private notificationService: NotificationService,
                private preferenceService: UserPreferencesService) {

        this.scriptFileApi = new ScriptFilesApi(this.apiService.getInstance());
        this.defaultProcessName = this.appConfig.get<string>('adf-start-process.name');
        this.defaultProcessDefinitionName = this.appConfig.get<string>('adf-start-process.processDefinitionName');
        this.defaultTaskName = this.appConfig.get<string>('adf-start-task.name');
        this.processDefinitionName = this.defaultProcessDefinitionName;
        // Uncomment this line to replace all 'text' field editors with custom component
        // formRenderingService.setComponentTypeResolver('text', () => CustomEditorComponent, true);

        // Uncomment this line to map 'custom_stencil_01' to local editor component
        formRenderingService.setComponentTypeResolver('custom_stencil_01', () => CustomStencil01, true);

        formService.formLoaded
            .pipe(takeUntil(this.onDestroy$))
            .subscribe(formEvent => {
                this.logService.log(`Form loaded: ${formEvent.form.id}`);
            });

        formService.formFieldValueChanged
            .pipe(takeUntil(this.onDestroy$))
            .subscribe(formFieldEvent => {
                this.logService.log(`Field value changed. Form: ${formFieldEvent.form.id}, Field: ${formFieldEvent.field.id}, Value: ${formFieldEvent.field.value}`);
            });

        this.preferenceService
            .select(UserPreferenceValues.PaginationSize)
            .pipe(takeUntil(this.onDestroy$))
            .subscribe((pageSize) => {
                this.paginationPageSize = pageSize;
            });

        formService.validateDynamicTableRow
            .pipe(takeUntil(this.onDestroy$))
            .subscribe(
                (validateDynamicTableRowEvent: ValidateDynamicTableRowEvent) => {
                    const row: DynamicTableRow = validateDynamicTableRowEvent.row;
                    if (row && row.value && row.value.name === 'admin') {
                        validateDynamicTableRowEvent.summary.isValid = false;
                        validateDynamicTableRowEvent.summary.message = 'Sorry, wrong value. You cannot use "admin".';
                        validateDynamicTableRowEvent.preventDefault();
                    }
                }
            );

        formService.formContentClicked
            .pipe(takeUntil(this.onDestroy$))
            .subscribe((content) => {
                this.showContentPreview(content);
            });

        formService.validateForm
            .pipe(takeUntil(this.onDestroy$))
            .subscribe(validateFormEvent => {
                this.logService.log('Error form:' + validateFormEvent.errorsField);
            });

        // Uncomment this block to see form event handling in action
        /*
        formService.formEvents
            .pipe(takeUntil(this.onDestroy$))
            .subscribe((event: Event) => {
                this.logService.log('Event fired:' + event.type);
                this.logService.log('Event Target:' + event.target);
            });
        */
    }

    ngOnInit() {
        if (this.router.url.includes('processes')) {
            this.activeTab = this.tabs.processes;
        }
        this.showProcessTab = this.activeTab === this.tabs.processes;
        this.showTaskTab = this.activeTab === this.tabs.tasks;
        this.route.params.subscribe((params) => {
            const applicationId = params['appId'];

            this.filterSelected = params['filterId'] ? { id: +params['filterId'] } : { index: 0 };

            if (applicationId && applicationId !== '0') {
                this.appId = params['appId'];
                this.applicationId = this.appId;
            }

            this.taskFilter = null;
            this.currentTaskId = null;
            this.processFilter = null;
            this.currentProcessInstanceId = null;
        });
        this.layoutType = APP_LIST_LAYOUT_LIST;
    }

    ngOnDestroy() {
        this.onDestroy$.next(true);
        this.onDestroy$.complete();
    }

    onTaskFilterClick(filter: FilterRepresentationModel): void {
        this.applyTaskFilter(filter);
        this.resetTaskPaginationPage();
    }

    resetTaskPaginationPage() {
        this.taskPage = 0;
    }

    toggleHeaderContent(): void {
        this.showHeaderContent = !this.showHeaderContent;
    }

    onTabChange(event: any): void {
        const index = event.index;
        if (index === TASK_ROUTE) {
            this.showTaskTab = event.index === this.tabs.tasks;
            this.relocateLocationToTask();
        } else if (index === PROCESS_ROUTE) {
            this.showProcessTab = event.index === this.tabs.processes;
            this.relocateLocationToProcess();
            if (this.processList) {
                this.processList.reload();
            }
        } else if (index === REPORT_ROUTE) {
            this.relocateLocationToReport();
        }
    }

    onChangePageSize(event: Pagination): void {
        this.preferenceService.paginationSize = event.maxItems;
        this.changePageSize.emit(event);
    }

    onReportClick(event: any): void {
        this.report = event;
    }

    onSuccessTaskFilterList(): void {
        this.applyTaskFilter(this.activitiFilter.getCurrentFilter());
    }

    applyTaskFilter(filter: FilterRepresentationModel) {
        this.taskFilter = Object.assign({}, filter);

        if (filter && this.taskList) {
            this.taskList.hasCustomDataSource = false;
        }
        this.relocateLocationToTask();
    }

    onStartTaskSuccess(event: any): void {
        this.activitiFilter.selectFilterWithTask(event.id);
        this.currentTaskId = event.id;
    }

    onCancelStartTask() {
        this.currentTaskId = null;
        this.reloadTaskFilters();
    }

    onSuccessTaskList() {
        this.currentTaskId = this.taskList.getCurrentId();
    }

    onProcessFilterChange(event: UserProcessInstanceFilterRepresentation): void {
        this.processFilter = event;
        this.resetProcessPaginationPage();
        this.relocateLocationToProcess();
    }

    resetProcessPaginationPage() {
        this.processPage = 0;
    }

    onSuccessProcessFilterList(): void {
        this.processFilter = this.activitiProcessFilter.getCurrentFilter();
    }

    onSuccessProcessList(): void {
        this.currentProcessInstanceId = this.processList.getCurrentId();
    }

    onTaskRowClick(taskId: string): void {
        this.currentTaskId = taskId;
    }

    onTaskRowDblClick(event: CustomEvent) {
        const taskId = event.detail.value.obj.id;
        this.currentTaskId = taskId;
    }

    onProcessRowDblClick(event: CustomEvent) {
        const processInstanceId = event.detail.value.obj.id;
        this.currentProcessInstanceId = processInstanceId;
    }

    onProcessRowClick(processInstanceId: string): void {
        this.currentProcessInstanceId = processInstanceId;
    }

    onEditReport(): void {
        this.analyticsReportList.reload();
    }

    onReportSaved(reportId: number): void {
        this.analyticsReportList.reload(reportId);
    }

    onReportDeleted(): void {
        this.analyticsReportList.reload();
        this.analyticsReportList.selectReport(null);
    }

    navigateStartProcess(): void {
        this.currentProcessInstanceId = currentProcessIdNew;
    }

    navigateStartTask(): void {
        this.currentTaskId = currentTaskIdNew;
    }

    onStartProcessInstance(instance: ProcessInstance): void {
        this.currentProcessInstanceId = instance.id;
        this.activitiStartProcess.reset();
        this.activitiProcessFilter.selectRunningFilter();
    }

    onCancelProcessInstance() {
        this.currentProcessInstanceId = null;
        this.reloadProcessFilters();
    }

    onStartProcessError(event: any) {
        this.notificationService.showError(event.message);
    }

    isStartProcessMode(): boolean {
        return this.currentProcessInstanceId === currentProcessIdNew;
    }

    isStartTaskMode(): boolean {
        return this.currentTaskId === currentTaskIdNew;
    }

    processCancelled(): void {
        this.currentProcessInstanceId = null;
        this.processList.reload();
    }

    onFormCompleted(): void {
        this.currentTaskId = null;
        if (this.taskListPagination) {
            this.taskPage = this.taskListPagination.current - 1;
        }
        if (!this.taskList) {
            this.navigateToProcess();
        } else {
            this.taskList.hasCustomDataSource = false;
            this.taskList.reload();
        }
    }

    navigateToProcess(): void {
        this.router.navigate([`/activiti/apps/${this.appId}/processes/`]);
    }

    relocateLocationToProcess(): void {
        this.location.go(`/activiti/apps/${this.appId || 0}/processes/${this.processFilter ? this.processFilter.id : 0}`);
    }

    relocateLocationToTask(): void {
        this.location.go(`/activiti/apps/${this.appId || 0}/tasks/${this.taskFilter ? this.taskFilter.id : 0}`);
    }

    relocateLocationToReport(): void {
        this.location.go(`/activiti/apps/${this.appId || 0}/report/`);
    }

    onContentClick(content: any): void {
        this.showContentPreview(content);
    }

    private showContentPreview(content: any) {
        if (content.contentBlob) {
            this.preview.showBlob(content.name, content.contentBlob);
        } else {
            this.preview.showResource(content.sourceId.split(';')[0]);
        }
    }

    onAuditClick(event: any) {
        this.logService.log(event);
    }

    onAuditError(event: any): void {
        this.logService.error('My custom error message' + event);
    }

    onTaskCreated(data: any): void {
        this.currentTaskId = data.parentTaskId;
        this.taskList.reload();
    }

    onTaskDeleted(): void {
        this.taskList.reload();
    }

    ngAfterViewInit() {
        this.loadStencilScriptsInPageFromProcessService();
    }

    loadStencilScriptsInPageFromProcessService() {
        this.scriptFileApi.getControllers().then((response) => {
            if (response) {
                const stencilScript = document.createElement('script');
                stencilScript.type = 'text/javascript';
                stencilScript.text = response;
                this.elementRef.nativeElement.appendChild(stencilScript);
            }
        });
    }

    onShowProcessDiagram(event: any): void {
        this.router.navigate(['/activiti/apps/' + this.appId + '/diagram/' + event.value]);
    }

    onProcessDetailsTaskClick(event: TaskDetailsEvent): void {
        event.preventDefault();
        this.activeTab = this.tabs.tasks;

        const taskId = event.value.id;
        const processTaskDataRow: any = {
            id: taskId,
            name: event.value.name || 'No name',
            created: event.value.created
        };

        if (this.taskList) {
            this.taskList.setCustomDataSource([processTaskDataRow]);
            this.taskList.selectTask(taskId);
        }
        this.currentTaskId = taskId;
    }

    private reloadProcessFilters(): void {
        this.activitiProcessFilter.selectFilter(this.activitiProcessFilter.getCurrentFilter());
    }

    private reloadTaskFilters(): void {
        this.activitiFilter.selectFilter(this.activitiFilter.getCurrentFilter());
    }

    onRowClick(event): void {
        this.logService.log(event);
    }

    onRowDblClick(event): void {
        this.logService.log(event);
    }

    onAssignTask() {
        this.taskList.reload();
        this.currentTaskId = null;
    }

    onShowTaskRowContextMenu(event: DataCellEvent) {
        event.value.actions = [
            {
                data: event.value.row['obj'],
                model: {
                    key: 'taskDetails',
                    icon: 'open',
                    title: 'TASK_LIST_DEMO.TASK_CONTEXT_MENU',
                    visible: true
                },
                subject: new Subject()
            }
        ];
    }

    onShowProcessRowContextMenu(event: DataCellEvent) {
        event.value.actions = [
            {
                data: event.value.row['obj'],
                model: {
                    key: 'processDetails',
                    icon: 'open',
                    title: 'PROCESS_LIST_DEMO.PROCESS_CONTEXT_MENU',
                    visible: true
                },
                subject: new Subject()
            }
        ];
    }
}


text: module.exports = require('graphology-traversal');


text:
@interface RTSAirplayOverlayView () <RTSAirplayOverlayViewDataSource>
@property (nonatomic, strong) MPVolumeView *volumeView;
@end

@implementation RTSAirplayOverlayView

- (id)initWithFrame:(CGRect)frame
{
	if(!(self = [super initWithFrame:frame]))
		return nil;

	self.autoresizesSubviews = YES;
	self.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
	self.backgroundColor = [UIColor clearColor];

	[self setupView];

	return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if(!(self = [super initWithCoder:aDecoder]))
		return nil;

	[self setupView];

	return self;
}

- (void)setupView
{
	self.contentMode = UIViewContentModeRedraw;
	self.userInteractionEnabled = NO;
	self.hidden = YES;

	[[NSNotificationCenter defaultCenter] addObserver:self
											 selector:@selector(wirelessRouteActiveDidChange:)
												 name:MPVolumeViewWirelessRouteActiveDidChangeNotification
											   object:nil];

	self.volumeView = [[MPVolumeView alloc] init];
}

- (void)dealloc
{
	[[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (NSString *)activeAirplayOutputRouteName
{
	AVAudioSession *audioSession = [AVAudioSession sharedInstance];
	AVAudioSessionRouteDescription *currentRoute = audioSession.currentRoute;

	for (AVAudioSessionPortDescription *outputPort in currentRoute.outputs) {
		if ([outputPort.portType isEqualToString:AVAudioSessionPortAirPlay]) {
			return outputPort.portName;
		}
	}

	return RTSMediaPlayerLocalizedString(@"External device", nil);
}

#pragma mark - Notifications

- (void)wirelessRouteActiveDidChange:(NSNotification *)notification
{
	[self setNeedsDisplay];

	AVAudioSession *audioSession = [AVAudioSession sharedInstance];
	AVAudioSessionRouteDescription *currentRoute = audioSession.currentRoute;

	BOOL hidden = YES;
	for (AVAudioSessionPortDescription *outputPort in currentRoute.outputs) {
		if ([outputPort.portType isEqualToString:AVAudioSessionPortAirPlay]) {
			hidden = NO;
			break;
		}
	}

	[self setHidden:hidden];
}

#pragma mark - Drawings

- (void)drawRect:(CGRect)rect
{
	CGFloat width, height;
	CGFloat stringRectHeight = 30.0;
	CGFloat stringRectMargin = 5.0;
	CGFloat lineWidth = 4.0;
	CGFloat shapeSeparatorDelta = 5.0f;
	CGFloat quadCurveHeight = 20.0f;

	CGFloat maxWidth = CGRectGetWidth(self.bounds) - 2*lineWidth;
	CGFloat maxHeight = CGRectGetHeight(self.bounds) - stringRectHeight - quadCurveHeight - shapeSeparatorDelta - 10.;
	CGFloat aspectRatio = 16./10.0;

	if (maxWidth < maxHeight * aspectRatio) {
		width = maxWidth;
		height = width / aspectRatio;
	}
	else {
		height = maxHeight;
		width = height * aspectRatio;
	}

	CGFloat midX = CGRectGetMidX(rect);
	CGFloat midY = CGRectGetMidY(rect);

	CGContextRef context = UIGraphicsGetCurrentContext();
	CGContextSetAllowsAntialiasing(context, YES);

	CGContextSetLineWidth(context, 4.0);
	CGContextSetStrokeColorWithColor(context, self.tintColor.CGColor);

	CGRect rectangle = CGRectMake(midX-width/2.0, midY-height/2.0, width, height);
	CGContextAddRect(context, rectangle);
	CGContextStrokePath(context);

	CGContextMoveToPoint(context, midX-width/4.0, midY+height/2.0+shapeSeparatorDelta);
	CGContextAddQuadCurveToPoint(context, midX, midY+height/2.0+quadCurveHeight, midX+width/4.0, midY+height/2.0+shapeSeparatorDelta);
	CGContextSetFillColorWithColor(context, self.tintColor.CGColor);
	CGContextFillPath(context);

	CGRect titleRect = CGRectInset(rectangle, 8.0, 10.0);
	[self drawTitleInRect:titleRect];

	CGRect subtitleRect = CGRectMake(stringRectMargin, midY+height/2.0+quadCurveHeight-5.0, CGRectGetMaxX(rect)-2*stringRectMargin, stringRectHeight);
	[self drawSubtitleInRect:subtitleRect];
}

- (void)drawTitleInRect:(CGRect)rect
{
	NSDictionary *attributes = [self airplayOverlayViewTitleAttributedDictionary:self];
	if ([self.dataSource respondsToSelector:@selector(airplayOverlayViewTitleAttributedDictionary:)]) {
		attributes = [self.dataSource airplayOverlayViewTitleAttributedDictionary:self];
	}

	NSStringDrawingContext *drawingContext = [[NSStringDrawingContext alloc] init];

	NSString *title = @"Airplay";
	[title drawWithRect:rect options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:drawingContext];
}

- (void)drawSubtitleInRect:(CGRect)rect
{
	NSString *routeName = [self activeAirplayOutputRouteName];

	NSString *subtitle = [self airplayOverlayView:self subtitleForAirplayRouteName:routeName];
	if ([self.dataSource respondsToSelector:@selector(airplayOverlayView:subtitleForAirplayRouteName:)]) {
		subtitle = [self.dataSource airplayOverlayView:self subtitleForAirplayRouteName:routeName];
	}

	if (subtitle.length > 0) {
		NSDictionary* attributes = [self airplayOverlayViewSubitleAttributedDictionary:self];
		if ([self.dataSource respondsToSelector:@selector(airplayOverlayViewSubitleAttributedDictionary:)]) {
			attributes = [self.dataSource airplayOverlayViewSubitleAttributedDictionary:self];
		}

		NSStringDrawingContext *drawingContext = [[NSStringDrawingContext alloc] init];
		drawingContext.minimumScaleFactor = 3/4;

		[subtitle drawWithRect:rect options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:drawingContext];
	}
}

#pragma mark - RTSAirplayOverlayViewDataSource

- (NSDictionary *)airplayOverlayViewTitleAttributedDictionary:(RTSAirplayOverlayView *)airplayOverlayView
{
	NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
	style.alignment = NSTextAlignmentCenter;

	return @{ NSFontAttributeName : [UIFont boldSystemFontOfSize:14.0f],
			  NSForegroundColorAttributeName : [UIColor whiteColor],
			  NSParagraphStyleAttributeName: style };
}

- (NSString *)airplayOverlayView:(RTSAirplayOverlayView *)airplayOverlayView subtitleForAirplayRouteName:(NSString *)routeName
{
	return [NSString stringWithFormat:RTSMediaPlayerLocalizedString(@"This media is playing on «%@»", nil), routeName];
}

- (NSDictionary *)airplayOverlayViewSubitleAttributedDictionary:(RTSAirplayOverlayView *)airplayOverlayView
{
	NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
	style.alignment = NSTextAlignmentCenter;
	style.lineBreakMode = NSLineBreakByTruncatingTail;

	return @{ NSFontAttributeName : [UIFont systemFontOfSize:12.0f],
			  NSForegroundColorAttributeName : [UIColor lightGrayColor],
			  NSParagraphStyleAttributeName: style };
}

@end


text:
var buildDir = 'build/',
    distDir = 'dist/',
    srcDir = 'src/',
    jsFilename = 'angularVerticalTree.js',
    jsFilenameMin = 'angularVerticalTree.min.js',
    templateFilename = 'angularVerticalTree.tpl.html',
    templateJsFilename = 'angularVerticalTree.tpl.js';

module.exports = {
    srcFiles : [
        srcDir + jsFilename
    ],
    templateFiles : [
        srcDir + templateFilename
    ],
    depFiles : [
        'bower_components/jquery/dist/jquery.js',
        'bower_components/angular/angular.js',
        'bower_components/angular-mocks/angular-mocks.js'
    ],
    testFiles : [
        'test/angularVerticalTree.spec.js'
    ],
    demoFiles : [
        'demo/index.html',
        'demo/js/script.js',
        'demo/css/style.css'
    ],
    buildFiles : [
        buildDir + jsFilename,
        buildDir + templateJsFilename
    ],
    distDir : distDir,
    buildDir : buildDir,
    jsFilename : jsFilename,
    jsFilenameMin : jsFilenameMin,
    templateJsFilename : templateJsFilename,
    karmaConf : __dirname + '/karma.conf.js'
};


text:
var originalBuiltIns = {
  setTimeout: setTimeout,
  addEventListener: document.addEventListener,
};

var events = [];
var eventHints = [];
var breadcrumbs = [];
var breadcrumbHints = [];

// Oh dear IE10...
var dsn =
  document.location.protocol +
  '//public@' +
  document.location.hostname +
  (document.location.port ? ':' + document.location.port : '') +
  '/1';

function initSDK() {
  Sentry.init({
    dsn: dsn,
    integrations: [new Sentry.Integrations.Dedupe()],
    attachStacktrace: true,
    ignoreErrors: ['ignoreErrorTest'],
    denyUrls: ['foo.js'],
    beforeSend: function (event, eventHint) {
      events.push(event);
      eventHints.push(eventHint);
      return event;
    },
    beforeBreadcrumb: function (breadcrumb, breadcrumbHint) {
      // Filter console logs as we use them for debugging *a lot* and they are not *that* important
      // But allow then if we explicitly say so (for one of integration tests)
      if (breadcrumb.category === 'console' && !window.allowConsoleBreadcrumbs) {
        return null;
      }

      // One of the tests use manually created breadcrumb without eventId and we want to let it through
      if (breadcrumb.category.indexOf('sentry') === 0 && breadcrumb.event_id && !window.allowSentryBreadcrumbs) {
        return null;
      }

      if (
        breadcrumb.type === 'http' &&
        (breadcrumb.data.url.indexOf('test.js') !== -1 || breadcrumb.data.url.indexOf('frame.html') !== -1)
      ) {
        return null;
      }

      // Filter "refresh" like navigation which occurs in Mocha when testing on Android 4
      if (breadcrumb.category === 'navigation' && breadcrumb.data.to === breadcrumb.data.from) {
        return null;
      }

      breadcrumbs.push(breadcrumb);
      breadcrumbHints.push(breadcrumbHint);
      return breadcrumb;
    },
  });
}


text:
/*global $, Event */
$(document).ready(function () {
    "use strict";

    //Start: Autohides Navigation Based on Screen Width
    function sidebarAutoHide() {
        if ($(window).width() < 991) {
            $('.sidebarLeft').addClass('collapse').addClass('in');
            $('.sidebarRight').addClass('collapse');
        }
    }

    sidebarAutoHide();
    //End: Autohides Navigation Based on Screen Width

    //Invoke window resize event
    function invokeResize() {
        var ev, element, event;
        if (document.createEvent) {
            ev = document.createEvent('Event');
            ev.initEvent('resize', true, true);
            window.dispatchEvent(ev);
        } else { // IE
            element = document.documentElement;
            event = document.createEventObject();
            element.fireEvent("onresize", event);
        }
    }

    invokeResize();
    //End Invoke window resize event

    //Start: Invokes page resize event whenever a navigation button is clicked.
    $('header .nav-button').on('click', function (e) {
        invokeResize();
    });
    //End: Invokes page resize event whenever a navigation button is clicked.

});

//SlimScroll
$(function () {
    "use strict";

    var bottomOffset = 140,
        navHeight = 350;

    //Start: Sidebar Left
    if ($('.header-fixed').length) {
        bottomOffset = 140;
        navHeight = $('.sidebar-left').height();
        $('.sidebar-left > .side-panel').each(function (num, ele) {
            navHeight -= $(this).height();
        });

        $('.sidebar-nav-wrapper').slimScroll({
            height: navHeight - bottomOffset
        });
    }
    //End: Sidebar Left

    //Start: Sidebar Right
    if ($('.header-fixed').length) {
        $('.sidebar-right .chat-list-wrapper').slimScroll({
            height: $('.sidebar-right').height() - 80
        });
    }
    //End: Sidebar Right

    //Start: Nav Button Dropdown Menus
    $('.item-list').slimScroll({
        height: 280
    });
    $('.item-grid').slimScroll({
        height: 280
    });
    //End: Nav Button Dropdown Menus

    //Start: Readjust Scroll Container Height based on Screen Size
    $(window).resize(function () {

        //Start: Sidebar Left
        if ($('.header-fixed').length) {
            navHeight = $('.sidebar-left').height();
            $('.sidebar-left > .side-panel').each(function (num, ele) {
                navHeight -= $(this).height();
            });

            $('.sidebar-nav-wrapper').slimScroll({
                height: navHeight - bottomOffset
            });
        }
        //End: Sidebar Left

        //Start: Sidebar Right
        if ($('.header-fixed').length) {
            $('.sidebar-right .chat-list-wrapper').slimScroll({
                height: $('.sidebar-right').height() - 80
            });
        }
        //End: Sidebar Right

    });
    //End: Readjust Scroll Container based on Screen Size

});
//End SlimScroll

//Auto Collapse Menu Item
$(document).ready(function () {
    "use strict";

    $('.sidebar-nav>li>a').on('click', function (e) {

        var menuItem = this;

        $('.sidebar-nav>li>a').each(function (num, ele) {
            if (menuItem !== ele) {
                $(ele).siblings('ul').removeClass('in');
            }
        });

    });
});
//End Auto Collapse Menu Item

//Hides Chatlist
$(document).mouseup(function (e) {
    "use strict";

    var container = $(".sidebar-right"),
        searchContainer = $('.chat-search');

    if (!container.is(e.target) && container.has(e.target).length === 0 && !searchContainer.is(e.target) && searchContainer.has(e.target).length === 0) {
        if (!$('.sidebar-right').hasClass('in')) {
            $('#sidebarRightToggle').trigger('click');
        }
    }
});
//End Hides Chatlist