Define core repeat styles ans scripts

@since  1.0.0
@access public
347212
public function set_assets() {

		$this->assets['script'][ $this->type ] = $this->url . 'assets/js/' . $this->type . UIX_ASSET_DEBUG . '.js';
		$this->assets['style'][ $this->type ]  = $this->url . 'assets/css/' . $this->type . UIX_ASSET_DEBUG . '.css';

		parent::set_assets();

	}
985895
public function setStyle(array $css_properties=[]) :self {
		// init the style attribute is it didn't exist already
		isset($this->attributes['style']) ?: $this->attributes['style'] = '';
		// for each of the css properties
		foreach($css_properties as $css_property => $css_value) {
			// add them to the already existing ones
			$this->attributes['style'] .= $css_property.':'.$css_value.';';
		}
		// return self
		return($this);
	}
725705
private function fillStyleAttributesWithMergedStyles()
    {
        foreach ($this->styleAttributesForNodes as $nodePath => $styleAttributesForNode) {
            $node = $this->visitedNodes[$nodePath];
            $currentStyleAttributes = $this->parseCssDeclarationsBlock($node->getAttribute('style'));
            $node->setAttribute(
                'style',
                $this->generateStyleStringFromDeclarationsArrays(
                    $currentStyleAttributes,
                    $styleAttributesForNode
                )
            );
        }
    }
523994
public function customize_controls_print_footer_scripts() {
		$this->parse_fields();
		wp_enqueue_script( 'kirki-tooltip', URL::get_from_path( __DIR__ . '/assets/scripts/script.js' ), [ 'jquery' ], KIRKI_VERSION, false );
		wp_localize_script( 'kirki-tooltip', 'kirkiTooltips', $this->tooltips_content );
		wp_enqueue_style( 'kirki-tooltip', URL::get_from_path( __DIR__ . '/assets/styles/styles.css' ), [], KIRKI_VERSION );
	}
472652
private function runCopy() {
        if ( ! $this->run) {
            foreach ($this->holder as $name => $contents) {
                //checking the copy index
                if (array_key_exists('copy', $contents)) {
                    
                    //forceCopy flag check
                    if ( ! array_key_exists('forceCopy', $contents)) {
                        $contents['forceCopy'] = false;
                    }
                    
                    //chmod flag check
                    if ( ! array_key_exists('chmod', $contents)) {
                        $contents['chmod'] = 0777;
                    }
                    
                    //iterating
                    foreach ($contents['copy'] as $from => $to) {
                        $this->copy($from, $to, $contents['forceCopy'], $contents['chmod']);
                    }
                }
                
                //some scripts have to initialized before they call statements
                if (array_key_exists('script', $contents)) {
                    $this->addScriptBefore($contents['script']);
                }
                
                if (array_key_exists('style', $contents)) {
                    $this->addStyle($contents['style']);
                }
                
                if (array_key_exists('css', $contents)) {
                    $this->addCss($contents['css']);
                }
                
                if (array_key_exists('js', $contents)) {
                    $this->addJs($contents['js']);
                }
            }
            
            //all css
            if (array_key_exists('css', $this->obsolete)) {
                $this->css = array_diff($this->css, $this->obsolete['css']);
            }
            $this->css = array_unique($this->css);
            
            //all js
            if (array_key_exists('js', $this->obsolete)) {
                $this->js = array_diff($this->js, $this->obsolete['js']);
            }
            $this->js = array_unique($this->js);
            
            //all scripts
            if (array_key_exists('script', $this->obsolete)) {
                $this->script = str_replace($this->obsolete['script'], '', $this->script);
            }
            
            //all styles
            if (array_key_exists('style', $this->obsolete)) {
                $this->style = str_replace($this->obsolete['style'], '', $this->style);
            }
            
            //the copy has been executed!
            $this->run = true;
        }
    }
231706
function setStyle(element, styles) {
  var style = element.style;


  forEach(styles, function (value, property) {
    if (REGEXP_SUFFIX.test(property) && isNumber(value)) {
      value += 'px';
    }

    style[property] = value;
  });
}
91877
public function setDefaultStyles()
    {
        Report::setDefaultStyles();

        // Default column headers to underlined if not specified
        if (!$this->query->output_header_styles) {
            $this->query->output_header_styles["requires-before"] = "0";
            $this->query->output_header_styles["border-style"] = "solid";
            $this->query->output_header_styles["border-width"] = "0 0 1 0";
            $this->query->output_header_styles["border-color"] = array(0, 0, 0);
        }

        if (!$this->query->output_before_form_row_styles) {
            $this->query->output_before_form_row_styles["border-style"] = "solid";
            $this->query->output_before_form_row_styles["border-width"] = "0 0 0 0";
            $this->query->output_before_form_row_styles["border-color"] = array(0, 0, 0);
        }

        if (!$this->query->output_criteria_styles) {
            $this->query->output_criteria_styles["border-style"] = "solid";
            $this->query->output_criteria_styles["background-color"] = "#aaaaaa";
            $this->query->output_criteria_styles["border-width"] = "1px 1px 1px 1px";
            $this->query->output_criteria_styles["border-color"] = array(0, 0, 0);
            $this->query->output_criteria_styles["margin"] = "0px 5px 10px 5px";
            $this->query->output_criteria_styles["padding"] = "0px 5px 0px 5px";
        }

        if (!$this->query->output_after_form_row_styles) {
            $this->query->output_after_form_row_styles["border-style"] = "solid";
            $this->query->output_after_form_row_styles["border-width"] = "1 0 0 0";
            $this->query->output_after_form_row_styles["border-color"] = array(0, 0, 0);
        }

        if (!$this->query->output_group_header_styles) {
            $this->query->output_group_header_styles["requires-before"] = "0";
        }

        if (!$this->query->output_group_trailer_styles) {
            $this->query->output_group_trailer_styles["border-style"] = "solid";
            $this->query->output_group_trailer_styles["border-width"] = "1 0 1 0";
            $this->query->output_group_trailer_styles["border-color"] = array(0, 0, 0);
        }

        // Turn off page header and body background as its too complicated for now
        if (isset($this->query->output_reportbody_styles["background-color"])) {
            unset($this->query->output_reportbody_styles["background-color"]);
        }

        if (isset($this->all_page_page_styles["background-color"])) {
            unset($this->all_page_page_styles["background-color"]);
        }

    }
797709
protected function scripts()
    {
        $container = $this->app->make('antares.asset')->container('antares/foundation::scripts');
        $container->inlineScript('version-box', $this->inline());
    }
1161562
function SetStylesArray($arr)
	{
		$style = '';
		foreach (['B', 'I'] as $s) {
			if (isset($arr[$s])) {
				if ($arr[$s]) {
					$this->$s = true;
					$style .= $s;
				} else {
					$this->$s = false;
				}
			} elseif ($this->$s) {
				$style .= $s;
			}
		}
		$this->currentfontstyle = $style;
		$this->SetFont('', $style, 0, false);
	}
1033116
function normalise() {

    // Store frames generated by invalid tags and move them outside the table
    $erroneous_frames = array();
    $anon_row = false;
    $iter = $this->get_first_child();
    while ( $iter ) {
      $child = $iter;
      $iter = $iter->get_next_sibling();

      $display = $child->get_style()->display;

      if ( $anon_row ) {

        if ( $display === "table-row" ) {
          // Add the previous anonymous row
          $this->insert_child_before($table_row, $child);

          $table_row->normalise();
          $child->normalise();
          $anon_row = false;
          continue;
        }

        // add the child to the anonymous row
        $table_row->append_child($child);
        continue;

      } else {

        if ( $display === "table-row" ) {
          $child->normalise();
          continue;
        }

        if ( $display === "table-cell" ) {
          // Create an anonymous table row
          $tr = $this->get_node()->ownerDocument->createElement("tr");

          $frame = new Frame($tr);

          $css = $this->get_style()->get_stylesheet();
          $style = $css->create_style();
          $style->inherit($this->get_style());

          // Lookup styles for tr tags.  If the user wants styles to work
          // better, they should make the tr explicit... I'm not going to
          // try to guess what they intended.
          if ( $tr_style = $css->lookup("tr") )
            $style->merge($tr_style);

          // Okay, I have absolutely no idea why I need this clone here, but
          // if it's omitted, php (as of 2004-07-28) segfaults.
          $frame->set_style(clone $style);
          $table_row = Frame_Factory::decorate_frame($frame, $this->_dompdf);
          $table_row->set_root($this->_root);

          // Add the cell to the row
          $table_row->append_child($child);

          $anon_row = true;
          continue;
        }

        if ( !in_array($display, self::$VALID_CHILDREN) ) {
          $erroneous_frames[] = $child;
          continue;
        }

        // Normalise other table parts (i.e. row groups)
        foreach ($child->get_children() as $grandchild) {
          if ( $grandchild->get_style()->display === "table-row" )
            $grandchild->normalise();
        }

        // Add headers and footers
        if ( $display === "table-header-group" )
          $this->_headers[] = $child;

        else if ( $display === "table-footer-group" )
          $this->_footers[] = $child;
      }
    }

    if ( $anon_row ) {
      // Add the row to the table
      $this->_frame->append_child($table_row);
      $table_row->normalise();
      $this->_cellmap->add_row();
    }

    foreach ($erroneous_frames as $frame)
      $this->move_after($frame);

  }
1059723
public function set_assets() {

		// set style.
		$this->assets['style']['date']       = '//cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css';
		$this->assets['style']['date-theme'] = '//cdn.jsdelivr.net/npm/flatpickr/dist/themes/airbnb.min.css';
		$this->assets['script']['date']      = '//cdn.jsdelivr.net/npm/flatpickr';
		$this->assets['script']['date-init'] = $this->url . 'assets/controls/datepicker/flatpickr-init.js';

		parent::set_assets();
	}
941447
function($from, $to, properties) {
		var i, n, styles = {};
		if (properties) {
			for (i = 0, n = properties.length; i < n; i++) {
				styles[properties[i]] = $from.css(properties[i]);
			}
		} else {
			styles = $from.css();
		}
		$to.css(styles);
	}
192199
private function assets()
    {
        $s = '';
        foreach($this->styles as $id=>$f){
            $s .= '<link id="stylesheet_'.$id.'" rel="stylesheet" href="'.$this->url.'css/'.$f.'.css">'."\n\t";
        }
        $this->val('style', $s);

        $s = '<script id="javascript_base">var URL=\''.$this->url.'\'';

        foreach ($this->jsvalues as $n=>$v) {
            $s .= ','.$n.'='.(is_string($v) ? '\''.str_replace("'", '"', $v).'\'' : $v);
        }
        $s .= ';</script>';
        
        foreach($this->scripts as $id=>$f){
            $s .= "\n\t".'<script id="javascript_'.$id.'" src="'.$this->url.'js/'.$f.'.js"></script>';
        }
        $this->val('script', $s); //e($this);
    }
1094869
protected function generateStyleAttribute()
    {
        // combine CSS classes
        $strClasses = '';
        foreach ($this->arrCssClasses as $strClass => $NULL) {
            if ($strClass != '')
                $strClass .= ' ';
            $strClasses .= $strClass;
        }
        $this->setAttribute('class', $strClasses);

        // combine CSS propertys
        $strPropertys = '';
        foreach ($this->arrCssPropertys as $strProperty => $strValue) {
            if ($strPropertys != '')
                $strPropertys .= ' ';
            $strPropertys .= $strProperty.': '.$strValue.';';
        }
        $this->setAttribute('style', $strPropertys);
    }
597411
function setStyles(el, styles) {
         var which;

         for (which in styles) {
             if (styles.hasOwnProperty(which)) {
                 Dom.setStyle(el, which, styles[which]);
             }
         }
     }
1172180
protected function set_active_styles() {
		$style = null;
		if ( ! empty( $this->struct['base_color'] ) ) {

			$style .= '.' . $this->id() . ' .irs-grid-pol {background: ' . $this->struct['base_color'] . ';}';
			$style .= '.' . $this->id() . ' .irs-bar {border-top: 1px solid ' . $this->struct['base_color'] . ';border-bottom: 1px solid ' . $this->struct['base_color'] . ';background: ' . $this->struct['base_color'] . ';}';
			$style .= '.' . $this->id() . ' .irs-bar-edge {border: 1px solid ' . $this->struct['base_color'] . ';background: ' . $this->struct['base_color'] . ';}';
			$style .= '.' . $this->id() . ' .irs-from, .' . $this->id() . ' .irs-to, .' . $this->id() . ' .irs-single {background: ' . $this->struct['base_color'] . ';}';

		}
		uix_share()->set_active_styles( $style );

	}
715146
public function render_repeatable_more() {

		$label = __( 'Add Another', 'uix' );

		if ( ! empty( $this->struct['label'] ) ) {
			$label = $this->struct['label'];
		}

		$this->instance  = '{{_inst_}}';
		$this->templates = $this->render_repeatable( true );
		$this->instance  = 0;
		$output          = '<div class="repeatable-footer"><button type="button" class="button" data-uix-repeat="' . esc_attr( $this->id() ) . '">' . esc_html( $label ) . '</button></div>';

		return $output;

	}